Skip to content

Commit 0889b84

Browse files
committed
Add regression test for SMT2 solver returning unsat
To confirm that this case works end-to-end
1 parent 5a18428 commit 0889b84

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
int main()
3+
{
4+
int x;
5+
int y;
6+
if(y)
7+
y = x;
8+
else
9+
y = x;
10+
__CPROVER_assert(y == x, "Nondeterministic int assert.");
11+
return 0;
12+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
CORE winbug
2+
valid_unsat.c
3+
--incremental-smt2-solver "z3 --smt2 -in" --verbosity 10
4+
Passing problem to incremental SMT2 solving via "z3 --smt2 -in"
5+
Sending command to SMT2 solver - \(check-sat\)
6+
Solver response - unsat
7+
VERIFICATION SUCCESSFUL
8+
^EXIT=0$
9+
^SIGNAL=0$
10+
--
11+
type: pointer
12+
--
13+
Test that given a `.c` program where all assertions hold, the solver responds
14+
with unsat and CBMC reports that verification is successful.

0 commit comments

Comments
 (0)