2018-10-18 13:03:52 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract C
|
|
|
|
{
|
2020-10-13 11:47:03 +00:00
|
|
|
function f() public pure {
|
2018-10-18 13:03:52 +00:00
|
|
|
assert(msg.sig == 0x00000000);
|
2020-10-13 11:47:03 +00:00
|
|
|
assert(msg.sig == 0x26121ff0);
|
|
|
|
fi();
|
|
|
|
gi();
|
|
|
|
}
|
|
|
|
function fi() internal pure {
|
|
|
|
assert(msg.sig == 0x26121ff0);
|
|
|
|
}
|
|
|
|
function g() public pure {
|
|
|
|
assert(msg.sig == 0xe2179b8e);
|
|
|
|
gi();
|
|
|
|
}
|
|
|
|
function gi() internal pure {
|
|
|
|
// Fails since f can also call gi in which case msg.sig == 0x26121ff0
|
|
|
|
assert(msg.sig == 0xe2179b8e);
|
|
|
|
}
|
|
|
|
function h() public pure {
|
|
|
|
// Fails since gi can also call h in which case msg.sig can be f() or g()
|
|
|
|
assert(msg.sig == 0xe2179b8e);
|
2018-10-18 13:03:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2021-01-06 15:06:15 +00:00
|
|
|
// Warning 6328: (76-105): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()
|
2021-01-11 21:17:32 +00:00
|
|
|
// Warning 6328: (403-432): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()\n C.fi() -- internal call\n C.gi() -- internal call
|
2021-01-06 15:06:15 +00:00
|
|
|
// Warning 6328: (543-572): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.h()
|