-
Notifications
You must be signed in to change notification settings - Fork 284
Cleaning dependencies of the string solver #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's safe to get rid of "explicit" now that this constructor takes 2 arguments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit picking: one blank line will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to use if(sum.is_nil())
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const &
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const & (and all other instances like this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const &
src/util/string_expr.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const & (twice, and use copy_to_operands)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no space before :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The initialisation should be in the cpp file.
src/util/string_expr.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove one blank line
4aefd87 to
a04f840
Compare
tautschnig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't initialise a non-const static member in the class definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const & (twice)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const & (twice)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const & (twice)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove one blank line
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.