Skip to content

Commit 11f2120

Browse files
committed
Add UNKNOWN annotations to test cases.
Loss in precision is due to no longer computing with top in the interval domain.
1 parent 8b9eea8 commit 11f2120

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

tests/regression/24-octagon/02-octagon_interprocudral.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ int f1() {
1111

1212
one = two;
1313

14-
assert(one - two == 0);
14+
// We no longer compute with "top" in the interval domain,
15+
// leading to a loss of precision here.
16+
// Thus the three asserts are here marked with "UNKNOWN".
17+
assert(one - two == 0); // UNKNOWN
1518
x = f2(one,two);
16-
assert(one - two == 0);
19+
assert(one - two == 0); // UNKNOWN
1720
assert(x == 48);
1821
}
1922

2023
int f2(int a, int b) {
21-
assert(a-b == 0);
24+
assert(a-b == 0); // UNKNOWN
2225

2326
return 48;
2427
}

tests/regression/27-inv_invariants/01-ints.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ int main() {
2121
assert(x == 2 && y == 4);
2222
if (x == 3 && y/x == 2) {
2323
assert(y == 6); // UNKNOWN!
24-
assert(RANGE(y, 6, 8));
24+
assert(RANGE(y, 6, 8)); // UNKNOWN
2525
}
2626
if (y/3 == -2)
27-
assert(RANGE(y, -8, -6));
27+
assert(RANGE(y, -8, -6)); // UNKNOWN
2828
if (y/-3 == -2)
29-
assert(RANGE(y, 6, 8));
29+
assert(RANGE(y, 6, 8)); // UNKNOWN
3030
if (y/x == 2 && x == 3)
3131
assert(x == 3); // TO-DO y == [6,8]; this does not work because CIL transforms this into two if-statements
3232
if (2+(3-x)*4/5 == 6 && 2*y >= x+5)
@@ -113,7 +113,7 @@ int main2() {
113113
if (x == three && y/x == two) {
114114
// y could for example also be 7
115115
assert(y == six); // UNKNOWN!
116-
assert(RANGE(y, 6, 8));
116+
assert(RANGE(y, 6, 8)); // UNKNOWN
117117
}
118118
if (y/x == two && x == three)
119119
assert(x == three); // TO-DO y == six
@@ -124,9 +124,9 @@ int main2() {
124124
assert(x != two); // [two,four] -> [three,four] TO-DO x % two == one
125125

126126
if (y/three == -two)
127-
assert(RANGE(y, -8, -6));
127+
assert(RANGE(y, -8, -6)); // UNKNOWN
128128
if (y/-three == -two)
129-
assert(RANGE(y, 6, 8));
129+
assert(RANGE(y, 6, 8)); // UNKNOWN
130130
if (y/x == two && x == three)
131131
assert(x == 3); // TO-DO y == [6,8]; this does not work because CIL transforms this into two if-statements
132132
if (two+(three-x)*four/five == six && two*y >= x+five)

0 commit comments

Comments
 (0)