Skip to content

SYNTHESIZER: Synthesize loop assigns before loop invariants. #7458

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 2 commits into from
Jan 11, 2023

Conversation

qinheping
Copy link
Collaborator

Loop invariants synthesis is dependent on loop-assigns clauses. So we target non assignable-violations until all assignable-violations are fixed.

  • 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.

@qinheping qinheping added aws Bugs or features of importance to AWS CBMC users aws-medium Synthesis Invariant synthesis labels Dec 28, 2022
@qinheping qinheping self-assigned this Dec 28, 2022
@codecov
Copy link

codecov bot commented Dec 28, 2022

Codecov Report

Base: 78.48% // Head: 78.48% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (ff62607) compared to base (43f71f3).
Patch coverage: 98.86% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7458      +/-   ##
===========================================
- Coverage    78.48%   78.48%   -0.01%     
===========================================
  Files         1663     1663              
  Lines       191136   191189      +53     
===========================================
+ Hits        150017   150046      +29     
- Misses       41119    41143      +24     
Impacted Files Coverage Δ
src/goto-synthesizer/cegis_verifier.h 100.00% <ø> (ø)
...nthesizer/enumerative_loop_contracts_synthesizer.h 100.00% <ø> (ø)
src/goto-synthesizer/expr_enumerator.cpp 74.54% <ø> (ø)
src/goto-synthesizer/expr_enumerator.h 94.59% <ø> (ø)
src/goto-synthesizer/cegis_verifier.cpp 88.52% <98.61%> (+0.55%) ⬆️
src/goto-programs/link_to_library.cpp 100.00% <100.00%> (ø)
src/goto-synthesizer/dump_loop_contracts.cpp 100.00% <100.00%> (ø)
...hesizer/enumerative_loop_contracts_synthesizer.cpp 93.81% <100.00%> (+0.06%) ⬆️
src/util/pointer_expr.h 96.72% <0.00%> (-2.31%) ⬇️
src/goto-symex/ssa_step.cpp 81.75% <0.00%> (-1.36%) ⬇️
... and 19 more

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

Comment on lines 73 to 87
while(lhs_pointer->type().id() != ID_pointer)
{
INVARIANT(
lhs_pointer->operands().size() > 0,
" No pointer found in lhs of NULL-pointer checks.");
lhs_pointer = &lhs_pointer->operands()[0];
}

while(rhs_pointer->type().id() != ID_pointer)
{
INVARIANT(
rhs_pointer->operands().size() > 0,
" No pointer found in lhs of NULL-pointer checks.");
rhs_pointer = &rhs_pointer->operands()[0];
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would a non-pointer-type operand really be acceptable here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is equal_exprt(pointer_object(p1), pointer_object(p2)); where p1 is a null pointer and p2 is a pointer-type operand. I will make it more explicitly.

@qinheping qinheping force-pushed the goto-synthesizer branch 2 times, most recently from ae7d464 to dbbfd16 Compare January 10, 2023 20:15
@qinheping qinheping requested a review from tautschnig January 10, 2023 23:39
Loop invariants synthesis is dependent on loop-assigns clauses. So we don't target non assignable-violations until all assignable-violations are fixed.
@qinheping qinheping merged commit 7bc409b into diffblue:develop Jan 11, 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 aws-medium Synthesis Invariant synthesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants