Skip to content

Commit e1ba240

Browse files
committed
Support --values-refine with --k-induction
If --values-refine is on, we first try the intervals domain and then the zones domain. Until now, this has been supported for AI only, now support for k-induction, too. This requires some tests to use --intervals instead of --values-refine since the zones invariant inference takes too long.
1 parent 319327d commit e1ba240

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
main.c
3-
--heap --values-refine --k-induction
3+
--heap --intervals --k-induction
44
^EXIT=10$
55
^SIGNAL=0$
66
^VERIFICATION FAILED$

regression/kiki/hard2_unwindbound5/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
main.c
3-
--heap --values-refine --k-induction --competition-mode
3+
--heap --intervals --k-induction --competition-mode
44
^EXIT=10$
55
^SIGNAL=0$
66
^.*FAILURE$

src/2ls/summary_checker_kind.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ resultt summary_checker_kindt::operator()()
4444
{
4545
summarize(goto_model);
4646
result=check_properties();
47+
48+
if(result == resultt::UNKNOWN &&
49+
options.get_bool_option("values-refine") &&
50+
options.get_bool_option("intervals"))
51+
{
52+
// Now try with zones
53+
summary_db.mark_recompute_all();
54+
options.set_option("intervals", false);
55+
options.set_option("zones", true);
56+
summarize(goto_model);
57+
result = check_properties();
58+
// Reset back to intervals (for the next unwinding)
59+
options.set_option("intervals", true);
60+
options.set_option("zones", false);
61+
}
4762
}
4863

4964
if(result==resultt::PASS)

0 commit comments

Comments
 (0)