Skip to content

Commit cff730a

Browse files
regbromac
authored andcommitted
Remove hack for CVC4
CVC4 1.6 fixed the bug with multiple success on define-funs-rec so I remove that hack from the Interpreter. The CVC4Interpreter will only work with a recent version of CVC4 though, but I don't want to support multiple versions anyway. We can also drop some flags. Go around another CVC4 bug by removing some empty lines in set-source lines, see issue regb#31 for details.
1 parent 0a9cb2a commit cff730a

File tree

7 files changed

+6
-36
lines changed

7 files changed

+6
-36
lines changed

src/it/resources/regression/smtlib/solving/all/a20test0001.smt2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
(set-info :source |
44
Bit-vector benchmarks from Dawson Engler's tool contributed by Vijay Ganesh
55
([email protected]). Translated into SMT-LIB format by Clark Barrett using
6-
CVC3.
7-
8-
|)
6+
CVC3. |)
97
(set-info :smt-lib-version 2.0)
108
(set-info :category "industrial")
119
(set-info :status sat)

src/it/resources/regression/smtlib/solving/all/array_free.smt2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
(set-info :category "industrial")
66
(set-info :source |
77
Generated using using the Low-Level Bounded Model Checker LLBMC.
8-
C files used in the paper: Florian Merz, Stephan Falke, Carsten Sinz: LLBMC: Bounded Model Checking of C and C++ Programs Using a Compiler IR. VSTTE 2012: 146-161
9-
|)
8+
C files used in the paper: Florian Merz, Stephan Falke, Carsten Sinz: LLBMC: Bounded Model Checking of C and C++ Programs Using a Compiler IR. VSTTE 2012: 146-161 |)
109
(declare-fun initialMemoryState_0x228bd90 () (Array (_ BitVec 64) (_ BitVec 8)))
1110
(assert
1211
(let ((?x1 (_ bv0 8)))

src/it/resources/regression/smtlib/solving/all/b159test0001.smt2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
(set-info :source |
44
Bit-vector benchmarks from Dawson Engler's tool contributed by Vijay Ganesh
55
([email protected]). Translated into SMT-LIB format by Clark Barrett using
6-
CVC3.
7-
8-
|)
6+
CVC3. |)
97
(set-info :smt-lib-version 2.0)
108
(set-info :category "industrial")
119
(set-info :status sat)

src/it/resources/regression/smtlib/solving/all/bf7.smt2

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
(set-info :category "industrial")
66
(set-info :source |
77
Generated using using the Low-Level Bounded Model Checker LLBMC.
8-
C files used in the paper: Florian Merz, Stephan Falke, Carsten Sinz: LLBMC: Bounded Model Checking of C and C++ Programs Using a Compiler IR. VSTTE 2012: 146-161
9-
|)
8+
C files used in the paper: Florian Merz, Stephan Falke, Carsten Sinz: LLBMC: Bounded Model Checking of C and C++ Programs Using a Compiler IR. VSTTE 2012: 146-161 |)
109
(declare-fun initialMemoryState_0x1e97470 () (Array (_ BitVec 64) (_ BitVec 8)))
1110
(assert
1211
(let ((?x1 (_ bv0 32)))

src/it/resources/regression/smtlib/solving/all/broken.smt2

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
(set-info :source |
44
Bit-vector benchmarks from Dawson Engler's tool contributed by Vijay Ganesh
55
([email protected]). Translated into SMT-LIB format by Clark Barrett using
6-
CVC3.
7-
8-
|)
6+
CVC3. |)
97
(set-info :smt-lib-version 2.0)
108
(set-info :category "industrial")
119
(set-info :status sat)

src/it/scala/smtlib/it/TestHelpers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ trait TestHelpers {
6565
}
6666

6767
def executeCVC4(file: File)(f: (String) => Unit): Unit = {
68-
Seq("cvc4", "--lang", "smt", "--incremental", "--produce-models", file.getPath) ! ProcessLogger(f, s => ())
68+
Seq("cvc4", "--lang", "smt", file.getPath) ! ProcessLogger(f, s => ())
6969
}
7070

7171
}

src/main/scala/smtlib/interpreters/CVC4Interpreter.scala

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,6 @@ class CVC4Interpreter(executable: String, args: Array[String], tailPrinter: Bool
1313
in.flush
1414
parser.parseGenResponse
1515

16-
override def parseResponseOf(cmd: SExpr): SExpr = cmd match {
17-
case DefineFunsRec(funs, _) =>
18-
// CVC4 translates define-funs-rec in three commands per function,
19-
// and thus emits 3x success.
20-
val res = for (i <- 1 to funs.size*3) yield {
21-
parser.parseGenResponse
22-
}
23-
24-
res.find(_ != Success).getOrElse(Success)
25-
26-
case DefineFunRec(_) =>
27-
// CVC4 translates define-fun-rec in three commands,
28-
// and thus emits 3x success.
29-
val res = for (i <- 1 to 3) yield {
30-
parser.parseGenResponse
31-
}
32-
33-
res.find(_ != Success).getOrElse(Success)
34-
35-
case _ =>
36-
super.parseResponseOf(cmd)
37-
}
3816
}
3917

4018
object CVC4Interpreter {

0 commit comments

Comments
 (0)