-
Notifications
You must be signed in to change notification settings - Fork 274
Cleanup in string preprocessing #3189
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
Cleanup in string preprocessing #3189
Conversation
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.
Passed Diffblue compatibility checks (cbmc commit: 2b45d80).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/88131981
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.
Looks good, one thing to check re: get-fresh-java-symbol, and also please check you intended to include a models lib bump in this PR
const source_locationt &source_location, | ||
symbol_table_baset &symbol_table) | ||
{ | ||
const std::string name_prefix = id2string(source_location.get_function()); |
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.
Check you got a real source loc in this case (or handle the no-source-loc case somehow)
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 believe @peterschrammel has comment on this (or a similar case) elsewhere: this seems actually wrong, instead the internal identifier of the function should be passed in.
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.
Yes the conversation was on #2374, I will copy it here so that it doesn't get lost now that 2374 is closed, and address it when I have time to get back to this PR.
tautschnig 13 days ago Collaborator
I strongly believe that the information in the source_location is a string aimed at the user, and should relate to whatever is found in the source. The actual identifier of the function (the key in goto_functionst::function_map) used internally may be entirely different. I don't know which one is required here.
peterschrammel 13 days ago Member
Here, something is required that is unique to a goto function. Reason: adding a function to a goto model must not affect the identifiers of another function. This was the source of many goto-diff bugs in the past.
tautschnig 13 days ago Collaborator
Then a function_id must be passed in. In some call sites in this PR this would be symbol.name, others require further digging.
3fbce70
to
23e5054
Compare
23e5054
to
293ec8e
Compare
cad1a55
to
d917737
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 8de539f).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/99921522
7c08bc0
to
6997a76
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 6997a76).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100205172
Add const keyword at the declaration of variables that will not get modified. In some case, we inline them instead to avoid declaration, when declaration doesn't add value. In other cases, we don't make the variable const but use move where it is used. fixup! Add missing const's
f6d19c1
to
5d88421
Compare
This is in preparation to giving the function_id to the function generating fresh java symbols.
This is in preparation for giving function_id as an argument to the function creating fresh java symbols.
This is in preparation for adding the function_id to the function generating fresh java symbols.
This is in preparation for giving the function name to the function generating fresh java symbols.
This is in preparation for giving the function name to the function generating fresh java symbols.
This is in preparation to giving the function_id to the function generating fresh java symbols.
This function is not used, there is no point in keeping it.
This is not used
This is in preparation to giving the function_id to the function generating fresh java symbols.
5d88421
to
e3a18bd
Compare
This is in preparation for using a new fresh_java_symbol function which takes a function_id as parameter.
This is in preparation to giving the function_id to the function generating fresh java symbols.
This prevents forgetting that the basename of the symbol should be the function identifier.
No functional changes.
e3a18bd
to
e81e174
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: e81e174).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100241422
@tautschnig I got rid of all the |
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.
Thanks a lot for the large-scale cleanup and updates!
This is based on #2374
The goal is to ensure location is set for each created symbol.