Skip to content
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: ensure at most one predicate per pointer #8577

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

remi-delmas-3000
Copy link
Collaborator

@remi-delmas-3000 remi-delmas-3000 commented Jan 25, 2025

Please ignore the first commit, it is from #8576 and will disappear when rebasing.

Fixes a discrepancy between assert and assume behaviour for pointer predicates, by ensuring
that at most one predicate occurrence can be established at all times, in both assume and assert
contexts.

Before, is_fresh(p, n) && is_fresh(p, n) would fail in assert contexts but pass in assume contexts
by allocating twice.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • [ x White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Remi Delmas added 3 commits January 25, 2025 16:48
This fixes the problem that
`is_fresh(p, n) && is_fresh(p, n)` would
fail in assertion contexts but pass in
assumption contexts by allocating twice.
Copy link

codecov bot commented Jan 25, 2025

Codecov Report

Attention: Patch coverage is 82.05128% with 7 lines in your changes missing coverage. Please review.

Project coverage is 78.85%. Comparing base (3d79560) to head (42af48e).

Files with missing lines Patch % Lines
.../contracts/dynamic-frames/dfcc_wrapper_program.cpp 70.00% 6 Missing ⚠️
...strument/contracts/dynamic-frames/dfcc_library.cpp 93.75% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #8577      +/-   ##
===========================================
- Coverage    78.92%   78.85%   -0.07%     
===========================================
  Files         1732     1732              
  Lines       198953   199119     +166     
  Branches     18560    18560              
===========================================
+ Hits        157021   157023       +2     
- Misses       41932    42096     +164     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@feliperodri feliperodri added the Code Contracts Function and loop contracts label Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Contracts Function and loop contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants