mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add local vars to cex
This commit is contained in:
@@ -19,4 +19,4 @@ contract C {
|
||||
// ----
|
||||
// Warning 5740: (128-133): Unreachable code.
|
||||
// Warning 5740: (147-151): Unreachable code.
|
||||
// Warning 6328: (180-194): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()
|
||||
// Warning 6328: (180-194): CHC: Assertion violation happens here.\nCounterexample:\n\na = 1\n\nTransaction trace:\nC.constructor()\nC.f()
|
||||
|
||||
@@ -15,4 +15,4 @@ contract C {
|
||||
// ----
|
||||
// Warning 5740: (104-109): Unreachable code.
|
||||
// Warning 5740: (122-128): Unreachable code.
|
||||
// Warning 6328: (133-147): CHC: Assertion violation happens here.\nCounterexample:\n\n\nTransaction trace:\nC.constructor()\nC.f()
|
||||
// Warning 6328: (133-147): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\n\nTransaction trace:\nC.constructor()\nC.f()
|
||||
|
||||
@@ -9,4 +9,4 @@ contract C {
|
||||
// ====
|
||||
// SMTSolvers: z3
|
||||
// ----
|
||||
// Warning 6328: (136-150): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\n\nTransaction trace:\nC.constructor()\nC.f(0)
|
||||
// Warning 6328: (136-150): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\ny = 3\n\nTransaction trace:\nC.constructor()\nC.f(0)
|
||||
|
||||
@@ -11,4 +11,4 @@ contract C {
|
||||
// ====
|
||||
// SMTSolvers: z3
|
||||
// ----
|
||||
// Warning 6328: (167-181): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 10\n\nTransaction trace:\nC.constructor()\nC.f(10)
|
||||
// Warning 6328: (167-181): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 10\ny = 2\n\nTransaction trace:\nC.constructor()\nC.f(10)
|
||||
|
||||
@@ -13,6 +13,7 @@ contract C
|
||||
}
|
||||
// ====
|
||||
// SMTSolvers: z3
|
||||
// SMTIgnoreCex: yes
|
||||
// ----
|
||||
// Warning 5740: (120-123): Unreachable code.
|
||||
// Warning 6328: (131-145): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 3\n\nTransaction trace:\nC.constructor()\nC.f(3)
|
||||
// Warning 6328: (131-145): CHC: Assertion violation happens here.
|
||||
|
||||
+4
-3
@@ -8,12 +8,15 @@ contract LoopFor2 {
|
||||
b[0] = 900;
|
||||
uint[] memory a = b;
|
||||
uint i;
|
||||
// Disabled because of Spacer's nondeterminism.
|
||||
/*
|
||||
while (i < n) {
|
||||
// Accesses are safe but oob is reported due to potential aliasing after c's assignment.
|
||||
b[i] = i + 1;
|
||||
c[i] = b[i];
|
||||
++i;
|
||||
}
|
||||
*/
|
||||
// Removed because current Spacer seg faults in cex generation.
|
||||
//assert(b[0] == c[0]);
|
||||
// Removed because current Spacer seg faults in cex generation.
|
||||
@@ -27,6 +30,4 @@ contract LoopFor2 {
|
||||
// SMTSolvers: z3
|
||||
// ----
|
||||
// Warning 2072: (235-250): Unused local variable.
|
||||
// Warning 6368: (379-383): CHC: Out of bounds access happens here.
|
||||
// Warning 6368: (403-407): CHC: Out of bounds access happens here.
|
||||
// Warning 6368: (396-400): CHC: Out of bounds access happens here.
|
||||
// Warning 2072: (258-264): Unused local variable.
|
||||
|
||||
+3
-3
@@ -28,6 +28,6 @@ contract LoopFor2 {
|
||||
// Warning 6368: (321-325): CHC: Out of bounds access might happen here.
|
||||
// Warning 6368: (345-349): CHC: Out of bounds access might happen here.
|
||||
// Warning 6368: (338-342): CHC: Out of bounds access might happen here.
|
||||
// Warning 6368: (444-448): CHC: Out of bounds access happens here.\nCounterexample:\nb = [1, 0], c = [1, 0]\nn = 1\n\nTransaction trace:\nLoopFor2.constructor()\nState: b = [], c = []\nLoopFor2.p()\nState: b = [0], c = [0]\nLoopFor2.p()\nState: b = [0, 0], c = [0, 0]\nLoopFor2.testUnboundedForLoop(1)
|
||||
// Warning 6328: (437-456): CHC: Assertion violation happens here.\nCounterexample:\nb = [1, 0], c = [1, 0]\nn = 1\n\nTransaction trace:\nLoopFor2.constructor()\nState: b = [], c = []\nLoopFor2.p()\nState: b = [0], c = [0]\nLoopFor2.p()\nState: b = [0, 0], c = [0, 0]\nLoopFor2.testUnboundedForLoop(1)
|
||||
// Warning 6328: (460-479): CHC: Assertion violation happens here.\nCounterexample:\nb = [1, 0], c = [1, 0]\nn = 1\n\nTransaction trace:\nLoopFor2.constructor()\nState: b = [], c = []\nLoopFor2.p()\nState: b = [0], c = [0]\nLoopFor2.p()\nState: b = [0, 0], c = [0, 0]\nLoopFor2.testUnboundedForLoop(1)
|
||||
// Warning 6368: (444-448): CHC: Out of bounds access happens here.\nCounterexample:\nb = [1, 0], c = [1, 0]\nn = 1\na = []\ni = 1\n\nTransaction trace:\nLoopFor2.constructor()\nState: b = [], c = []\nLoopFor2.p()\nState: b = [0], c = [0]\nLoopFor2.p()\nState: b = [0, 0], c = [0, 0]\nLoopFor2.testUnboundedForLoop(1)
|
||||
// Warning 6328: (437-456): CHC: Assertion violation happens here.\nCounterexample:\nb = [1, 0], c = [1, 0]\nn = 1\ni = 1\n\nTransaction trace:\nLoopFor2.constructor()\nState: b = [], c = []\nLoopFor2.p()\nState: b = [0], c = [0]\nLoopFor2.p()\nState: b = [0, 0], c = [0, 0]\nLoopFor2.testUnboundedForLoop(1)
|
||||
// Warning 6328: (460-479): CHC: Assertion violation happens here.\nCounterexample:\nb = [1, 0], c = [1, 0]\nn = 1\ni = 1\n\nTransaction trace:\nLoopFor2.constructor()\nState: b = [], c = []\nLoopFor2.p()\nState: b = [0], c = [0]\nLoopFor2.p()\nState: b = [0, 0], c = [0, 0]\nLoopFor2.testUnboundedForLoop(1)
|
||||
|
||||
@@ -9,5 +9,6 @@ contract C {
|
||||
}
|
||||
// ====
|
||||
// SMTSolvers: z3
|
||||
// SMTIgnoreCex: yes
|
||||
// ----
|
||||
// Warning 6328: (187-201): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 3\n\nTransaction trace:\nC.constructor()\nC.f(3)
|
||||
// Warning 6328: (187-201): CHC: Assertion violation happens here.
|
||||
|
||||
Reference in New Issue
Block a user