2020-10-26 16:16:27 +00:00
|
|
|
contract C {
|
|
|
|
uint[] b;
|
|
|
|
|
|
|
|
function f() public {
|
|
|
|
require(b.length == 0);
|
|
|
|
b.push() = 1;
|
|
|
|
assert(b[0] == 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
function g() public {
|
|
|
|
b.push() = 1;
|
|
|
|
assert(b[b.length - 1] == 1);
|
|
|
|
// Fails
|
|
|
|
assert(b[b.length - 1] == 100);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2021-10-12 09:12:18 +00:00
|
|
|
// SMTIgnoreCex: yes
|
2023-02-09 16:07:13 +00:00
|
|
|
// SMTIgnoreOS: macos
|
2020-10-26 16:16:27 +00:00
|
|
|
// ----
|
2023-02-09 16:07:13 +00:00
|
|
|
// Warning 6328: (199-229): CHC: Assertion violation happens here.
|
|
|
|
// Info 1391: CHC: 7 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
|