diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2018-07-30 15:24:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-30 15:24:55 -0700 |
commit | cf97bbba5725abcb7a4085271719de8b1a832628 (patch) | |
tree | b6a62fa6abef6aacc07e1d0ff25d71789d92f3f5 /src/prop/cryptominisat.cpp | |
parent | 46520451e7f6408c6caf3e52a15672732abc5911 (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.cpp | 12 |
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(); |