Skip to content

Commit 42b2b34

Browse files
authored
Merge pull request diffblue#4453 from allredj/smt2-3rdparty-knownbugs
Add test passing status info for Z3 and CVC4
2 parents f45c69c + 9f47f8d commit 42b2b34

File tree

40 files changed

+237
-48
lines changed

40 files changed

+237
-48
lines changed

regression/smt2_strings/README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
Test Suite for SMT2 String Operations
22
=====================================
33

4-
The purpose of this suite is to test the level of string support of cbmc's smt2
4+
The purpose of this suite is to test the level of string support of CBMC's SMT2
55
backend.
66

7-
It can also be used to test the level of string support of any smt2 solver, by
7+
It can also be used to test the level of string support of any SMT2 solver, by
88
using a command such as:
99
```
10-
../test.pl -p -F -c <path_to_solver_binary>
10+
../test.pl -p -CKFT -c <path_to_solver_binary>
1111
```
1212

13-
(note the `-F` option to consider all tests tagged as "FUTURE").
13+
(note the `-CKFT` option to consider all testing levels ("CORE", "KNOWNBUG",
14+
"FUTURE", "THOROUGH"), as these are relevant to CBMC only.
1415

16+
More specifically, tests are tagged according to the expected support by the
17+
3rd party solver. The commands below will only run the tests where support is
18+
expected:
19+
20+
CVC4:
21+
```
22+
../test.pl -p -CKFT -X cvc4_bug -c <path_to_cvc4_binary>
23+
```
24+
Note: Most of the string operations are only supported when cvc4 is passed the
25+
`--strings-exp` option. For running the tests, suggest creating a script that
26+
calls cvc4 with `--strings-exp`, and pass the path to that script to the
27+
command above.
28+
29+
Z3:
30+
```
31+
../test.pl -p -CKFT -X z3_bug -c <path_to_z3_binary>
32+
```
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
indexof_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
Returns "unknown"
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
lex_order_const_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
str.< not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
lex_order_const_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
z3:
11+
str.< not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
lex_order_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
str.< not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
lex_order_input_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
z3:
11+
str.< not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
reflexive_lex_order_const_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
str.<= not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
reflexive_lex_order_const_sat2.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
str.<= not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
reflexive_lex_order_const_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
z3:
11+
str.<= not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
reflexive_lex_order_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
str.<= not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
reflexive_lex_order_input_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
z3:
11+
str.<= not supported
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE cvc4_bug
22
regexp_all_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
re.all not supported
12+
(cvc4 1.7-prerelease [git master e1dc3932])
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
regexp_concat_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
Returns "unknown"
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
FUTURE
1+
FUTURE cvc4_bug z3_bug
22
regexp_concat_input_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
Erroneously returns SAT.
12+
The obtained model is rubbish too, it assumes that
13+
"abc" matches "A"* + "ab"*
14+
(cvc4 1.7-prerelease [git master e1dc3932])
15+
16+
z3:
17+
Returns "unknown"
18+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
regexp_inter_const_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
z3:
11+
Erroneously returns "sat"
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
regexp_inter_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
Returns "unknown"
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1-
FUTURE
1+
FUTURE cvc4_bug z3_bug
22
regexp_inter_input_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
re.inter seems to not be constrained enough, as
12+
(assert (str.in.re "abc" (re.inter (str.to.re in1) (str.to.re in2))))
13+
allows a model where in1=="abc" and in2=="a".
14+
(cvc4 1.7-prerelease [git master e1dc3932])
15+
16+
z3:
17+
Returns "unknown"
18+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE cvc4_bug
22
regexp_loop_const_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
re.loop not supported
12+
(cvc4 1.7-prerelease [git master e1dc3932])
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE cvc4_bug
22
regexp_loop_const_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
re.loop not supported
12+
(cvc4 1.7-prerelease [git master e1dc3932])
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
FUTURE
1+
FUTURE cvc4_bug z3_bug
22
regexp_loop_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
re.loop not supported
12+
(cvc4 1.7-prerelease [git master e1dc3932])
13+
14+
z3:
15+
re.loop is only supported with constant bounds
16+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
FUTURE
1+
FUTURE cvc4_bug z3_bug
22
regexp_loop_input_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
re.loop not supported
12+
(cvc4 1.7-prerelease [git master e1dc3932])
13+
14+
z3:
15+
re.loop is only supported with constant bounds
16+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
regexp_opt_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
10+
z3:
11+
Returns "unknown"
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
regexp_plus_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
z3:
11+
Returns "unknown"
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
FUTURE
1+
FUTURE z3_bug
22
regexp_plus_input_unsat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^unsat$
77
--
88
error
9+
--
10+
z3:
11+
Returns "unknown"
12+
Z3 [version 4.8.3 - 64 bit]
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
FUTURE
1+
FUTURE cvc4_bug z3_bug
22
regexp_range_input_sat.smt2
33

44
^EXIT=0$
55
^SIGNAL=0$
66
^sat$
77
--
88
error
9+
--
10+
cvc4 (--strings-exp):
11+
re.range expects constant bounds
12+
(cvc4 1.7-prerelease [git master e1dc3932])
13+
14+
z3:
15+
Returns "unknown"
16+
Z3 [version 4.8.3 - 64 bit]

0 commit comments

Comments
 (0)