Skip to content

CONTRACTS: use alias analysis to infer loop assigns in synthesizer #7603

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

Merged

Conversation

qinheping
Copy link
Collaborator

This PR contains two changes.

First, we will no longer error out when the alias analysis fails when we infer loop assigns. When the local alias analysis fails on some pointers, it still probably success on other pointers. So it is worth to return whatever assigns targets inferred.

Second, we will use local alias analysis to infer initial loop assigns during loop-contracts synthesis. The synthesizer currently uses traces reported by CBMC to construct assigns targets from counterexamples. It can construct at more one assigns target for one call to CBMC. One run of local alias analysis is faster than one run of CBMC, and can infer more than one assigns targets. Therefore, using local alias analysis can improve the performance of the synthesizer.

  • 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 Mar 20, 2023

Codecov Report

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

Comparison is base (37d57b3) 78.51% compared to head (c5bebfa) 78.50%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7603      +/-   ##
===========================================
- Coverage    78.51%   78.50%   -0.01%     
===========================================
  Files         1670     1670              
  Lines       191787   191795       +8     
===========================================
- Hits        150574   150567       -7     
- Misses       41213    41228      +15     
Impacted Files Coverage Δ
src/goto-instrument/loop_utils.cpp 83.78% <100.00%> (ø)
...hesizer/enumerative_loop_contracts_synthesizer.cpp 96.19% <100.00%> (+0.13%) ⬆️
...nthesizer/enumerative_loop_contracts_synthesizer.h 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tautschnig tautschnig merged commit 7e7864b into diffblue:develop Mar 20, 2023
@qinheping qinheping deleted the bugfix/assignable-check-not-in-loop branch March 20, 2023 16:32
@feliperodri feliperodri added aws Bugs or features of importance to AWS CBMC users Code Contracts Function and loop contracts labels Mar 20, 2023
@feliperodri feliperodri added the Synthesis Invariant synthesis label Apr 3, 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 Synthesis Invariant synthesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants