-
Notifications
You must be signed in to change notification settings - Fork 273
Clean-up use of guards #4188
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
Clean-up use of guards #4188
Conversation
@@ -19,6 +19,8 @@ Author: Daniel Kroening, [email protected] | |||
#include "value_sets.h" | |||
#include "value_set_dereference.h" | |||
|
|||
class guardt; |
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 exactly sure about the order of the commits here, but at the very end this shouldn't be needed anymore at all I think?
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 is still used in some unused deprecated function and I'm not sure of what to do with all these functions (most of the code in this class is unused).
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 the cruft. git revert
is not all that hard.
78af785
to
18f4ba5
Compare
dereference is not overridden, we add final to value_set_dereferencet to be sure of that. Calls to virtual functions are slow, and in general it is better to avoid virtual recursive functions (like derefence was).
This argument was never actually used.
This is never actually used. This allows to remove a lot of useless operations.
The include statement is not usefull anymore, as the usage of guard disappeared from this file.
af6bd9c
to
c459861
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.
LGTM
src/goto-instrument/rw_set.cpp
Outdated
const std::string &suffix, | ||
const guardt &guard) | ||
const exprt::operandst &guard) |
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.
Can we rename the guard
parameters maybe to guard_conjuncts
? Otherwise it might be surprising to find a parameter named guard
of type exprt::operandst
.
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: 18f4ba5).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100961989
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- 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).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
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: af6bd9c).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100962569
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.
Common spurious failures:
- 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).
The incompatibility may have been introduced by an earlier PR. In that case merging this
PR should be avoided unless it fixes the current incompatibility.
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: c459861).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/100964248
c459861
to
ea7e631
Compare
ea7e631
to
8dcbfc3
Compare
This was not making really use of guardt, since no guardt specific operations where performed, but instead just represents a conjunction. We replace that by a list of expressions and do the conjunction when needed. This avoids dependencies on guardt.
A lot of code in goto_program_dereference was deprecated, commented or documented as unused. This commit remove these parts of the code.
8dcbfc3
to
cee38c5
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: cee38c5).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/101067140
In some places, guards are passed around but never really used, in other places they can be replaced by expressions.