-
Notifications
You must be signed in to change notification settings - Fork 273
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
Symex-driven lazy loading uses goto-checker [blocks: #2212] #4541
Symex-driven lazy loading uses goto-checker [blocks: #2212] #4541
Conversation
1d7c902
to
aa3dda9
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.
This PR failed Diffblue compatibility checks (cbmc commit: aa3dda9).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/108567170
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
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.
This PR failed Diffblue compatibility checks (cbmc commit: 1ce9697).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/108568076
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
jbmc/src/jbmc/jbmc_parse_options.cpp
Outdated
@@ -829,7 +827,7 @@ void jbmc_parse_optionst::process_goto_function( | |||
function.get_function_id(), | |||
goto_function, | |||
symbol_table, | |||
get_message_handler()); | |||
log.get_message_handler()); |
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 pick: I think this change is in the wrong commit as it is a fix-up for the previous change.
jbmc/src/jbmc/jbmc_parse_options.cpp
Outdated
{ | ||
// We can only output these after goto-symex has run. | ||
(void)show_loaded_symbols(*goto_model_ptr); | ||
(void)show_loaded_functions(*goto_model_ptr); |
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 don't understand this bit of code: the comment says that we cannot do any of this output, but then invokes two output functions, which seems like a contradiction. And then why does it do any output at all here, where has this been requested?
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 says we needed to wait until after symex, which we just ran (the verifier()
call above)
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.
(normally of course we can --show-goto-functions
before symex, but not when symex itself is deciding what gets loaded)
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.
Ok, but why are we doing this output at all?
// have we got anything to check? otherwise we return PASS | ||
if(!has_properties_to_check(properties)) | ||
return resultt::PASS; | ||
|
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 commit message suggests that this code must be put somewhere else, but then the commit only removes code?
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.
incremental_goto_checker is already doing that.
jbmc/src/jbmc/jbmc_parse_options.cpp
Outdated
@@ -557,7 +557,7 @@ int jbmc_parse_optionst::doit() | |||
if(get_goto_program_ret != -1) | |||
return get_goto_program_ret; | |||
|
|||
if(!cmdline.isset("symex-driven-lazy-loading")) | |||
if(!options.get_bool_option("symex-driven-lazy-loading")) |
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 there anything we could do to completely hide cmdline
from such code so that it cannot wrongly be reintroduced?
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.
Will come with progress on #4404
propertiest initialize_properties(const abstract_goto_modelt &goto_model) | ||
{ | ||
propertiest properties; | ||
update_properties_from_goto_model(properties, goto_model); |
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.
@tautschnig I believe this might be the resolution to your complain about check-properties code being deleted? (perhaps these two commits should be merged?)
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-properties code being deleted" - what is this about?
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.
Where you said "incremental_goto_checker is already doing that."
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.
Ah... ok
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.
Thankyou, this factors the symex-driven stuff much better than I managed back when I first wrote this!
reduces code duplication
removes indent
set_properties has no return value.
reduces code duplication
is unreachable
With symex-driven-lazy-loading there might not be any properties initially. Incremental_goto_checker is already doing that check anyway.
With symex-driven-lazy-loading we know the full set of properties only after goto-symex has finished.
Only use options after cmdline has been parsed into options.
goes now through goto-checker classes instead of bmct/all_propertiest.
reduces indentation
These have now been entirely replaced by goto-checker.
1ce9697
to
f96818d
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.
This PR failed Diffblue compatibility checks (cbmc commit: f96818d).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/108667061
Status will be re-evaluated on next push.
Common spurious failures include: the cbmc commit has disappeared in the mean time (e.g. in a force-push); the author is not in the list of contributors (e.g. first-time contributors); compatibility was already broken by an earlier merge.
Most of this PR are incremental clean-ups of jbmc_parse_optionst. Review commit by commit.