Skip to content

Crangler: add loop invariants with loop numbers #7065

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
merged 1 commit into from
Sep 22, 2022

Conversation

qinheping
Copy link
Collaborator

Crangler only supported to add a loop invariant to a specified for-loop or while-loop in a certain function. This PR adds support for adding loop invariants to loops specified by loop number, regardless they are for-loops or while-loops.

This PR is required when we annotate synthesized loop invariants back to c source code, because we don't know whether a loop in goto translated from a for-loop or a while-loop in the c code.

  • 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.
  • n/a 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).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Aug 11, 2022

Codecov Report

Merging #7065 (b7f6948) into develop (d7b3f48) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop    #7065      +/-   ##
===========================================
+ Coverage    77.86%   77.92%   +0.05%     
===========================================
  Files         1569     1576       +7     
  Lines       180995   181615     +620     
===========================================
+ Hits        140929   141515     +586     
- Misses       40066    40100      +34     
Impacted Files Coverage Δ
src/crangler/c_wrangler.cpp 75.51% <100.00%> (+15.75%) ⬆️
src/cpp/cpp_template_type.h 52.94% <0.00%> (-11.35%) ⬇️
src/goto-programs/goto_convert.cpp 88.12% <0.00%> (-4.22%) ⬇️
src/solvers/flattening/boolbv_quantifier.cpp 89.91% <0.00%> (-3.37%) ⬇️
...lvers/smt2_incremental/smt_response_validation.cpp 95.36% <0.00%> (-2.52%) ⬇️
src/util/type.h 98.59% <0.00%> (-1.41%) ⬇️
src/solvers/flattening/bv_utils.cpp 78.41% <0.00%> (-1.20%) ⬇️
src/solvers/smt2/smt2_format.cpp 85.39% <0.00%> (-1.13%) ⬇️
src/goto-instrument/contracts/cfg_info.h 84.21% <0.00%> (-0.79%) ⬇️
src/goto-programs/goto_convert_side_effect.cpp 94.47% <0.00%> (-0.74%) ⬇️
... and 67 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@qinheping qinheping force-pushed the crangler-loop-invariant branch from d66a82e to 35799f8 Compare August 15, 2022 13:50
@jimgrundy
Copy link
Collaborator

@SaswatPadhi can you do a review first so we are making good use of our DiffBlue friends.

@jimgrundy jimgrundy requested a review from SaswatPadhi August 25, 2022 00:26
@jimgrundy jimgrundy added aws Bugs or features of importance to AWS CBMC users aws-medium labels Aug 25, 2022
@feliperodri feliperodri added the Synthesis Invariant synthesis label Aug 31, 2022
@tautschnig tautschnig self-assigned this Sep 2, 2022
@tautschnig tautschnig assigned qinheping and unassigned tautschnig and SaswatPadhi Sep 2, 2022
@qinheping qinheping force-pushed the crangler-loop-invariant branch 4 times, most recently from 0c7d174 to 5c558e7 Compare September 7, 2022 17:35
@qinheping qinheping force-pushed the crangler-loop-invariant branch from 5c558e7 to b7f6948 Compare September 7, 2022 18:42
@SaswatPadhi SaswatPadhi removed their request for review September 17, 2022 23:59
@tautschnig tautschnig merged commit 8be381c into diffblue:develop Sep 22, 2022
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 aws-medium Synthesis Invariant synthesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants