Skip to content

Commit 53c744a

Browse files
committed
Add regression test for new error handling
Add a new regression test for error handling for z3 output that came from a Issue #5970
1 parent 2d33fde commit 53c744a

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

regression/cbmc/z3/Issue5970.c

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#include <assert.h>
2+
3+
void main()
4+
{
5+
unsigned A, x[64];
6+
// clang-format off
7+
__CPROVER_assume(0 <= A && A < 64);
8+
__CPROVER_assume(__CPROVER_forall { int i ; (0 <= i && i < A) ==> x[i] >= 1 });
9+
// clang-format on
10+
assert(x[0] > 0);
11+
}

regression/cbmc/z3/Issue5970.desc

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE smt-backend broken-cprover-smt-backend
2+
Issue5970.c
3+
--z3
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^\[main\.assertion\.1\] line 8 assertion x\[0\] > 0: FAILURE$
7+
--
8+
invalid get-value term, term must be ground and must not contain quantifiers
9+
^\[main\.assertion\.1\] line 8 assertion x\[0\] > 0: ERROR$
10+
--
11+
This tests that attempts to "(get-value |XXX|)" from z3 sat results
12+
are handled and do not cause an error message or ERROR result.

0 commit comments

Comments
 (0)