-
Notifications
You must be signed in to change notification settings - Fork 274
CONTRACTS: Insert reachability canary assertions #7359
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
CONTRACTS: Insert reachability canary assertions #7359
Conversation
7afe64f
to
2e89f66
Compare
2e89f66
to
fa89b4f
Compare
src/goto-instrument/contracts/dynamic-frames/dfcc_instrument.cpp
Outdated
Show resolved
Hide resolved
Codecov ReportBase: 78.37% // Head: 78.36% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7359 +/- ##
===========================================
- Coverage 78.37% 78.36% -0.01%
===========================================
Files 1647 1647
Lines 190328 190356 +28
===========================================
+ Hits 149172 149180 +8
- Misses 41156 41176 +20
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
581ebb6
to
7f60794
Compare
7f60794
to
749cebb
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.
@@ -233,14 +233,14 @@ class dfcc_libraryt | |||
/// \param contract_assigns_size_hint size of the assigns clause being checked | |||
void specialize(const std::size_t contract_assigns_size_hint); | |||
|
|||
/// Adds an ASSERT(false) body to all front-end functions | |||
/// Adds an ASSERT(false);ASSUME(false); body to all front-end functions |
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 change to the comment accurate?
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.
argh, no
905167f
to
e782174
Compare
When a GOTO function has no body, insert a canary assertion to make the analysis fail in case the function is reachable. Add `assert(false)` bodies for front-end functions `__CPROVER_assignable`, `__CPROVER_object_whole`, `__CPROVER_object_from`, `__CPROVER_object_upto` to make the analysis fail when they are used outside of contract clauses and are hence not remapped to their library implementation.
e782174
to
99eec8d
Compare
When a GOTO function has no body, insert a canary assertion to make sure the function is indeed unreachable.