summaryrefslogtreecommitdiff
path: root/src/prop/cryptominisat.cpp
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-07-30 15:24:55 -0700
committerGitHub <noreply@github.com>2018-07-30 15:24:55 -0700
commitcf97bbba5725abcb7a4085271719de8b1a832628 (patch)
treeb6a62fa6abef6aacc07e1d0ff25d71789d92f3f5 /src/prop/cryptominisat.cpp
parent46520451e7f6408c6caf3e52a15672732abc5911 (diff)
Add support for incremental eager bit-blasting. (#1838)
Eager incremental solving is achieved via solving under assumptions. As soon as incremental and eager bit-blasting is enabled, assertions are passed to the SAT solver as assumptions rather than assertions. This requires the eager SAT solver to support incremental solving, which is currently only supported by CryptoMiniSat.
Diffstat (limited to 'src/prop/cryptominisat.cpp')
-rw-r--r--src/prop/cryptominisat.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/prop/cryptominisat.cpp b/src/prop/cryptominisat.cpp
index 4f239343e..df5a20791 100644
--- a/src/prop/cryptominisat.cpp
+++ b/src/prop/cryptominisat.cpp
@@ -164,6 +164,18 @@ SatValue CryptoMinisatSolver::solve(long unsigned int& resource) {
return solve();
}
+SatValue CryptoMinisatSolver::solve(const std::vector<SatLiteral>& assumptions)
+{
+ TimerStat::CodeTimer codeTimer(d_statistics.d_solveTime);
+ std::vector<CMSat::Lit> assumpts;
+ for (const SatLiteral& lit : assumptions)
+ {
+ assumpts.push_back(toInternalLit(lit));
+ }
+ ++d_statistics.d_statCallsToSolve;
+ return toSatLiteralValue(d_solver->solve(&assumpts));
+}
+
SatValue CryptoMinisatSolver::value(SatLiteral l){
const std::vector<CMSat::lbool> model = d_solver->get_model();
CMSatVar var = l.getSatVariable();
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback