mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update smtCheckerTests for z3 4.8.10
This commit is contained in:
@@ -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 { } }
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user