Skip to content

Commit 8067e1b

Browse files
committed
Add test of trace output when using incremental SMT2 solving
1 parent df45c39 commit 8067e1b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
int main()
3+
{
4+
int x, y;
5+
if(x != 0)
6+
__CPROVER_assert(y != 4, "Assert of inequality to 4.");
7+
else
8+
__CPROVER_assert(y != 2, "Assert of inequality to 2.");
9+
int z = y;
10+
return 0;
11+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
CORE winbug
2+
trace.c
3+
--incremental-smt2-solver "z3 --smt2 -in" --trace
4+
Passing problem to incremental SMT2 solving via "z3 --smt2 -in"
5+
Assert of inequality to 4\.: FAILURE
6+
Assert of inequality to 2\.: FAILURE
7+
y=4
8+
y=2
9+
VERIFICATION FAILED
10+
^EXIT=10$
11+
^SIGNAL=0$
12+
--
13+
type: pointer
14+
--
15+
Test that running cbmc with the `--incremental-smt2-solver` argument can be used
16+
to send a valid SMT2 formula to a sub-process solver for an example input file
17+
which include control flow constructs.

0 commit comments

Comments
 (0)