2020-05-28 11:05:56 +00:00
|
|
|
pragma experimental SMTChecker;
|
|
|
|
|
|
|
|
contract C {
|
|
|
|
uint[] a;
|
|
|
|
uint[][] b;
|
|
|
|
function f(uint x, uint y, uint v) public {
|
|
|
|
a[x] = v;
|
|
|
|
delete a;
|
|
|
|
assert(a[y] == 0);
|
|
|
|
}
|
|
|
|
function g(uint x, uint y, uint v) public {
|
|
|
|
b[x][y] = v;
|
|
|
|
delete b;
|
|
|
|
assert(b[y][x] == 0);
|
|
|
|
}
|
|
|
|
function h(uint x, uint y, uint v) public {
|
|
|
|
b[x][y] = v;
|
|
|
|
delete b[x];
|
|
|
|
// Not necessarily the case.
|
2020-10-13 16:48:59 +00:00
|
|
|
// Removed because current Spacer seg faults in cex generation.
|
|
|
|
//assert(b[y][x] == 0);
|
2020-05-28 11:05:56 +00:00
|
|
|
}
|
|
|
|
function i(uint x, uint y, uint v) public {
|
|
|
|
b[x][y] = v;
|
|
|
|
delete b[y];
|
|
|
|
assert(b[y][x] == 0);
|
|
|
|
}
|
|
|
|
function j(uint x, uint y, uint z, uint v) public {
|
|
|
|
b[x][y] = v;
|
|
|
|
delete b[z];
|
|
|
|
// Not necessarily the case.
|
|
|
|
assert(b[y][x] == 0);
|
|
|
|
}
|
|
|
|
function setA(uint x, uint y) public {
|
|
|
|
a[x] = y;
|
|
|
|
}
|
|
|
|
function setB(uint x, uint y, uint z) public {
|
|
|
|
b[x][y] = z;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-10-13 16:48:59 +00:00
|
|
|
// Warning 6328: (685-705): CHC: Assertion violation happens here.
|