Skip to content

Commit 814e6a4

Browse files
committed
Bump z3 version to 4.6.0
1 parent 731e37d commit 814e6a4

File tree

2 files changed

+1
-108
lines changed

2 files changed

+1
-108
lines changed

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object ScalaZ3Build extends Build {
2323
lazy val jdkWinIncludePath = jdkIncludePath / "win32"
2424

2525
lazy val z3SourceRepo = "https://github.com/Z3Prover/z3.git"
26-
lazy val z3SourceTag = "z3-4.5.0"
26+
lazy val z3SourceTag = "z3-4.6.0"
2727

2828
lazy val osInf: String = Option(System.getProperty("os.name")).getOrElse("")
2929

src/main/scala/z3/scala/Z3Context.scala

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,14 +1042,6 @@ sealed class Z3Context(val config: Map[String, String]) {
10421042
}
10431043

10441044
// Parser interface
1045-
private def parseSMTLIB(file: Boolean, str: String) : Unit = {
1046-
if(file) {
1047-
Native.parseSmtlibFile(this.ptr, str, 0, null, null, 0, null, null)
1048-
} else {
1049-
Native.parseSmtlibString(this.ptr, str, 0, null, null, 0, null, null)
1050-
}
1051-
}
1052-
10531045
private def parseSMTLIB2(file: Boolean, str: String) : Z3AST = {
10541046
if(file) {
10551047
new Z3AST(Native.parseSmtlib2File(this.ptr, str, 0, null, null, 0, null, null), this)
@@ -1058,16 +1050,6 @@ sealed class Z3Context(val config: Map[String, String]) {
10581050
}
10591051
}
10601052

1061-
private def parseSMTLIB(file: Boolean, str: String, sorts: Map[Z3Symbol,Z3Sort], decls: Map[Z3Symbol,Z3FuncDecl]) : Unit = {
1062-
val (sortNames, z3Sorts) = sorts.unzip
1063-
val (declNames, z3Decls) = decls.unzip
1064-
if(file) {
1065-
Native.parseSmtlibFile(this.ptr, str, sorts.size, toPtrArray(sortNames), toPtrArray(z3Sorts), decls.size, toPtrArray(declNames), toPtrArray(z3Decls))
1066-
} else {
1067-
Native.parseSmtlibString(this.ptr, str, sorts.size, toPtrArray(sortNames), toPtrArray(z3Sorts), decls.size, toPtrArray(declNames), toPtrArray(z3Decls))
1068-
}
1069-
}
1070-
10711053
private def parseSMTLIB2(file: Boolean, str: String, sorts: Map[Z3Symbol,Z3Sort], decls: Map[Z3Symbol,Z3FuncDecl]) : Z3AST = {
10721054
val (sortNames, z3Sorts) = sorts.unzip
10731055
val (declNames, z3Decls) = decls.unzip
@@ -1078,26 +1060,6 @@ sealed class Z3Context(val config: Map[String, String]) {
10781060
}
10791061
}
10801062

1081-
/** Uses the SMT-LIB parser to read in a benchmark file.
1082-
* @see getSMTLIBFormulas, getSMTLIBAssumptions, getSMTLIBDecls, getSMTLIBSorts, getSMTLIBError
1083-
*/
1084-
def parseSMTLIBFile(fileName: String) : Unit = parseSMTLIB(true, fileName)
1085-
1086-
/** Uses the SMT-LIB parser to read in a benchmark string.
1087-
* @see getSMTLIBFormulas, getSMTLIBAssumptions, getSMTLIBDecls, getSMTLIBSorts, getSMTLIBError
1088-
*/
1089-
def parseSMTLIBString(str: String) : Unit = parseSMTLIB(false, str)
1090-
1091-
/** Uses the SMT-LIB parser to read in a benchmark file. The maps are used to override symbols that would otherwise be created by the parser.
1092-
* @see getSMTLIBFormulas, getSMTLIBAssumptions, getSMTLIBDecls, getSMTLIBSorts, getSMTLIBError
1093-
*/
1094-
def parseSMTLIBFile(fileName: String, sorts: Map[Z3Symbol,Z3Sort], decls: Map[Z3Symbol,Z3FuncDecl]) : Unit = parseSMTLIB(true, fileName, sorts, decls)
1095-
1096-
/** Uses the SMT-LIB parser to read in a benchmark string. The maps are used to override symbols that would otherwise be created by the parser.
1097-
* @see getSMTLIBFormulas, getSMTLIBAssumptions, getSMTLIBDecls, getSMTLIBSorts, getSMTLIBError
1098-
*/
1099-
def parseSMTLIBString(str: String, sorts: Map[Z3Symbol,Z3Sort], decls: Map[Z3Symbol,Z3FuncDecl]) : Unit = parseSMTLIB(false, str, sorts, decls)
1100-
11011063
/** Uses the SMT-LIB 2 parser to read in a benchmark file.
11021064
*/
11031065
def parseSMTLIB2File(fileName: String) : Z3AST = parseSMTLIB2(true, fileName)
@@ -1114,72 +1076,6 @@ sealed class Z3Context(val config: Map[String, String]) {
11141076
*/
11151077
def parseSMTLIB2String(str: String, sorts: Map[Z3Symbol,Z3Sort], decls: Map[Z3Symbol,Z3FuncDecl]) : Z3AST = parseSMTLIB2(false, str, sorts, decls)
11161078

1117-
/** Returns an iterator of the formulas created by the SMT-LIB parser. */
1118-
def getSMTLIBFormulas : Iterator[Z3AST] = {
1119-
val ctx = this
1120-
new Iterator[Z3AST] {
1121-
val total : Int = Native.getSmtlibNumFormulas(ctx.ptr)
1122-
var returned : Int = 0
1123-
1124-
override def hasNext : Boolean = (returned < total)
1125-
override def next() : Z3AST = {
1126-
val toReturn = new Z3AST(Native.getSmtlibFormula(ctx.ptr, returned), ctx)
1127-
returned += 1
1128-
toReturn
1129-
}
1130-
}
1131-
}
1132-
1133-
/** Returns an iterator of the assumptions created by the SMT-LIB parser. */
1134-
def getSMTLIBAssumptions : Iterator[Z3AST] = {
1135-
val ctx = this
1136-
new Iterator[Z3AST] {
1137-
val total : Int = Native.getSmtlibNumAssumptions(ctx.ptr)
1138-
var returned : Int = 0
1139-
1140-
override def hasNext : Boolean = (returned < total)
1141-
override def next() : Z3AST = {
1142-
val toReturn = new Z3AST(Native.getSmtlibAssumption(ctx.ptr, returned), ctx)
1143-
returned += 1
1144-
toReturn
1145-
}
1146-
}
1147-
}
1148-
1149-
/** Returns an iterator of the function and constant declarations created by the SMT-LIB parser. */
1150-
def getSMTLIBDecls : Iterator[Z3FuncDecl] = {
1151-
val ctx = this
1152-
new Iterator[Z3FuncDecl] {
1153-
val total : Int = Native.getSmtlibNumDecls(ctx.ptr)
1154-
var returned : Int = 0
1155-
1156-
override def hasNext : Boolean = (returned < total)
1157-
override def next() : Z3FuncDecl = {
1158-
val fdPtr = Native.getSmtlibDecl(ctx.ptr, returned)
1159-
val arity = Native.getDomainSize(ctx.ptr, fdPtr)
1160-
val toReturn = new Z3FuncDecl(Native.getSmtlibDecl(ctx.ptr, returned), arity, ctx)
1161-
returned += 1
1162-
toReturn
1163-
}
1164-
}
1165-
}
1166-
1167-
/** Returns an iterator of the sorts created by the SMT-LIB parser. */
1168-
def getSMTLIBSorts : Iterator[Z3Sort] = {
1169-
val ctx = this
1170-
new Iterator[Z3Sort] {
1171-
val total : Int = Native.getSmtlibNumSorts(ctx.ptr)
1172-
var returned : Int = 0
1173-
1174-
override def hasNext : Boolean = (returned < total)
1175-
override def next() : Z3Sort = {
1176-
val toReturn = new Z3Sort(Native.getSmtlibSort(ctx.ptr, returned), ctx)
1177-
returned += 1
1178-
toReturn
1179-
}
1180-
}
1181-
}
1182-
11831079
def substitute(ast : Z3AST, from : Array[Z3AST], to : Array[Z3AST]) : Z3AST = {
11841080
if (from.length != to.length)
11851081
throw new IllegalArgumentException("from and to must have the same length");
@@ -1247,7 +1143,4 @@ sealed class Z3Context(val config: Map[String, String]) {
12471143
def interrupt() = {
12481144
Native.interrupt(this.ptr)
12491145
}
1250-
1251-
/** Returns the last error issued by the SMT-LIB parser. */
1252-
def getSMTLIBError : String = Native.getSmtlibError(this.ptr)
12531146
}

0 commit comments

Comments
 (0)