SMTChecker: Bring back counterexample checks in regression tests

Since the default is now to ignore the counterexamples when checking
test output, we bring back counterexample checks in tests where the
counterexample is (mostly) deterministic.
This commit is contained in:
Martin Blicha
2023-07-25 12:26:21 +02:00
parent 2e38798408
commit cdfc19b503
56 changed files with 147 additions and 57 deletions
@@ -11,5 +11,6 @@ contract C
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (129-142): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\n\nTransaction trace:\nC.constructor()\nC.g()\n C.h(0) -- internal call
@@ -15,5 +15,6 @@ contract C
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (197-210): CHC: Assertion violation happens here.\nCounterexample:\n\nx = 0\n\nTransaction trace:\nC.constructor()\nC.g()\n C.h(0) -- internal call\n C.k(0) -- internal call
@@ -17,7 +17,7 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: yes
// SMTIgnoreCex: no
// ----
// Warning 6328: (242-256): CHC: Assertion violation happens here.
// Warning 6328: (242-256): CHC: Assertion violation happens here.\nCounterexample:\na = [[], [], [0, 0, 0, 0]]\ny = 0\n\nTransaction trace:\nC.constructor()\nState: a = [[], [], [0, 0, 0, 0]]\nC.f()
// Info 1391: CHC: 7 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -18,6 +18,7 @@ contract D {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (267-281): CHC: Assertion violation happens here.
// Warning 6328: (267-281): CHC: Assertion violation happens here.\nCounterexample:\nitems = [{x: 42, y: 43}]\na = 42\nb = 43\n\nTransaction trace:\nD.constructor()\nState: items = []\nD.test()
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -9,6 +9,7 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (142-156): CHC: Assertion violation happens here.
// Warning 6328: (142-156): CHC: Assertion violation happens here.\nCounterexample:\n\ny = 0\n\nTransaction trace:\nC.constructor()\nC.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -9,6 +9,7 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (166-180): CHC: Assertion violation happens here.
// Warning 6328: (166-180): CHC: Assertion violation happens here.\nCounterexample:\n\ny = 0\n\nTransaction trace:\nC.constructor()\nC.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -26,6 +26,7 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (338-355): CHC: Assertion violation happens here.
// Warning 6328: (338-355): CHC: Assertion violation happens here.\nCounterexample:\ns = {x: 0, t: {t: 0}, b: false, a: []}\ny = 0\nc = false\nt = {t: 0}\n\nTransaction trace:\nC.constructor()\nState: s = {x: 0, t: {t: 0}, b: false, a: []}\nC.f()
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -16,6 +16,7 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (175-189): CHC: Assertion violation happens here.
// Warning 6328: (175-189): CHC: Assertion violation happens here.\nCounterexample:\ns = {a: [0, 0], u: 0}\nu = 0\n\nTransaction trace:\nC.constructor()\nState: s = {a: [0, 0], u: 0}\nC.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -27,7 +27,8 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (255-272): CHC: Assertion violation happens here.
// Warning 6328: (377-391): CHC: Assertion violation happens here.
// Warning 6328: (255-272): CHC: Assertion violation happens here.\nCounterexample:\ns = {x: 1, b: false}\nx = 1\nb = false\ny = 0\nc = false\n\nTransaction trace:\nC.constructor()\nState: s = {x: 1, b: false}\nC.f()
// Warning 6328: (377-391): CHC: Assertion violation happens here.\nCounterexample:\ns = {x: 42, b: false}\nx = 1\nb = false\ny = 42\nc = false\n\nTransaction trace:\nC.constructor()\nState: s = {x: 1, b: false}\nC.f()
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -9,6 +9,7 @@ contract C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (114-128): CHC: Assertion violation happens here.
// Warning 6328: (114-128): CHC: Assertion violation happens here.\nCounterexample:\nx = 0\ny = 0\n\nTransaction trace:\nC.constructor()\nState: x = 0\nC.f()
// Info 1391: CHC: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
@@ -28,7 +28,8 @@ contract D is C {
}
// ====
// SMTEngine: all
// SMTIgnoreCex: no
// ----
// Warning 6328: (205-219): CHC: Assertion violation happens here.
// Warning 6328: (328-342): CHC: Assertion violation happens here.
// Warning 6328: (205-219): CHC: Assertion violation happens here.\nCounterexample:\nx = 2\n\nTransaction trace:\nC.constructor()\nState: x = 0\nA.proxy()\n C.f() -- internal call\n A.f() -- internal call
// Warning 6328: (328-342): CHC: Assertion violation happens here.\nCounterexample:\nx = 2\n\nTransaction trace:\nD.constructor()\nState: x = 0\nA.proxy()\n D.f() -- internal call\n C.f() -- internal call\n A.f() -- internal call
// Info 1391: CHC: 2 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.