-
Notifications
You must be signed in to change notification settings - Fork 273
SYNTHESIZER: Handle the case of violation in loop guards #7457
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
SYNTHESIZER: Handle the case of violation in loop guards #7457
Conversation
9a392f4
to
96c5167
Compare
Codecov ReportBase: 78.48% // Head: 78.48% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #7457 +/- ##
========================================
Coverage 78.48% 78.48%
========================================
Files 1663 1663
Lines 191112 191136 +24
========================================
+ Hits 149992 150017 +25
+ Misses 41120 41119 -1
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. |
regression/goto-synthesizer/loop_contracts_synthesis_06/test.desc
Outdated
Show resolved
Hide resolved
regression/goto-synthesizer/loop_contracts_synthesis_06/test_dump.desc
Outdated
Show resolved
Hide resolved
src/goto-synthesizer/enumerative_loop_contracts_synthesizer.cpp
Outdated
Show resolved
Hide resolved
src/goto-synthesizer/enumerative_loop_contracts_synthesizer.cpp
Outdated
Show resolved
Hide resolved
src/goto-synthesizer/enumerative_loop_contracts_synthesizer.cpp
Outdated
Show resolved
Hide resolved
737848c
to
fad7616
Compare
In current loop-invariant synthesizer, we synthesize two kinds of clauses separately. 1. `in_clause` that should hold when we enter the loop body---when the loop guard holds, that is ```loop_guard -> in_clause```. 2. `pos_clause` that should hold when we leave the loop---when the loop guard doesn't hold, that is ```!loop_guard -> pos_clause```. We synthesize `in_clause` when the violations happen in the loop body. We synthesize `pos_clause` when the violation happen after the loop. This PR handles the case that the violations happen in the loop guard. In the case, the new clause we synthesize should hold for both of the cases that loop guard holds and loop guards doesn't hold. We introduce a new variable `violation_location` to indicate whether the violation happen in the loop, after the loop, or in the loop guard, and add the new synthesized clause as `in_clause`, `pos_clause`, or both, respectively.
fad7616
to
43f71f3
Compare
In current loop-invariant synthesizer, we synthesize two kinds of clauses separately.
in_clause
that should hold when we enter the loop body---when the loop guard holds, that isloop_guard -> in_clause
.pos_clause
that should hold when we leave the loop---when the loop guard doesn't hold, that is!loop_guard -> pos_clause
.We synthesize
in_clause
when the violations happen in the loop body. We synthesizepos_clause
when the violation happen after the loop.This PR handles the case that the violations happen in the loop guard (loop_contracts_synthesis_06/main.c as an example). In the case, the new clause we synthesize should hold for both of the cases that loop guard holds and loop guards doesn't hold.
We introduce a new variable
violation_location
to indicate whether the violation happen in the loop, after the loop, or in the loop guard, and add the new synthesized clause asin_clause
,pos_clause
, or both, respectively.