-
Notifications
You must be signed in to change notification settings - Fork 274
CONTRACTS: add __CPROVER_obeys_contract predicate #7355
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: add __CPROVER_obeys_contract predicate #7355
Conversation
Codecov ReportBase: 78.35% // Head: 78.34% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7355 +/- ##
===========================================
- Coverage 78.35% 78.34% -0.02%
===========================================
Files 1645 1646 +1
Lines 190182 190121 -61
===========================================
- Hits 149015 148945 -70
- Misses 41167 41176 +9
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. |
ca29e29
to
d67141b
Compare
I'll review once #7348 is merged and a possible bug that @remi-delmas-3000 and I just discussed out-of-band has been addressed. |
d67141b
to
c821f5e
Compare
c821f5e
to
c0fd991
Compare
src/goto-instrument/contracts/dynamic-frames/dfcc_obeys_contract.cpp
Outdated
Show resolved
Hide resolved
c0fd991
to
45651af
Compare
45651af
to
f5e49c9
Compare
50a54f4
to
71db674
Compare
This predicate can be used in requires and ensures clauses to express that a function pointer satisfies a given contract. The predicate is implemented in cprover_contracts.c and turns into an assignment in assumption contexts and to an equality check in assertions contexts. The dfcc_instrumentt methods were updated to report any occurrence of the predicate discovered when instrumenting GOTO functions.
71db674
to
272ebf0
Compare
Depends on #7348 (first commit).
Adds a new predicate
__CPROVER_obeys_contract(function_pointer, contract)
.Allows to specify that a function pointer satisfies a given contract in requires and ensures
clauses of another contract.