2019-05-06 16:24:15 +00:00
|
|
|
contract C
|
|
|
|
{
|
|
|
|
uint[] a;
|
2021-03-23 18:15:14 +00:00
|
|
|
constructor() { init(); }
|
|
|
|
function init() internal {
|
|
|
|
a.push();
|
|
|
|
a.push();
|
|
|
|
a.push();
|
|
|
|
}
|
2019-05-06 16:24:15 +00:00
|
|
|
function g() internal {
|
|
|
|
delete a;
|
|
|
|
}
|
|
|
|
function h() internal {
|
|
|
|
delete a[2];
|
|
|
|
}
|
|
|
|
function f(bool b) public {
|
|
|
|
a[2] = 3;
|
|
|
|
require(b);
|
|
|
|
if (b)
|
|
|
|
g();
|
|
|
|
else
|
|
|
|
h();
|
2021-03-23 18:15:14 +00:00
|
|
|
init();
|
2019-05-06 16:24:15 +00:00
|
|
|
assert(a[2] == 0);
|
2019-08-22 13:44:30 +00:00
|
|
|
assert(a[1] == 0);
|
2019-05-06 16:24:15 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2019-05-06 16:24:15 +00:00
|
|
|
// ----
|
2021-10-06 09:53:03 +00:00
|
|
|
// Info 1180: Contract invariant(s) for :C:\n!(a.length <= 2)\n
|
2021-03-31 15:11:54 +00:00
|
|
|
// Warning 6838: (262-263): BMC: Condition is always true.
|