2020-12-18 18:10:32 +00:00
|
|
|
abstract contract D {
|
|
|
|
function d() virtual public {}
|
|
|
|
}
|
|
|
|
|
|
|
|
contract A {
|
|
|
|
int x = 0;
|
|
|
|
|
|
|
|
function f() virtual public view {
|
|
|
|
assert(x == 0); // should hold
|
|
|
|
assert(x == 1); // should fail
|
|
|
|
}
|
|
|
|
}
|
|
|
|
contract C is A {
|
|
|
|
constructor() {
|
|
|
|
x = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
function call(D d) public {
|
|
|
|
d.d();
|
|
|
|
}
|
|
|
|
|
|
|
|
function f() public view override {
|
|
|
|
assert(x == 1); // should hold
|
2021-08-23 09:30:12 +00:00
|
|
|
//Disabled because of Spacer nondeterminism.
|
|
|
|
//assert(x == 0); // should fail
|
2020-12-18 18:10:32 +00:00
|
|
|
}
|
|
|
|
}
|
2021-03-31 15:11:54 +00:00
|
|
|
// ====
|
|
|
|
// SMTEngine: all
|
2021-08-23 09:30:12 +00:00
|
|
|
// SMTIgnoreCex: yes
|
2021-10-06 09:53:03 +00:00
|
|
|
// SMTIgnoreInv: yes
|
|
|
|
// SMTIgnoreOS: macos
|
2020-12-18 18:10:32 +00:00
|
|
|
// ----
|
2021-08-23 09:30:12 +00:00
|
|
|
// Warning 6328: (154-168): CHC: Assertion violation happens here.
|
2023-02-09 16:07:13 +00:00
|
|
|
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
|