2020-02-12 02:21:42 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-06-19 00:26:46 +00:00
|
|
|
// Warning 5667: (70-76): Unused function parameter. Remove or comment out the variable name to silence this warning.
|
2020-09-25 17:09:06 +00:00
|
|
|
// Warning 2661: (156-159): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
|
|
|
// Warning 4144: (238-241): BMC: Underflow (resulting value less than 0) happens here.
|