Skip to content

CONTRACTS: track function parameters explicitly #7763

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

Conversation

remi-delmas-3000
Copy link
Collaborator

Partly fixes #7760

Function parameter are now tracked explicitly in the function write set if they are assigned from within some loop.

  • 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.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.02 ⚠️

Comparison is base (2830a3b) 78.55% compared to head (1beaa58) 78.54%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7763      +/-   ##
===========================================
- Coverage    78.55%   78.54%   -0.02%     
===========================================
  Files         1691     1691              
  Lines       193171   193183      +12     
===========================================
- Hits        151755   151729      -26     
- Misses       41416    41454      +38     
Impacted Files Coverage Δ
...nstrument/contracts/dynamic-frames/dfcc_cfg_info.h 100.00% <100.00%> (ø)
...ument/contracts/dynamic-frames/dfcc_instrument.cpp 84.13% <100.00%> (+0.33%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@remi-delmas-3000 remi-delmas-3000 changed the title CONTRACTS: track function paramters explicltly CONTRACTS: track function paramters explicitly Jun 12, 2023
@remi-delmas-3000 remi-delmas-3000 changed the title CONTRACTS: track function paramters explicitly CONTRACTS: track function parameters explicitly Jun 12, 2023
Copy link
Collaborator

@feliperodri feliperodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

size_t n;
decr(n);
return 0;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add new line.

@feliperodri feliperodri added aws Bugs or features of importance to AWS CBMC users Code Contracts Function and loop contracts labels Jun 12, 2023
@@ -291,6 +291,13 @@ class dfcc_cfg_infot
return top_level_write_set;
}

/// Returns the set of top level symbols that must be tracked explicitly in
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returns -> Return

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The method "returns" a value

Function parameter are now tracked explicitly in the write set
if they are assigned from within some loop body.
@remi-delmas-3000 remi-delmas-3000 force-pushed the contracts-fix-loop-assigns-function-parameter branch from 07b410b to 1beaa58 Compare June 12, 2023 21:33
@remi-delmas-3000 remi-delmas-3000 merged commit 95f5db1 into diffblue:develop Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws Bugs or features of importance to AWS CBMC users Code Contracts Function and loop contracts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

goto-instrument 5.84 crash when trying to use __CPROVER_pointer_in_range_dfcc contract
3 participants