-
Notifications
You must be signed in to change notification settings - Fork 284
Make goto_symext::language_mode protected #8646
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
Make goto_symext::language_mode protected #8646
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #8646 +/- ##
===========================================
- Coverage 80.39% 80.39% -0.01%
===========================================
Files 1688 1688
Lines 207411 207405 -6
Branches 73 73
===========================================
- Hits 166757 166750 -7
- Misses 40654 40655 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b50279c
to
763f4da
Compare
763f4da
to
2cbff34
Compare
Requires #8711 for CI to pass. |
This should be set via constructors. Remove bmc_util/setup_symex as all work is done through constructors.
2cbff34
to
921218f
Compare
const symex_target_equationt &equation); | ||
|
||
virtual void setup_symex(symex_bmct &symex); | ||
virtual void setup_symex(symex_bmct &symex) |
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 this even called anywhere now?
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, it's called from initialize_worklist
and resume_path
in this class. Which is also why this needs to be kept: it will be called more than once in the single-path case. Yet the only actual code being executed is java_setup_symex
, and I am wondering whether this needs to be re-done per path, or instead could be done just once when creating symex_bmct
?
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.
java_setup_symex
just installs a loop_unwind_handler
. This should be done only once when creating symex_bmct
.
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, when writing my earlier comment I had failed to consider that initialize_worklist
and resume_path
actually do create a fresh symex_bmct
instance each time, so each time we do need to invoke java_setup_symex
. So I'd argue the code is actually ok as it is?!
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, yes.
unwindset.parse_unwind(options.get_option("unwind")); | ||
unwindset.parse_unwindset( | ||
options.get_list_option("unwindset"), goto_model, ui_message_handler); | ||
setup_symex(symex, ns, ui_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.
If you remove this then the virtual function won't even be called...
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.
That's fine, there is no need for doing so.
unwindset.parse_unwind(options.get_option("unwind")); | ||
unwindset.parse_unwindset( | ||
options.get_list_option("unwindset"), goto_model, ui_message_handler); | ||
setup_symex(symex, ns, ui_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.
see 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.
That's fine, there is no need for doing so.
This should be set via constructors. Remove bmc_util/setup_symex as all work is done through constructors.
Keeping as draft until #8643 has been merged (which is the first commit in this PR).