#include <cnf_manager.h>
Collaboration diagram for SAT::CNF_Manager:
Definition at line 46 of file cnf_manager.h.
|
Definition at line 41 of file cnf_manager.cpp. References createProofRules(), d_rules, and d_varInfo. |
|
Definition at line 55 of file cnf_manager.cpp. References d_rules. |
|
Definition at line 46 of file cnf_theorem_producer.cpp. Referenced by CNF_Manager(). |
|
Recursively translate e into cnf. A non-context dependent cache, d_cnfVars is used to remember translations of expressions. A context-dependent attribute, isTranslated, is used to remember whether an expression has been translated in the current context Definition at line 118 of file cnf_manager.cpp. References SAT::CNF_Formula::addLiteral(), CVCL::AND, CVCL::Expr::begin(), d_bottomScope, d_cnfVars, d_translateQueueThms, d_translateQueueVars, d_varInfo, CVCL::Expr::end(), CVCL::ExprMap< Data >::end(), CVCL::ExprMap< Data >::find(), getCNFLit(), SAT::Lit::getFalse(), CVCL::Expr::getKind(), CVCL::Theorem::getRHS(), SAT::Lit::getTrue(), SAT::Lit::getVar(), CVCL::IFF, CVCL::IMPLIES, CVCL::Expr::isAbsAtomicFormula(), CVCL::Expr::isFalse(), CVCL::Expr::isNot(), SAT::Lit::isNull(), CVCL::Expr::isTranslated(), CVCL::Expr::isTrue(), SAT::Lit::isVar(), CVCL::ITE, SAT::CNF_Formula::newClause(), CVCL::OR, replaceITErec(), CVCL::Expr::setTranslated(), and CVCL::XOR. Referenced by translateExpr(). |
|
Recursively traverse an expression with an embedded term ITE. Term ITE's are handled by introducing a skolem variable for the ITE term and then adding new constraints describing the ITE in terms of the new variable. Definition at line 61 of file cnf_manager.cpp. References CVCL::Expr::begin(), d_commonRules, d_iteMap, d_rules, d_translateQueueFlags, d_translateQueueThms, d_translateQueueVars, CVCL::Expr::end(), CVCL::ExprMap< Data >::end(), CVCL::ExprMap< Data >::find(), CVCL::Theorem::getExpr(), CVCL::Expr::getKind(), CVCL::Theorem::getLHS(), CVCL::Theorem::getRHS(), CVCL::Expr::getType(), CVCL::CommonProofRules::iffMP(), CVCL::CNF_Rules::ifLiftRule(), CVCL::Expr::isAtomic(), CVCL::Type::isBool(), CVCL::ITE, CVCL::CommonProofRules::reflexivityRule(), CVCL::CommonProofRules::substitutivityRule(), CVCL::CommonProofRules::symmetryRule(), and CVCL::CommonProofRules::varIntroSkolem(). Referenced by translateExprRec(). |
|
Recursively translate e into cnf. Call translateExprRec. If additional expressions are queued up, translate them too, until none are left. Definition at line 322 of file cnf_manager.cpp. References SAT::CNF_Formula::addLiteral(), d_clauseIdNext, d_theorems, d_translateQueueFlags, d_translateQueueThms, d_translateQueueVars, d_varInfo, SAT::CNF_Formula::getCurrentClause(), CVCL::Theorem::getExpr(), SAT::Lit::getVar(), CVCL::CDMap< Key, Data, HashFcn >::insert(), SAT::CNF_Formula::newClause(), SAT::CNF_Formula::registerUnit(), SAT::Clause::setId(), and translateExprRec(). Referenced by addAssumption(), and addLemma(). |
|
Set scope for translation.
Definition at line 128 of file cnf_manager.h. References d_bottomScope. Referenced by CVCL::SearchSat::check(). |
|
Return the number of variables being managed.
Definition at line 131 of file cnf_manager.h. References d_varInfo. Referenced by CVCL::SearchSat::addLemma(), and CVCL::SearchSat::check(). |
|
Return number of fanins for CNF node c. A CNF node x is a fanin of CNF node y if the expr for x is a child of the expr for y or if y is an ITE leaf and x is a new CNF node obtained by translating the ITE leaf y.
Definition at line 139 of file cnf_manager.h. References d_varInfo, SAT::Lit::getVar(), and SAT::Lit::isVar(). Referenced by CVCL::SearchSat::findSplitterRec(), and getFanin(). |
|
Returns the ith fanin of c.
Definition at line 147 of file cnf_manager.h. References d_varInfo, SAT::Lit::getVar(), and numFanins(). Referenced by CVCL::SearchSat::findSplitterRec(). |
|
Return number of fanins for c. x is a fanout of y if y is a fanin of x
Definition at line 156 of file cnf_manager.h. References d_varInfo, SAT::Lit::getVar(), and SAT::Lit::isVar(). Referenced by getFanout(). |
|
Returns the ith fanout of c.
Definition at line 164 of file cnf_manager.h. References d_varInfo, SAT::Lit::getVar(), and numFanouts(). |
|
Convert a CNF literal to an Expr literal. Returns a NULL Expr if there is no corresponding Expr for l Definition at line 172 of file cnf_manager.h. References d_varInfo, SAT::Lit::getVar(), SAT::Lit::isNull(), and SAT::Lit::isPositive(). Referenced by CVCL::SearchSat::addLemma(), CVCL::SearchSat::assertLit(), CVCL::SearchSat::check(), CVCL::SearchSat::checkJustified(), CVCL::SearchSat::findSplitterRec(), and CVCL::SearchSat::setJustified(). |
|
Look up the CNF literal for an Expr. Returns a NULL Lit if there is no corresponding CNF literal for e Definition at line 184 of file cnf_manager.h. References d_cnfVars, CVCL::ExprMap< Data >::end(), CVCL::ExprMap< Data >::find(), SAT::Lit::getFalse(), SAT::Lit::getTrue(), CVCL::Expr::isFalse(), CVCL::Expr::isNot(), CVCL::Expr::isTranslated(), and CVCL::Expr::isTrue(). Referenced by convertLemma(), CVCL::SearchSat::getImplication(), and translateExprRec(). |
|
Convert thm A |- B (A is a set of literals) into a clause ~A \/ B. c should be an empty clause that will be filled with the result Definition at line 352 of file cnf_manager.cpp. References SAT::Clause::addLiteral(), CVCL::Expr::begin(), d_clauseIdNext, d_rules, d_theorems, CVCL::Expr::end(), getCNFLit(), CVCL::Theorem::getExpr(), CVCL::CDMap< Key, Data, HashFcn >::insert(), SAT::Lit::isNull(), CVCL::Expr::isOr(), CVCL::CNF_Rules::learnedClause(), SAT::Clause::setId(), SAT::Clause::setUnit(), and SAT::Clause::size(). |
|
Given thm of form A |- B, convert B to CNF and add it to cnf. Returns Lit corresponding to the root of the expression that was translated. Definition at line 377 of file cnf_manager.cpp. References SAT::CNF_Formula::addLiteral(), d_clauseIdNext, d_theorems, SAT::CNF_Formula::getCurrentClause(), CVCL::Theorem::getExpr(), SAT::CNF_Formula::newClause(), SAT::CNF_Formula::registerUnit(), SAT::Clause::setId(), and translateExpr(). Referenced by CVCL::SearchSat::check(). |
|
Convert thm to CNF and add it to the current formula.
Definition at line 392 of file cnf_manager.cpp. References SAT::CNF_Formula::addLiteral(), d_clauseIdNext, d_rules, d_theorems, SAT::CNF_Formula::getCurrentClause(), CVCL::Theorem::getExpr(), CVCL::CDMap< Key, Data, HashFcn >::insert(), CVCL::CNF_Rules::learnedClause(), SAT::CNF_Formula::newClause(), SAT::CNF_Formula::registerUnit(), SAT::Clause::setId(), and translateExpr(). Referenced by CVCL::SearchSat::addLemma(). |
|
Common proof rules.
Definition at line 49 of file cnf_manager.h. Referenced by replaceITErec(). |
|
Rules for manipulating CNF.
Definition at line 52 of file cnf_manager.h. Referenced by addLemma(), CNF_Manager(), convertLemma(), replaceITErec(), and ~CNF_Manager(). |
|
vector that maps a variable index to information for that variable
Definition at line 62 of file cnf_manager.h. Referenced by CNF_Manager(), concreteLit(), getFanin(), getFanout(), numFanins(), numFanouts(), numVars(), translateExpr(), and translateExprRec(). |
|
Map from Exprs to Vars representing those Exprs.
Definition at line 65 of file cnf_manager.h. Referenced by getCNFLit(), and translateExprRec(). |
|
Cached translation of term-ite-containing expressions.
Definition at line 68 of file cnf_manager.h. Referenced by replaceITErec(). |
|
Maps a clause id to the theorem justifying that clause. Note that clauses created by simple CNF translation are not given id's. This is because theorems for these clauses can be created lazily later. Definition at line 73 of file cnf_manager.h. Referenced by addAssumption(), addLemma(), convertLemma(), and translateExpr(). |
|
Next clause id.
Definition at line 76 of file cnf_manager.h. Referenced by addAssumption(), addLemma(), convertLemma(), and translateExpr(). |
|
Bottom scope in which translation is valid.
Definition at line 82 of file cnf_manager.h. Referenced by setBottomScope(), and translateExprRec(). |
|
Queue of theorems to translate.
Definition at line 85 of file cnf_manager.h. Referenced by replaceITErec(), translateExpr(), and translateExprRec(). |
|
Queue of fanouts corresponding to thms to translate.
Definition at line 88 of file cnf_manager.h. Referenced by replaceITErec(), translateExpr(), and translateExprRec(). |
|
Whether thm to translate is "translate only".
Definition at line 91 of file cnf_manager.h. Referenced by replaceITErec(), and translateExpr(). |