2020-02-12 02:21:42 +00:00
|
|
|
contract C{
|
|
|
|
uint x;
|
2020-06-23 12:14:24 +00:00
|
|
|
constructor(uint y) {
|
2020-02-12 02:21:42 +00:00
|
|
|
assert(x == 0);
|
|
|
|
x = 1;
|
|
|
|
}
|
|
|
|
function f() public {
|
|
|
|
assert(x == 1);
|
|
|
|
++x;
|
|
|
|
g();
|
|
|
|
assert(x == 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
function g() internal {
|
|
|
|
assert(x == 2);
|
|
|
|
--x;
|
|
|
|
assert(x == 1);
|
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2021-10-06 09:53:03 +00:00
|
|
|
// SMTIgnoreOS: macos
|
2020-02-12 02:21:42 +00:00
|
|
|
// ----
|
2021-03-31 15:11:54 +00:00
|
|
|
// Warning 5667: (37-43): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
2021-10-06 09:53:03 +00:00
|
|
|
// Info 1180: Contract invariant(s) for :C:\n!(x >= 2)\n(!(x <= 0) && !(x >= 2))\n(!(x >= 2) && !(x <= 0))\n
|