Update smtCheckerTests for z3 4.8.10

This commit is contained in:
Leonardo Alt
2021-01-26 10:18:52 +01:00
parent de0a3b989d
commit 40221a90c4
5 changed files with 26 additions and 18 deletions
@@ -12,5 +12,7 @@ contract C {
assert(s.a[1] == s.a[0]);
}
}
// ====
// SMTIgnoreCex: yes
// ----
// Warning 6328: (148-172): CHC: Assertion violation happens here.\nCounterexample:\ns = {x: 7720, a: []}\n_x = 7720\n\nTransaction trace:\nC.constructor()\nState: s = {x: 0, a: []}\nC.f(7720)
// Warning 6328: (148-172): CHC: Assertion violation happens here.
@@ -9,6 +9,8 @@
// addmod is equal to mod of sum for small numbers
if and(and(lt(x, 1000), lt(y, 1000)), lt(z, 1000)) {
// z3 <4.8.10 was able to infer that the
// condition below is always true.
if eq(result, mod(add(x, y), z)) { sstore(0, 9) }
}
@@ -26,6 +28,9 @@
// let z := calldataload(64)
// let result := addmod(x, y, z)
// if 0 { }
// if and(and(lt(x, 1000), lt(y, 1000)), lt(z, 1000)) { if 1 { sstore(0, 9) } }
// if and(and(lt(x, 1000), lt(y, 1000)), lt(z, 1000))
// {
// if eq(result, mod(add(x, y), z)) { sstore(0, 9) }
// }
// if and(and(gt(x, sub(0, 5)), gt(y, sub(0, 2))), eq(z, 3)) { if 0 { } }
// }