2019-03-11 20:06:28 +00:00
|
|
|
contract C
|
|
|
|
{
|
|
|
|
uint x;
|
|
|
|
|
|
|
|
modifier m {
|
|
|
|
require(x > 0);
|
|
|
|
require(x < 10000);
|
|
|
|
_;
|
|
|
|
assert(x > 1);
|
|
|
|
_;
|
|
|
|
assert(x > 2);
|
|
|
|
assert(x > 10);
|
|
|
|
}
|
|
|
|
|
|
|
|
function f() m public {
|
|
|
|
x = x + 1;
|
|
|
|
}
|
2019-07-17 16:01:14 +00:00
|
|
|
|
|
|
|
function g(uint _x) public {
|
|
|
|
x = _x;
|
|
|
|
}
|
2019-03-11 20:06:28 +00:00
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2019-03-11 20:06:28 +00:00
|
|
|
// ----
|
2021-03-31 15:11:54 +00:00
|
|
|
// Warning 6328: (123-137): CHC: Assertion violation happens here.\nCounterexample:\nx = 3\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.g(1)\nState: x = 1\nC.f()
|