SatValue CryptoMinisatSolver::value(SatLiteral l){ const std::vector<CMSat::lbool> model = d_solver->get_model(); CMSatVar var = l.getSatVariable(); Assert (var < model.size()); CMSat::lbool value = model[var]; return toSatLiteralValue(value); }
SatValue BVMinisatSatSolver::solve(long unsigned int& resource){ Trace("limit") << "MinisatSatSolver::solve(): have limit of " << resource << " conflicts" << std::endl; ++d_statistics.d_statCallsToSolve; if(resource == 0) { d_minisat->budgetOff(); } else { d_minisat->setConfBudget(resource); } // BVMinisat::vec<BVMinisat::Lit> empty; unsigned long conflictsBefore = d_minisat->conflicts; SatValue result = toSatLiteralValue(d_minisat->solveLimited()); d_minisat->clearInterrupt(); resource = d_minisat->conflicts - conflictsBefore; Trace("limit") << "<MinisatSatSolver::solve(): it took " << resource << " conflicts" << std::endl; return result; }
SatValue BVMinisatSatSolver::assertAssumption(SatLiteral lit, bool propagate) { d_assertionsCount ++; d_assertionsRealCount = d_assertionsRealCount + 1; return toSatLiteralValue(d_minisat->assertAssumption(toMinisatLit(lit), propagate)); }
SatValue BVMinisatSatSolver::propagate() { return toSatLiteralValue(d_minisat->propagateAssumptions()); }
SatValue BVMinisatSatSolver::modelValue(SatLiteral l){ return toSatLiteralValue(d_minisat->modelValue(toMinisatLit(l))); }
SatValue BVMinisatSatSolver::solve(){ ++d_statistics.d_statCallsToSolve; return toSatLiteralValue(d_minisat->solve()); }
SatValue CryptoMinisatSolver::solve(){ TimerStat::CodeTimer codeTimer(d_statistics.d_solveTime); ++d_statistics.d_statCallsToSolve; return toSatLiteralValue(d_solver->solve()); }