Skip to content

Commit 065f990

Browse files
committed
Add 27-inv_invariants/22-mine-tutorial-ex4.4 as test
1 parent 06e0554 commit 065f990

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// PARAM: --enable ana.int.interval
2+
#include <goblint.h>
3+
int main() {
4+
int x, y, z;
5+
__goblint_assume(0 <= x);
6+
__goblint_assume(x <= 10);
7+
__goblint_assume(5 <= y);
8+
__goblint_assume(y <= 15);
9+
__goblint_assume(-10 <= z);
10+
__goblint_assume(z <= 10);
11+
12+
if (x >= y) {
13+
__goblint_check(5 <= x);
14+
__goblint_check(y <= 10); // why doesn't Miné refine this?
15+
}
16+
17+
if (z >= x) {
18+
__goblint_check(0 <= z);
19+
}
20+
21+
if (x >= y && z >= x) { // CIL transform does branches sequentially (good order)
22+
__goblint_check(5 <= x);
23+
__goblint_check(y <= 10); // why doesn't Miné refine this?
24+
__goblint_check(0 <= z);
25+
26+
__goblint_check(5 <= z);
27+
}
28+
29+
if (z >= x && x >= y) { // CIL transform does branches sequentially (bad order)
30+
__goblint_check(5 <= x);
31+
__goblint_check(y <= 10); // why doesn't Miné refine this?
32+
__goblint_check(0 <= z);
33+
34+
__goblint_check(5 <= z); // TODO
35+
}
36+
37+
return 0;
38+
}

0 commit comments

Comments
 (0)