#include <search_sat.h>
Inheritance diagram for CVCL::SearchSat:
Definition at line 46 of file search_sat.h.
|
Constructor.
Definition at line 594 of file search_sat.cpp. References d_cnfManager, d_coreSatAPI, d_decider, d_dpllt, d_theoryAPI, CVCL::TheoryCore::getTM(), CVCL::TheoryCore::registerCoreSatAPI(), SearchSatCoreSatAPI, SearchSatDecider, and SearchSatTheoryAPI. |
|
Destructor.
Definition at line 623 of file search_sat.cpp. References d_cnfManager, d_coreSatAPI, d_decider, d_dpllt, and d_theoryAPI. |
|
Tell DPLLT object to go back to state before last satisfiable check.
Definition at line 131 of file search_sat.h. References d_dpllt, and SAT::DPLLT::returnFromSat(). Referenced by CVCL::SearchSat::Restorer::notifyPre(). |
|
Core theory callback which adds a new lemma from the core theory.
Definition at line 75 of file search_sat.cpp. References SAT::CNF_Manager::addLemma(), SAT::CNF_Manager::concreteLit(), d_cnfManager, CVCL::SearchEngine::d_core, d_lastRegisteredVar, d_lemmas, d_rootLits, d_vars, CVCL::TheoryCore::getCM(), CVCL::ContextManager::getCurrentContext(), CVCL::Theorem::getExpr(), CVCL::Expr::isAbsAtomicFormula(), CVCL::Expr::isAbsLiteral(), CVCL::Expr::isNull(), SAT::CNF_Manager::numVars(), SAT::CD_CNF_Formula::numVars(), CVCL::CDList< T >::push_back(), CVCL::TheoryCore::registerAtom(), and SAT::Var::UNKNOWN. Referenced by CVCL::SearchSatCoreSatAPI::addLemma(). |
|
Core theory callback which asks for the bottom scope for current query.
Definition at line 137 of file search_sat.h. References d_bottomScope. Referenced by CVCL::SearchSatCoreSatAPI::getBottomScope(), and CVCL::SearchSat::Restorer::notifyPre(). |
|
Core theory callback which suggests a splitter.
Definition at line 102 of file search_sat.cpp. Referenced by CVCL::SearchSatCoreSatAPI::addSplitter(). |
|
DPLLT callback to inform theory that a literal has been assigned.
Definition at line 110 of file search_sat.cpp. References CVCL::TheoryCore::addFact(), CVCL::CommonProofRules::assumpRule(), SAT::CNF_Manager::concreteLit(), d_cnfManager, CVCL::SearchEngine::d_commonRules, CVCL::SearchEngine::d_core, d_inCheckSat, d_intAssumptions, CVCL::FALSE, SAT::Lit::getVar(), CVCL::Expr::isAbsLiteral(), CVCL::Expr::isIntAssumption(), CVCL::Expr::isNull(), SAT::Lit::isPositive(), CVCL::Expr::isUserAssumption(), CVCL::CDList< T >::push_back(), CVCL::Expr::setIntAssumption(), setValue(), and CVCL::TRUE. Referenced by CVCL::SearchSatTheoryAPI::assertLit(). |
|
DPLLT callback to ask if theory has detected inconsistency.
Referenced by CVCL::SearchSatTheoryAPI::checkConsistent(). |
|
DPLLT callback to get theory propagations.
Definition at line 145 of file search_sat.cpp. References d_cnfManager, CVCL::SearchEngine::d_core, d_inCheckSat, d_theorems, SAT::CNF_Manager::getCNFLit(), CVCL::Theorem::getExpr(), CVCL::TheoryCore::getImpliedLiteral(), getValue(), CVCL::CDMap< Key, Data, HashFcn >::insert(), SAT::Lit::isNull(), CVCL::Theorem::isNull(), CVCL::Expr::isUserRegisteredAtom(), SAT::Lit::reset(), CVCL::TRUE, and CVCL::Expr::unnegate(). Referenced by CVCL::SearchSatTheoryAPI::getImplication(). |
|
DPLLT callback to explain a theory propagation.
Referenced by CVCL::SearchSatTheoryAPI::getExplanation(). |
|
DPLLT callback to get more general theory clauses.
Definition at line 176 of file search_sat.cpp. References d_inCheckSat, d_lemmas, d_lemmasNext, and SAT::CD_CNF_Formula::numClauses(). Referenced by CVCL::SearchSatTheoryAPI::getNewClauses(). |
|
DPLLT callback to decide which literal to split on next.
Definition at line 188 of file search_sat.cpp. References CVCL::CDList< T >::begin(), d_inCheckSat, d_rootLits, CVCL::CDList< T >::end(), findSplitterRec(), and getValue(). Referenced by CVCL::SearchSatDecider::makeDecision(). |
|
Recursively traverse DAG looking for a splitter. Returns true if a splitter is found, false otherwise. The splitter is returned in lit (lit should be set to true). Nodes whose current value is fully justified are marked by calling setFlag to avoid searching them in the future. Definition at line 202 of file search_sat.cpp. References CVCL::AND, checkJustified(), SAT::CNF_Manager::concreteLit(), d_cnfManager, std::endl(), CVCL::FALSE, SAT::CNF_Manager::getFanin(), CVCL::Expr::getKind(), getValue(), SAT::Lit::getVar(), CVCL::IFF, CVCL::IMPLIES, CVCL::Expr::isAbsAtomicFormula(), SAT::Lit::isFalse(), SAT::Lit::isInverted(), SAT::Lit::isTrue(), SAT::Lit::isVar(), CVCL::ITE, SAT::CNF_Manager::numFanins(), CVCL::OR, setJustified(), CVCL::TRUE, UNKNOWN, and CVCL::XOR. Referenced by makeDecision(). |
|
Get the value of a CNF Literal.
Definition at line 167 of file search_sat.h. References d_vars, SAT::Var::FALSE, SAT::Lit::getVar(), SAT::Var::invertValue(), SAT::Lit::isFalse(), SAT::Lit::isInverted(), SAT::Lit::isTrue(), SAT::Lit::isVar(), and SAT::Var::TRUE. Referenced by findSplitterRec(), getImplication(), and makeDecision(). |
|
Set the value of a variable.
Definition at line 175 of file search_sat.h. References d_vars, and SAT::Var::isNull(). Referenced by assertLit(). |
|
Check whether this variable's value is justified.
Definition at line 181 of file search_sat.h. References SAT::CNF_Manager::concreteLit(), d_cnfManager, and CVCL::Expr::isJustified(). Referenced by findSplitterRec(). |
|
Mark this variable as justified.
Definition at line 185 of file search_sat.h. References SAT::CNF_Manager::concreteLit(), d_cnfManager, and CVCL::Expr::setJustified(). Referenced by findSplitterRec(). |
|
|
Name of this search engine.
Implements CVCL::SearchEngine. Definition at line 200 of file search_sat.h. References d_name. |
|
Register an atomic formula of interest. Registered atoms are tracked by the decision procedures. If one of them is deduced to be true or false, it is added to a list of implied literals. Implied literals can be retrieved with the getImpliedLiteral function Implements CVCL::SearchEngine. Definition at line 633 of file search_sat.cpp. References CVCL::SearchEngine::d_core, CVCL::TheoryCore::registerAtom(), and CVCL::Expr::setUserRegisteredAtom(). |
|
Return next literal implied by last assertion. Null Expr if none. Returned literals are either registered atomic formulas or their negation Implements CVCL::SearchEngine. Definition at line 640 of file search_sat.cpp. References CVCL::SearchEngine::d_core, d_nextImpliedLiteral, CVCL::Theorem::getExpr(), CVCL::TheoryCore::getImpliedLiteralByIndex(), CVCL::Expr::isUserRegisteredAtom(), and CVCL::Expr::unnegate(). |
|
Checks the validity of a formula in the current context. If the query is valid, it returns a theorem and the scope and context should be the same as when called. If the query is invalid, it returns a NULL theorem and the context will be one which falsifies the query. Implements CVCL::SearchEngine. Definition at line 203 of file search_sat.h. References check(). |
|
Reruns last check with e as an additional assumption. This method should only be called after a query which is invalid. Implements CVCL::SearchEngine. Definition at line 204 of file search_sat.h. References check(). |
|
Returns to context immediately before last call to checkValid. This method should only be called after a query which is invalid. Implements CVCL::SearchEngine. Definition at line 652 of file search_sat.cpp. References d_bottomScope, CVCL::SearchEngine::d_core, CVCL::TheoryCore::getCM(), CVCL::ContextManager::pop(), and CVCL::ContextManager::popto(). |
|
Returns the result of the most recent valid theorem. Returns Null Theorem if last call was not valid Implements CVCL::SearchEngine. Definition at line 206 of file search_sat.h. References d_lastValid. |
|
Generate and add an assumption to the set of assumptions in the current context. By default, the assumption is added at the current scope. The default can be overridden by specifying the scope parameter. Implements CVCL::SearchEngine. Definition at line 663 of file search_sat.cpp. References CVCL::TheoryCore::addFact(), CVCL::CommonProofRules::assumpRule(), CVCL::SearchEngine::d_commonRules, CVCL::SearchEngine::d_core, d_inCheckSat, d_userAssumptions, CVCL::TheoryCore::getCM(), CVCL::Theorem::getExpr(), CVCL::Expr::isAbsLiteral(), isAssumption(), CVCL::CDList< T >::push_back(), CVCL::ContextManager::scopeLevel(), and CVCL::Expr::setUserAssumption(). Referenced by CVCL::SearchSatCoreSatAPI::addAssumption(), and check(). |
|
Get all user assumptions made in this and all previous contexts. User assumptions are created either by calls to newUserAssumption or a call to checkValid. In the latter case, the negated query is added as an assumption.
Implements CVCL::SearchEngine. |
|
Get assumptions made internally in this and all previous contexts. Internal assumptions are literals assumed by the sat solver.
Implements CVCL::SearchEngine. |
|
Get all assumptions made in this and all previous contexts.
Implements CVCL::SearchEngine. |
|
Check if the formula has already been assumed previously.
Implements CVCL::SearchEngine. Definition at line 726 of file search_sat.cpp. References CVCL::Expr::isIntAssumption(), and CVCL::Expr::isUserAssumption(). Referenced by newUserAssumption(). |
|
Will return the set of assertions which make the queried formula false. This method should only be called after an invalid query It will try to return the simplest possible set of assertions which are sufficient to make the queried expression false.
Implements CVCL::SearchEngine. |
|
Returns the proof term for the last proven query. It should be called only after a valid query. In any other case, it returns Null. Implements CVCL::SearchEngine. Definition at line 741 of file search_sat.cpp. |
|
Helper class for resetting DPLLT engine. We need to be notified when the scope goes below the scope from which the last invalid call to checkValid originated. This helper class ensures that this happens. Definition at line 115 of file search_sat.h. |
|
Definition at line 133 of file search_sat.h. Referenced by SearchSat(). |
|
Definition at line 141 of file search_sat.h. Referenced by SearchSat(). |
|
Definition at line 153 of file search_sat.h. Referenced by SearchSat(). |
|
Name of search engine.
Definition at line 49 of file search_sat.h. Referenced by getName(). |
|
Bottom scope for current query.
Definition at line 52 of file search_sat.h. Referenced by check(), getBottomScope(), and returnFromCheck(). |
|
Last expr checked for validity.
Definition at line 55 of file search_sat.h. Referenced by check(). |
|
Theorem from the last successful checkValid call. It is used by getProof and getAssumptions.
Definition at line 59 of file search_sat.h. |
|
List of all user assumptions.
Definition at line 62 of file search_sat.h. Referenced by check(), and newUserAssumption(). |
|
List of all internal assumptions.
Definition at line 65 of file search_sat.h. Referenced by assertLit(). |
|
Index to where unprocessed assumptions start.
Definition at line 68 of file search_sat.h. Referenced by check(). |
|
Definition at line 70 of file search_sat.h. Referenced by SearchSat(), and ~SearchSat(). |
|
Pointer to DPLLT implementation.
Definition at line 73 of file search_sat.h. Referenced by check(), restoreDPLLT(), SearchSat(), and ~SearchSat(). |
|
Implementation of TheoryAPI for DPLLT.
Definition at line 76 of file search_sat.h. Referenced by SearchSat(), and ~SearchSat(). |
|
Implementation of Decider for DPLLT.
Definition at line 79 of file search_sat.h. Referenced by SearchSat(), and ~SearchSat(). |
|
Store of theorems for expressions sent to DPLLT.
Definition at line 82 of file search_sat.h. Referenced by getImplication(). |
|
Manages CNF formula and its relationship to original Exprs and Theorems.
Definition at line 85 of file search_sat.h. Referenced by addLemma(), assertLit(), check(), checkJustified(), findSplitterRec(), getImplication(), SearchSat(), setJustified(), and ~SearchSat(). |
|
Cached values of variables.
Definition at line 88 of file search_sat.h. Referenced by addLemma(), check(), getValue(), and setValue(). |
|
Whether we are currently in a call to dpllt->checkSat.
Definition at line 91 of file search_sat.h. Referenced by assertLit(), check(), getImplication(), getNewClauses(), makeDecision(), newUserAssumption(), and CVCL::SearchSat::Restorer::notifyPre(). |
|
CNF Formula used for theory lemmas.
Definition at line 94 of file search_sat.h. Referenced by addLemma(), check(), and getNewClauses(). |
|
Current position in d_lemmas.
Definition at line 97 of file search_sat.h. Referenced by check(), and getNewClauses(). |
|
Vector of CNF literals which represent Exprs with no fanouts.
Definition at line 100 of file search_sat.h. Referenced by addLemma(), check(), and makeDecision(). |
|
Last Var registered with core theory.
Definition at line 103 of file search_sat.h. Referenced by addLemma(), and check(). |
|
Whether it's OK to call DPLLT solver from the current scope.
Definition at line 106 of file search_sat.h. Referenced by check(). |
|
Definition at line 108 of file search_sat.h. Referenced by getImpliedLiteral(). |
|
Instance of Restorer class.
Definition at line 126 of file search_sat.h. |