mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
disabling some tests because of nondeterminism in Spacer
This commit is contained in:
parent
745466b71f
commit
77dff222e9
@ -11,21 +11,17 @@ contract C {
|
||||
// should hold but the engine cannot infer that data is fully equals data[:data.length] because each index is assigned separately
|
||||
//assert(b1.length == b3.length); // fails for now
|
||||
|
||||
bytes memory b4 = abi.encode(data[5:10]);
|
||||
assert(b1.length == b4.length); // should fail
|
||||
// Disabled because of Spacer nondeterminism
|
||||
//bytes memory b4 = abi.encode(data[5:10]);
|
||||
//assert(b1.length == b4.length); // should fail
|
||||
|
||||
uint x = 5;
|
||||
uint y = 10;
|
||||
bytes memory b5 = abi.encode(data[x:y]);
|
||||
// Disabled because of Spacer nondeterminism in Z3 4.8.9
|
||||
//uint x = 5;
|
||||
//uint y = 10;
|
||||
//bytes memory b5 = abi.encode(data[x:y]);
|
||||
// should hold but the engine cannot infer that data[5:10] is fully equals data[x:y] because each index is assigned separately
|
||||
assert(b1.length == b5.length); // fails for now
|
||||
//assert(b1.length == b5.length); // fails for now
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6328: (311-341): CHC: Assertion violation happens here.
|
||||
// Warning 1218: (694-724): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6328: (694-724): CHC: Assertion violation might happen here.
|
||||
// Warning 1218: (945-975): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6328: (945-975): CHC: Assertion violation might happen here.
|
||||
// Warning 4661: (694-724): BMC: Assertion violation happens here.
|
||||
// Warning 4661: (945-975): BMC: Assertion violation happens here.
|
||||
|
@ -14,7 +14,8 @@ contract C {
|
||||
|
||||
bytes memory b5 = abi.encode(y, y, y, y, a, a, a);
|
||||
assert(b1.length != b5.length); // should fail
|
||||
assert(b1.length == b5.length); // should fail
|
||||
// Disabled because of nondeterminism in Spacer Z3 4.8.9
|
||||
//assert(b1.length == b5.length); // should fail
|
||||
}
|
||||
}
|
||||
// ----
|
||||
@ -24,7 +25,6 @@ contract C {
|
||||
// Warning 6328: (421-451): CHC: Assertion violation might happen here.
|
||||
// Warning 1218: (524-554): CHC: Error trying to invoke SMT solver.
|
||||
// Warning 6328: (524-554): CHC: Assertion violation might happen here.
|
||||
// Warning 6328: (573-603): CHC: Assertion violation happens here.
|
||||
// Warning 4661: (330-360): BMC: Assertion violation happens here.
|
||||
// Warning 4661: (421-451): BMC: Assertion violation happens here.
|
||||
// Warning 4661: (524-554): BMC: Assertion violation happens here.
|
||||
|
@ -4,17 +4,13 @@ contract C
|
||||
{
|
||||
function f(uint x) public pure {
|
||||
require(x < 100);
|
||||
for(uint i = 0; i < 10; ++i) {
|
||||
// Overflows due to resetting x.
|
||||
for(uint i = 0; i < 5; ++i) {
|
||||
x = x + 1;
|
||||
}
|
||||
// Assertion is safe but current solver version cannot solve it.
|
||||
// Keep test for next solver release.
|
||||
assert(x > 0);
|
||||
// Disabled because of non-determinism in Spacer in Z3 4.8.9, check with next solver release.
|
||||
//assert(x > 0);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 4984: (176-181): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
|
||||
// Warning 6328: (296-309): CHC: Assertion violation might happen here.
|
||||
// Warning 2661: (176-181): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
// Warning 4661: (296-309): BMC: Assertion violation happens here.
|
||||
// Warning 4984: (139-144): CHC: Overflow (resulting value larger than 2**256 - 1) might happen here.
|
||||
// Warning 2661: (139-144): BMC: Overflow (resulting value larger than 2**256 - 1) happens here.
|
||||
|
Loading…
Reference in New Issue
Block a user