Skip to content

Commit f2d4b80

Browse files
committed
- implemented support for BITWUZLA in Benchmark
1 parent 9d97dd2 commit f2d4b80

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/org/sosy_lab/java_smt/utils/ParseGenerateAndReparse.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ public static boolean checkNativeParseAndIsUnsat(Solvers solver, String smt2)
120120
switch (solver){
121121
case Z3: return nativeZ3ParseAndIsUnsat(smt2);
122122
case MATHSAT5: return nativeMathSatParseAndIsUnsat(smt2);
123+
case BITWUZLA: return nativeBitwuzlaParseAndIsUnsat(smt2);
123124
}
124125
throw new SolverException("Unsupported solver: " + solver);
125126
}
@@ -132,6 +133,13 @@ public static boolean nativeZ3ParseAndIsUnsat(String smt2) {
132133
return status == Status.UNSATISFIABLE;
133134
}
134135
}
136+
public static boolean nativeBitwuzlaParseAndIsUnsat(String smt2)
137+
throws InvalidConfigurationException, InterruptedException, SolverException {
138+
SolverContext bitwuz = SolverContextFactory.createSolverContext(Solvers.BITWUZLA);
139+
ProverEnvironment prover = bitwuz.newProverEnvironment(ProverOptions.GENERATE_MODELS);
140+
prover.addConstraint(bitwuz.getFormulaManager().parse(smt2));
141+
return prover.isUnsat();
142+
}
135143

136144
public static boolean nativeMathSatParseAndIsUnsat(String smt2)
137145
throws InvalidConfigurationException, InterruptedException, SolverException {

0 commit comments

Comments
 (0)