Cleaning dependencies of the string solver#549
Conversation
|
The linter warnings appear to be genuine, would you mind addressing them? |
There was a problem hiding this comment.
It's safe to get rid of "explicit" now that this constructor takes 2 arguments.
There was a problem hiding this comment.
I'm not entirely sure, but I think this would actually reset the counter. Place the initialisation with the declaration.
There was a problem hiding this comment.
Would you mind elaborating a bit more to enable others to pick up this TODO? Specifically, I don't know who "we" refers to, and what type that would be - it seems it's using index_type - is that not correct?
There was a problem hiding this comment.
sorry this shouldn't be there, the call the index_type has been added but the TODO wasn't removed
There was a problem hiding this comment.
Nit picking: one blank line will do
There was a problem hiding this comment.
You might want to use if(sum.is_nil())
There was a problem hiding this comment.
You could use if(sum.is_not_nil())
|
@tautschnig yes, sorry for these, this is now done |
|
Thanks a lot for the immediate cleanup - please see my comments for a few more changes to consider. |
There was a problem hiding this comment.
const & (and all other instances like this)
src/util/string_expr.h
Outdated
There was a problem hiding this comment.
const & (twice, and use copy_to_operands)
There was a problem hiding this comment.
.is_nil() (several instances)
|
@tautschnig @peterschrammel thanks for the comment, I've now done the corresponding corrections |
0174939 to
6096c5f
Compare
6096c5f to
0628812
Compare
There was a problem hiding this comment.
The initialisation should be in the cpp file.
src/util/string_expr.h
Outdated
4aefd87 to
a04f840
Compare
tautschnig
left a comment
There was a problem hiding this comment.
I would suggest to move the initialisation as indicated in the comment - otherwise this looks ok to me.
There was a problem hiding this comment.
Why is this initialization not done right in the class declaration? I'd rather drop this one instead of the in-class one as you've done in one of your commits.
There was a problem hiding this comment.
Personally I don't have a preference, but Peter suggested that the initialisation should be in the cpp file.
There was a problem hiding this comment.
You can't initialise a non-const static member in the class definition.
|
@peterschrammel It seems all concerns have been addressed. I note that the linter is failing with an internal error rather than reporting any problems in the source files... |
|
@romainbrenguier can you please rebase, to have a fixed linter output? |
d9b5714 to
c29eed4
Compare
|
@forejtv done |
There was a problem hiding this comment.
const typet &type (several occurrences)
f971285 to
0ad726d
Compare
|
@peterschrammel it's now done, should I squash the commits? |
|
Yes, the cleanup commits should be squashed |
`src/util` is a more appropriate place for the `string_exprt` class We changed the constructor with one type argument to be similar to other `exprt` constructors. This constructor was used to generate a struct with fresh symbols but this is no longer the case, so we use a function fresh string instead. Dependencies in the solver that were not needed have been removed. For some functions this requieres us to now pass the string type as argument.
0ad726d to
3cb7bca
Compare
|
@peterschrammel commits have been squashed: 3cb7bca |
peterschrammel
left a comment
There was a problem hiding this comment.
@kroening, this looks ready to go
…ween_DO_and_EVSes SEC-633: Bugfix: added alias-computation between a DO and EVSes in the domain.
src/utilis a more appropriate place for thestring_exprtclass, so it was moved there.We changed the constructor with one type argument to be similar to
other
exprtconstructors.This constructor was used to generate a struct with
fresh symbols but this is no longer the case, so we use a function
fresh string instead.
Dependencies in the solver that were not needed have been removed.
For some functions this requires us to now pass the string type as
argument, so the appropriate changes have been made.