Skip to content

Commit 2236012

Browse files
author
Enrico Steffinlongo
committed
Add regression tests for ---dump-smt-formula arg
1 parent 5f936f5 commit 2236012

File tree

9 files changed

+81
-0
lines changed

9 files changed

+81
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
\(set-option :produce-models true\)
2+
\(set-logic ALL\)
3+
\(define-fun B0 \(\) Bool true\)
4+
\(declare-fun |main::1::x!0@1#1| \(\) \(_ BitVec 32\)\)
5+
\(define-fun B1 \(\) Bool \(= |main::1::x!0@1#1| |main::1::x!0@1#1|\)\)
6+
\(assert \(not \(not \(= |main::1::x!0@1#1| \(_ bv0 32\)\)\)\)\)
7+
\(define-fun B2 \(\) Bool \(not false\)\)
8+
\(assert B2\)
9+
\(check-sat\)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
test.c
3+
--incremental-smt2-solver 'cvc5 --lang=smtlib2.6 --incremental' --slice-formula --dump-smt-formula %out-file-name%
4+
Passing problem to incremental SMT2 solving via "cvc5 --lang=smtlib2.6 --incremental"
5+
\[main.assertion.\d+\] line \d+ Nondeterministic int assert.: FAILURE
6+
Output file matches.
7+
^EXIT=0$
8+
^SIGNAL=0$
9+
--
10+
Test to check that the --dump-smt-formula argument is used correctly and that the output file
11+
matches the rules defined in test-outfile-rules.txt
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
\(set-option :produce-models true\)
2+
\(set-logic ALL\)
3+
\(define-fun B0 \(\) Bool true\)
4+
\(define-fun B2 \(\) Bool \(not false\)\)
5+
\(check-sat\)
6+
\(assert B2\)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
test.c
3+
--incremental-smt2-solver 'cvc5 --lang=smtlib2.6 --incremental' --slice-formula --dump-smt-formula %out-file-name%
4+
Passing problem to incremental SMT2 solving via "cvc5 --lang=smtlib2.6 --incremental"
5+
\[main.assertion.\d+\] line \d+ Nondeterministic int assert.: FAILURE
6+
Output file does not match.
7+
^EXIT=1$
8+
^SIGNAL=0$
9+
--
10+
Test to check that the --dump-smt-formula argument is used correctly and that the output file does
11+
not match the rules defined in test-outfile-rules.txt
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
int main()
3+
{
4+
int x;
5+
__CPROVER_assert(x, "Nondeterministic int assert.");
6+
return 0;
7+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
\(set-option :produce-models true\)
2+
\(set-logic ALL\)
3+
\(define-fun B0 \(\) Bool true\)
4+
\(declare-fun |main::1::x!0@1#1| \(\) \(_ BitVec 32\)\)
5+
\(define-fun B1 \(\) Bool \(= |main::1::x!0@1#1| |main::1::x!0@1#1|\)\)
6+
\(assert \(not \(not \(= |main::1::x!0@1#1| \(_ bv0 32\)\)\)\)\)
7+
\(define-fun B2 \(\) Bool \(not false\)\)
8+
\(assert B2\)
9+
\(check-sat\)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
test.c
3+
--incremental-smt2-solver 'z3 --smt2 -in' --slice-formula --dump-smt-formula %out-file-name%
4+
Passing problem to incremental SMT2 solving via "z3 --smt2 -in"
5+
\[main.assertion.\d+\] line \d+ Nondeterministic int assert.: FAILURE
6+
Output file matches.
7+
^EXIT=0$
8+
^SIGNAL=0$
9+
--
10+
Test to check that the --dump-smt-formula argument is used correctly and that the output file
11+
matches the rules defined in test-outfile-rules.txt
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
\(set-option :produce-models true\)
2+
\(set-logic ALL\)
3+
\(define-fun B0 \(\) Bool true\)
4+
\(define-fun B2 \(\) Bool \(not false\)\)
5+
\(check-sat\)
6+
\(assert B2\)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
test.c
3+
--incremental-smt2-solver 'z3 --smt2 -in' --slice-formula --dump-smt-formula %out-file-name%
4+
Passing problem to incremental SMT2 solving via "z3 --smt2 -in"
5+
\[main.assertion.\d+\] line \d+ Nondeterministic int assert.: FAILURE
6+
Output file does not match.
7+
^EXIT=1$
8+
^SIGNAL=0$
9+
--
10+
Test to check that the --dump-smt-formula argument is used correctly and that the output file does
11+
not match the rules defined in test-outfile-rules.txt

0 commit comments

Comments
 (0)