2020-12-18 18:10:32 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
abstract contract D {
|
|
|
|
function d() virtual public;
|
|
|
|
}
|
|
|
|
|
|
|
|
contract C {
|
|
|
|
bytes data;
|
|
|
|
|
|
|
|
bytes32 kec;
|
|
|
|
|
|
|
|
constructor(bytes memory _data) {
|
|
|
|
data = _data;
|
|
|
|
|
|
|
|
kec = keccak256(data);
|
|
|
|
}
|
|
|
|
|
2020-12-28 18:49:10 +00:00
|
|
|
function check(bytes memory _data) public view {
|
2020-12-18 18:10:32 +00:00
|
|
|
bytes32 _kec = keccak256(data);
|
2020-12-28 18:49:10 +00:00
|
|
|
assert(_kec == kec); // should hold
|
|
|
|
assert(kec == keccak256(_data)); // should fail
|
2020-12-18 18:10:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function ext(D d) public {
|
|
|
|
d.d();
|
|
|
|
}
|
|
|
|
}
|
2020-12-28 18:49:10 +00:00
|
|
|
// ----
|
|
|
|
// Warning 1218: (335-366): CHC: Error trying to invoke SMT solver.
|
|
|
|
// Warning 6328: (335-366): CHC: Assertion violation might happen here.
|
|
|
|
// Warning 1218: (335-366): CHC: Error trying to invoke SMT solver.
|
|
|
|
// Warning 6328: (335-366): CHC: Assertion violation might happen here.
|
|
|
|
// Warning 4661: (335-366): BMC: Assertion violation happens here.
|