Classes | Functions | Variables | Friends

Fast Search Engine

Search Engine
Collaboration diagram for Fast Search Engine:





Processing a Conflict

Detailed Description

This module includes all the components of the fast search engine.

Function Documentation

vector< std::pair< Clause, int > > & SearchEngineFast::wp ( const Literal literal) [private, inherited]

Return a ref to the vector of watched literals. If no such vector exists, create it.

This function is normally used when the value of 'literal' becomes false. The vector contains pointers to all clauses where this literal occurs, and therefore, these clauses may cause unit propagation. In any case, the watch pointers in these clauses need to be updated.

Definition at line 136 of file search_fast.cpp.

References CVC3::Literal::wp().

Referenced by CVC3::SearchEngineFast::addNewClause(), CVC3::SearchEngineFast::analyzeUIPs(), CVC3::SearchEngineFast::bcp(), and CVC3::SearchEngineFast::propagate().

QueryResult SearchEngineFast::checkSAT ( ) [private, inherited]
bool SearchEngineFast::split ( ) [private, inherited]
Expr SearchEngineFast::findSplitter ( ) [private, inherited]
void SearchEngineFast::clearLiterals ( ) [private, inherited]

Clear the list of asserted literals (d_literals)

Definition at line 631 of file search_fast.cpp.

References CVC3::SearchEngineFast::d_literals, and TRACE_MSG.

Referenced by CVC3::SearchEngineFast::bcp(), CVC3::SearchEngineFast::checkValidMain(), and CVC3::SearchEngineFast::fixConflict().

void SearchEngineFast::updateLitScores ( bool  firstTime) [private, inherited]

Recompute the scores for all known literals. This is a relatively expensive procedure, so it should not be called too often. Currently, it is called once per 100 splitters.

Definition at line 345 of file search_fast.cpp.

References CVC3::Literal::added(), compareLits(), CVC3::Literal::count(), CVC3::Literal::countPrev(), DebugAssert, followChaff, CVC3::int2string(), CVC3::Literal::score(), CVC3::Literal::toString(), and TRACE.

Referenced by CVC3::SearchEngineFast::findSplitter().

void SearchEngineFast::updateLitCounts ( const Clause c) [private, inherited]
bool SearchEngineFast::bcp ( ) [private, inherited]

Boolean constraint propagation.

Preconditions: On every run besides the first, the CNF clause database must not have any unit or unsat clauses, and there must be a literal queued up for processing. The current context must be consistent. Any and all assertions and assignments must actually be made within the bcp loop. Other parts of the solver may queue new facts with addLiteralFact() and addNonLiteralFact(). bcp() will either process them, or it will find a conflict, in which case they will no longer be valid and will be dumped. Any nonLiterals must already be simplified.

Description: BCP will systematically work through all the literals and nonliterals, using boolean constraint propagation by detecting unit clauses and using addLiteralFact() on the unit literal while also marking the clause as SAT. Any clauses marked SAT are guaranteed to be SAT, but clauses not marked SAT are not guaranteed to be unsat.

false if a conflict is found, true otherwise.

Postconditions: False indicates conflict. If the conflict was discovered in CNF, we call the proof rule, then store that clause pointer so fixConflict() can skip over it during the search (when we finally change dependency tracking).

True indicates success. All literals and nonLiterals have been processed without causing a conflict. Processing nonliterals implies running simplify on them, immediately asserting any simplifications back to the core, and marking the original nonLiteral as simplified, to be ignored by all future (this context or deeper) splitters and bcp runs. Therefore, there will be no unsimplified nonliterals remaining.

Definition at line 637 of file search_fast.cpp.

References CVC3::SearchEngineFast::clearFacts(), CVC3::SearchEngineFast::clearLiterals(), CVC3::SearchEngineFast::commitFacts(), CVC3::SearchEngineFast::d_circuitsByExpr, CVC3::SearchEngine::d_commonRules, CVC3::SearchEngineFast::d_conflictTheorem, CVC3::SearchEngine::d_core, CVC3::SearchEngineFast::d_factQueue, CVC3::SearchEngineFast::d_literals, CVC3::SearchEngineFast::d_litsAlive, CVC3::SearchEngineFast::d_nonLiterals, DebugAssert, CVC3::Clause::deleted(), CVC3::SearchEngineFast::enqueueFact(), CVC3::Theorem::getExpr(), CVC3::Literal::getExpr(), CVC3::TheoryCore::getFlags(), CVC3::Literal::getValue(), IF_DEBUG, CVC3::TheoryCore::inconsistent(), CVC3::TheoryCore::inconsistentThm(), CVC3::int2string(), CVC3::Expr::isAbsLiteral(), CVC3::Expr::isExists(), CVC3::Expr::isFalse(), CVC3::Expr::isTrue(), CVC3::SearchEngineFast::propagate(), CVC3::CDList< T >::push_back(), CVC3::Clause::sat(), CVC3::SearchImplBase::scopeLevel(), CVC3::SearchEngineFast::setInconsistent(), CVC3::SearchImplBase::simplify(), CVC3::CDList< T >::size(), CVC3::CommonProofRules::skolemize(), CVC3::Literal::toString(), TRACE, TRACE_MSG, CVC3::Clause::watched(), and CVC3::SearchEngineFast::wp().

Referenced by CVC3::SearchEngineFast::addLiteralFact(), CVC3::SearchEngineFast::checkSAT(), and CVC3::SearchEngineFast::split().

bool SearchEngineFast::fixConflict ( ) [private, inherited]

Determines backtracking level and adds conflict clauses.

Preconditions: The current context is inconsistent. If it resulted from a conflictRule() application, then the theorem is stored inside d_lastConflictTheorem.

If this was caused from bcp, we obtain the conflictRule() theorem from the d_lastConflictTheorem instance variable. From here we build conflict clauses and determine the correct backtracking level, at which point we actually backtrack there. Finally, we also call addLiteralFact() on the "failure driven assertion" literal so that bcp has some place to begin (and it satisfies the bcp preconditions)

Postconditions: If True is returned: The current context is consistent, and a literal is queued up for bcp to process. If False is returned: The context cannot be made consistent without backtracking past the original one, so the formula is unsat.

Definition at line 939 of file search_fast.cpp.

References CVC3::SearchEngineFast::clearLiterals(), CVC3::SearchEngineFast::commitFacts(), CVC3::SearchImplBase::d_bottomScope, CVC3::SearchEngine::d_commonRules, CVC3::SearchEngineFast::d_conflictCount, CVC3::SearchEngineFast::d_conflictTheorem, CVC3::SearchEngineFast::d_decisionEngine, CVC3::SearchEngineFast::d_lastConflictClause, CVC3::SearchEngineFast::d_lastConflictScope, CVC3::SearchEngineFast::d_litsMaxScorePos, CVC3::SearchEngineFast::d_unitConflictClauses, DebugAssert, CVC3::SearchEngineFast::enqueueFact(), CVC3::Literal::getExpr(), CVC3::Theorem::getExpr(), CVC3::Theorem::getScope(), CVC3::Clause::getTheorem(), IF_DEBUG, CVC3::CommonProofRules::iffMP(), CVC3::int2string(), CVC3::Expr::isNull(), CVC3::Clause::isNull(), CVC3::Expr::isOr(), CVC3::DecisionEngine::popTo(), CVC3::Theorem::printDebug(), CVC3::CommonProofRules::rewriteOr(), CVC3::SearchImplBase::scopeLevel(), CVC3::Clause::size(), CVC3::Literal::toString(), TRACE, TRACE_MSG, CVC3::SearchEngineFast::traceConflict(), and CVC3::SearchEngineFast::unitPropagation().

Referenced by CVC3::SearchEngineFast::checkSAT().

void CVC3::SearchEngineFast::assertAssumptions ( ) [private, inherited]

FIXME: document this.

void SearchEngineFast::enqueueFact ( const Theorem thm) [private, inherited]
void SearchEngineFast::setInconsistent ( const Theorem thm) [private, inherited]
void SearchEngineFast::commitFacts ( ) [private, inherited]
void SearchEngineFast::clearFacts ( ) [private, inherited]

Clear the local fact queue.

Definition at line 1063 of file search_fast.cpp.

References CVC3::SearchEngineFast::d_factQueue, and TRACE_MSG.

Referenced by CVC3::SearchEngineFast::bcp(), and CVC3::SearchEngineFast::checkValidMain().

Theorem CVC3::SearchEngineFast::processConflict ( const Literal l) [private, inherited]

Take a conflict in the form of Literal, or Theorem, and generate all the necessary conflict clauses.

Theorem CVC3::SearchEngineFast::processConflict ( const Theorem thm) [private, inherited]

Take a conflict in the form of Literal, or Theorem, and generate all the necessary conflict clauses.

bool SearchEngineFast::propagate ( const Clause c,
int  idx,
bool &  wpUpdated 
) [private, inherited]
void SearchEngineFast::unitPropagation ( const Clause c,
unsigned  idx 
) [private, inherited]
void SearchEngineFast::analyzeUIPs ( const Theorem falseThm,
int  conflictScope 
) [private, inherited]

Analyse the conflict, find the UIPs, etc.

Finding UIPs (Unique Implication Pointers)

This is basically the same as finding hammocks of the subset of the implication graph composed of only the nodes from the current scope. A hammock is a portion of the graph which has a single source and/or sink such that removing that single node makes the graph disconnected.

Conceptually, the algorithm maintains four sets of nodes: literals (named lits), gamma, fringe, and pending. Literals are nodes whose expressions will become literals in the conflict clause of the current hammock, and the nodes in gamma are assumptions from which such conflict clause theorem is derived. Nodes in fringe are intermediate nodes which are ready to be "expanded" (see the algorithm description below). The pending nodes are those which are not yet ready to be processed (they later become literal or fringe nodes).

These sets are maintained as vectors, and are updated in such a way that the nodes in the vectors never repeat. The exception is the pending set, for which only a size counter is maintained. A node belongs to the pending set if it has been visited (isFlagged() method), and its fan-out count is non-zero (stored in the cache, getCachedValue()). In other words, pending nodes are those that have been visited, but not sufficient number of times.

Also, fringe is maintained as a pair of vectors. One vector is always the current fringe, and the other one is built when the current is processed. When processing of the current fringe is finished, it is cleared, and the other vector becomes the current fringe (that is, they swap roles).

A node is expanded if it is marked for expansion (getExpandFlag()). If its fan-out count is not yet zero, it is added to the set of pending nodes.

If a node has a literal flag (getLitFlag()), it goes into literals when its fan-out count reaches zero. Since this will be the last time the node is visited, it is added to the vector only once.

A node neither marked for expansion nor with the literal flag goes into the gamma set. It is added the first time the node is visited (isFlagged() returns false), and therefore, is added to the vector only once. This is an important distinction from the other sets, since a gamma-node may be used by several conflict clauses.

Clearing the gamma set after each UIP requires both clearing the vector and resetting all flags (clearAllFlags()).

The algorithm

  1. Initially, the fringe contains exactly the predecessors of falseThm from the current scope which are ready to be expanded (fan-out count is zero). All the other predecessors of falseThm go to the appropriate sets of literals, gamma, and pending.

  2. If fringe.size() <= 1 and the set of pending nodes is empty, then the element in the fringe (if it's non-empty) is a UIP. Generate a conflict clause from the UIP and the literals (using gamma as the set of assumptions), empty the sets, and continue with the next step. Note, that the UIP remains in the fringe, and will be expanded in the next step.

    The important exception: if the only element in the fringe is marked for expansion, then this is a false UIP (the SAT solver doesn't know about this node), and it should not appear in the conflict clause. In this case, simply proceed to step 3 as if nothing happened.

  3. If fringe.size()==0, stop (the set of pending nodes must also be empty at this point). Otherwise, for *every* node in the fringe, decrement the fan-out for each of its predecessors, and empty the fringe. Take the predecessors from the current scope, and add those to the fringe for which fan-out count is zero, and remove them from the set of pending nodes. Add the other predecessors from the current scope to the set of pending nodes. Add the remaining predecessors (not from the current scope) to the literals or gamma, as appropriate. Continue with step 2.

Definition at line 1266 of file search_fast.cpp.

References CVC3::Assumptions::begin(), CVC3::Theorem::clearAllFlags(), CVC3::SearchEngineRules::conflictClause(), CVC3::SearchImplBase::d_bottomScope, CVC3::SearchEngineFast::d_conflictClauseCount, CVC3::SearchEngineFast::d_conflictClauses, CVC3::SearchEngine::d_core, CVC3::SearchEngineFast::d_lastConflictClause, CVC3::SearchEngineFast::d_lastConflictScope, CVC3::SearchEngine::d_rules, CVC3::SearchEngineFast::d_unitConflictClauses, CVC3::SearchImplBase::d_vm, DebugAssert, CVC3::Assumptions::end(), std::endl(), CVC3::Theorem::getAssumptionsRef(), CVC3::Theorem::getExpr(), CVC3::Clause::getScope(), IF_DEBUG, CVC3::int2string(), CVC3::Clause::isNull(), CVC3::Theorem::printDebug(), processNode(), CVC3::Clause::size(), TRACE, TRACE_MSG, CVC3::SearchEngineFast::updateLitCounts(), CVC3::Clause::watched(), CVC3::SearchEngineFast::wp(), and CVC3::Clause::wp().

Referenced by CVC3::SearchEngineFast::traceConflict().

void SearchEngineFast::addNewClause ( Clause c) [private, inherited]

Go through all the clauses and check the watch pointers (for debugging)

Set up the watch pointers for the new clause

Definition at line 1069 of file search_fast.cpp.

References CVC3::SearchEngineFast::d_clauses, DebugAssert, CVC3::CDList< T >::push_back(), CVC3::Clause::size(), CVC3::SearchEngineFast::updateLitCounts(), CVC3::Clause::watched(), CVC3::SearchEngineFast::wp(), and CVC3::Clause::wp().

Referenced by CVC3::SearchEngineFast::addNonLiteralFact().

void SearchEngineFast::recordFact ( const Theorem thm) [private, inherited]
void SearchEngineFast::traceConflict ( const Theorem conflictThm) [private, inherited]

First pass in conflict analysis; takes a theorem of FALSE.

The purpose of this method is to mark up the assumption graph of the FALSE Theorem (conflictThm) for the later UIP analysis. The required flags for each assumption in the graph are:

ExpandFlag: whether to "expand" the node or not; that is, whether to consider the current node as a final assumption (either as a conflict clause literal, or a context assumption from $\Gamma$)

LitFlag: the node (actually, its inverse) is a literal of the conflict clause

CachedValue: the "fanout" count, how many nodes in the assumption graph are derived from the current node.

INVARIANTS (after the method returns):

  1. The currect scope is the "true" conflict scope, i.e. scopeLevel() == conflictThm.getScope()
  2. The literals marked with LitFlag (CC literals) are known to the SAT solver, i.e. their Literal class has a value == 1
  3. The only CC literal from the current scope is the latest splitter


  1. The Theorem scope of an assumption is the same as its Literal scope; i.e. if thm is a splitter, then thm.getScope() == newLiteral(thm.getExpr()).getScope()


First, backtrack to the scope level of the conflict. Then, traverse the implication graph until we either hit a literal known to the SAT solver at a lower scope: newLiteral(e).getScope()<scopeLevel(), or a splitter (assumption), or a fact from the bottom scope. The literals from the first two categories are marked with LitFlag (they'll comprise the conflict clause), and the bottom scope facts will be the assumptions in the conflict clause's theorem.

The traversed nodes are cached by the .isFlagged() flag, and subsequent hits only increase the fanout count of the node.

Notice, that there can only be one literal in the conflict clause from the current scope. Also, even if some intermediate literals were delayed by the DPs and reported to the SAT solver at or below the conflict scope (which may be below their "true" Theorem scope), they will be skipped, and their assumptions will be used.

In other words, it is safe to backtrack to the "true" conflict level, since, in the worst case, we traverse the graph all the way to the splitters, and make a conflict clause out of those. The hope is, however, that this wouldn't happen too often.

Definition at line 1837 of file search_fast.cpp.

References CVC3::SearchEngineFast::analyzeUIPs(), CVC3::Assumptions::begin(), CVC3::Theorem::clearAllFlags(), CVC3::SearchImplBase::d_bottomScope, CVC3::SearchEngineFast::d_decisionEngine, CVC3::SearchEngineFast::d_lastConflictScope, DebugAssert, CVC3::Assumptions::end(), std::endl(), CVC3::Theorem::getAssumptionsRef(), CVC3::Theorem::getExpr(), CVC3::Literal::getScope(), CVC3::Theorem::getScope(), CVC3::Literal::getValue(), IF_DEBUG, CVC3::int2string(), CVC3::SearchImplBase::newLiteral(), CVC3::DecisionEngine::popTo(), CVC3::Theorem::printDebug(), CVC3::SearchImplBase::scopeLevel(), CVC3::Theorem::setCachedValue(), CVC3::Theorem::setExpandFlag(), CVC3::Clause::size(), TRACE, and TRACE_MSG.

Referenced by CVC3::SearchEngineFast::fixConflict().

QueryResult SearchEngineFast::checkValidMain ( const Expr e2) [private, inherited]

Private helper function for checkValid and restart.

Definition at line 1624 of file search_fast.cpp.

References CVC3::CDMap< Key, Data, HashFcn >::begin(), CVC3::SearchEngineFast::checkSAT(), CVC3::ExprHashMap< Data >::clear(), CVC3::SearchEngineFast::clearFacts(), CVC3::SearchEngineFast::clearLiterals(), CVC3::SearchImplBase::d_assumptions, CVC3::SearchImplBase::d_bottomScope, CVC3::SearchEngineFast::d_clauses, CVC3::SearchEngineFast::d_clausesQueryEnd, CVC3::SearchEngineFast::d_clausesQueryStart, CVC3::SearchEngine::d_commonRules, CVC3::SearchEngineFast::d_conflictTheorem, CVC3::SearchEngine::d_core, CVC3::SearchEngineFast::d_factQueue, CVC3::SearchImplBase::d_lastCounterExample, CVC3::SearchImplBase::d_lastValid, CVC3::SearchEngineFast::d_literals, CVC3::SearchEngineFast::d_literalSet, CVC3::SearchEngineFast::d_litsMaxScorePos, CVC3::SearchEngineFast::d_nonLiterals, CVC3::SearchEngineFast::d_nonlitQueryEnd, CVC3::SearchEngineFast::d_nonlitQueryStart, CVC3::SearchEngineFast::d_simplifiedThm, CVC3::SearchEngineFast::d_unitConflictClauses, DebugAssert, CVC3::CDMap< Key, Data, HashFcn >::end(), CVC3::TheoryCore::getCM(), CVC3::Theorem::getExpr(), CVC3::Theorem::getLeafAssumptions(), IF_DEBUG, CVC3::CommonProofRules::iffContrapositive(), CVC3::CommonProofRules::iffMP(), CVC3::Expr::isTrue(), CVC3::ContextManager::pop(), CVC3::ContextManager::popto(), CVC3::SearchImplBase::processResult(), CVC3::SATISFIABLE, CVC3::SearchImplBase::simplify(), CVC3::CommonProofRules::symmetryRule(), TRACE, TRACE_MSG, and CVC3::UNSATISFIABLE.

Referenced by CVC3::SearchEngineFast::checkValidInternal(), and CVC3::SearchEngineFast::restartInternal().

SearchEngineFast::SearchEngineFast ( TheoryCore core) [inherited]
SearchEngineFast::~SearchEngineFast ( ) [virtual, inherited]


We own the proof rules (d_rules) and the variable manager (d_vm); delete them.

Definition at line 118 of file search_fast.cpp.

References CVC3::SearchEngineFast::d_circuits, CVC3::SearchEngineFast::d_conflictClauseStack, and CVC3::SearchEngineFast::d_decisionEngine.

const std::string& CVC3::SearchEngineFast::getName ( ) [inline, virtual, inherited]

Name of this search engine.

Implements CVC3::SearchEngine.

Definition at line 393 of file search_fast.h.

QueryResult SearchEngineFast::checkValidInternal ( const Expr e) [virtual, inherited]
QueryResult SearchEngineFast::restartInternal ( const Expr e) [virtual, inherited]
void SearchEngineFast::getCounterExample ( std::vector< Expr > &  assertions) [virtual, inherited]

Redefine the counterexample generation.

FIXME: for now, it just dumps all the assumptions (same as getAssumptions()). Eventually, it will simplify the related formulas to TRUE, merge all the generated assumptions into d_lastCounterExample, and call the parent's method.

Definition at line 1424 of file search_fast.cpp.

References CVC3::SearchImplBase::getAssumptions().

void SearchEngineFast::addLiteralFact ( const Theorem thm) [virtual, inherited]
void SearchEngineFast::addNonLiteralFact ( const Theorem thm) [virtual, inherited]
Theorem SearchEngineFast::newIntAssumption ( const Expr e) [virtual, inherited]
bool SearchEngineFast::isAssumption ( const Expr e) [virtual, inherited]

Check if the formula has been assumed.

Reimplemented from CVC3::SearchImplBase.

Definition at line 1594 of file search_fast.cpp.

References CVC3::CDMap< Key, Data, HashFcn >::count(), CVC3::SearchEngineFast::d_nonLiteralsSaved, and CVC3::SearchImplBase::isAssumption().

void SearchEngineFast::addSplitter ( const Expr e,
int  priority 
) [virtual, inherited]

Suggest a splitter to the SearchEngine.

The higher is the priority, the sooner the SAT solver will split on it. It can be positive or negative (default is 0).

The set of suggested splitters is backtracking; that is, a splitter is "forgotten" once the scope is backtracked.

This method can be used either to change the priority of existing splitters, or to introduce new splitters that DPs consider relevant, even though they do not appear in existing formulas.

Reimplemented from CVC3::SearchImplBase.

Definition at line 1601 of file search_fast.cpp.

References compareLits(), CVC3::SearchImplBase::d_dpSplitters, CVC3::SearchEngineFast::d_litsByScores, CVC3::SearchEngineFast::d_litSortCount, DebugAssert, CVC3::Expr::isAbsLiteral(), CVC3::SearchImplBase::newLiteral(), CVC3::CDList< T >::push_back(), CVC3::Expr::toString(), and TRACE.

Variable Documentation

std::string CVC3::SearchEngineFast::d_name [private, inherited]


Definition at line 98 of file search_fast.h.

DecisionEngine* CVC3::SearchEngineFast::d_decisionEngine [private, inherited]
StatCounter CVC3::SearchEngineFast::d_unitPropCount [private, inherited]

Total number of unit propagations.

Definition at line 102 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::propagate().

StatCounter CVC3::SearchEngineFast::d_circuitPropCount [private, inherited]

Total number of circuit propagations.

Definition at line 104 of file search_fast.h.

Referenced by CVC3::Circuit::propagate().

StatCounter CVC3::SearchEngineFast::d_conflictCount [private, inherited]

Total number of conflicts.

Definition at line 106 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::fixConflict().

StatCounter CVC3::SearchEngineFast::d_conflictClauseCount [private, inherited]

Total number of conflict clauses generated (not all may be active)

Definition at line 108 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::analyzeUIPs().

CDList<ClauseOwner> CVC3::SearchEngineFast::d_clauses [private, inherited]

Backtrackable list of clauses.

New clauses may come into play from the decision procedures that are context dependent.

Definition at line 113 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addNewClause(), CVC3::SearchEngineFast::checkValidInternal(), CVC3::SearchEngineFast::checkValidMain(), and CVC3::SearchEngineFast::SearchEngineFast().

CDMap<Expr,Theorem> CVC3::SearchEngineFast::d_unreportedLits [private, inherited]

Backtrackable set of pending unprocessed literals.

These can be discovered at any scope level during conflict analysis.

Definition at line 118 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::recordFact().

CDMap<Expr,bool> CVC3::SearchEngineFast::d_unreportedLitsHandled [private, inherited]

Definition at line 119 of file search_fast.h.

CDList<SmartCDO<Theorem> > CVC3::SearchEngineFast::d_nonLiterals [private, inherited]

Backtrackable list of non-literals (non-CNF formulas).

We treat nonliterals like clauses, because they are a superset of clauses. We stick the real clauses into d_clauses, but all the rest have to be stored elsewhere.

Definition at line 125 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addNonLiteralFact(), CVC3::SearchEngineFast::bcp(), CVC3::SearchEngineFast::checkValidInternal(), CVC3::SearchEngineFast::checkValidMain(), CVC3::SearchEngineFast::findSplitter(), and CVC3::SearchEngineFast::SearchEngineFast().

CDMap<Expr,Theorem> CVC3::SearchEngineFast::d_nonLiteralsSaved [private, inherited]

prevent reprocessing

Definition at line 126 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addNonLiteralFact(), and CVC3::SearchEngineFast::isAssumption().

CDO<Theorem> CVC3::SearchEngineFast::d_simplifiedThm [private, inherited]

Theorem which records simplification of the last query.

Definition at line 130 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidInternal(), CVC3::SearchEngineFast::checkValidMain(), and CVC3::SearchEngineFast::restartInternal().

CDO<unsigned> CVC3::SearchEngineFast::d_nonlitQueryStart [private, inherited]

Size of d_nonLiterals before most recent query.

Definition at line 133 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidInternal(), and CVC3::SearchEngineFast::checkValidMain().

CDO<unsigned> CVC3::SearchEngineFast::d_nonlitQueryEnd [private, inherited]

Size of d_nonLiterals after query (not including DP-generated non-literals)

Definition at line 135 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidInternal(), and CVC3::SearchEngineFast::checkValidMain().

CDO<unsigned> CVC3::SearchEngineFast::d_clausesQueryStart [private, inherited]

Size of d_clauses before most recent query.

Definition at line 137 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidInternal(), and CVC3::SearchEngineFast::checkValidMain().

CDO<unsigned> CVC3::SearchEngineFast::d_clausesQueryEnd [private, inherited]

Size of d_clauses after query.

Definition at line 139 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidInternal(), and CVC3::SearchEngineFast::checkValidMain().

std::vector<std::deque<ClauseOwner>* > CVC3::SearchEngineFast::d_conflictClauseStack [private, inherited]

Array of conflict clauses: one deque for each outstanding query.

Definition at line 142 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::SearchEngineFast(), and CVC3::SearchEngineFast::~SearchEngineFast().

std::deque<ClauseOwner>* CVC3::SearchEngineFast::d_conflictClauses [private, inherited]

Reference to top deque of conflict clauses.

Definition at line 144 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::analyzeUIPs(), CVC3::SearchEngineFast::findSplitter(), and CVC3::SearchEngineFast::SearchEngineFast().

ConflictClauseManager CVC3::SearchEngineFast::d_conflictClauseManager [private, inherited]

Definition at line 162 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidInternal().

std::vector<Clause> CVC3::SearchEngineFast::d_unitConflictClauses [private, inherited]

Unprocessed unit conflict clauses.

When we find unit conflict clauses, we are automatically going to jump back to the original scope. Hopefully we won't find multiple ones, but you never know with those wacky decision procedures just spitting new information out. These are then directly asserted then promptly forgotten about. Chaff keeps them around (for correctness maybe), but we already have the proofs stored in the literals themselves.

Definition at line 172 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::analyzeUIPs(), CVC3::SearchEngineFast::checkValidInternal(), CVC3::SearchEngineFast::checkValidMain(), CVC3::SearchEngineFast::fixConflict(), and CVC3::SearchEngineFast::restartInternal().

std::vector<Literal> CVC3::SearchEngineFast::d_literals [private, inherited]

Set of literals to be processed by bcp.

These are emptied out upon backtracking, because they can only be valid if they were already all processed without conflicts. Therefore, they don't need to be context dependent.

Definition at line 179 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addLiteralFact(), CVC3::SearchEngineFast::bcp(), CVC3::SearchEngineFast::checkValidMain(), CVC3::SearchEngineFast::clearLiterals(), CVC3::SearchEngineFast::newIntAssumption(), CVC3::Circuit::propagate(), CVC3::SearchEngineFast::split(), and CVC3::SearchEngineFast::unitPropagation().

CDMap<Expr,Literal> CVC3::SearchEngineFast::d_literalSet [private, inherited]

Set of asserted literals which may survive accross checkValid() calls.

When a literal is asserted outside of checkValid() call, its value is remembered in a Literal database, but the literal queue for BCP is cleared. We add literals to this set at the proper scope levels, and propagate them at the beginning of a checkValid() call.

Definition at line 188 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addLiteralFact(), and CVC3::SearchEngineFast::checkValidMain().

std::vector<Theorem> CVC3::SearchEngineFast::d_factQueue [private, inherited]
bool CVC3::SearchEngineFast::d_useEnqueueFact [private, inherited]

When true, use TheoryCore::enqueueFact() instead of addFact() in commitFacts()

Definition at line 196 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addLiteralFact(), and CVC3::SearchEngineFast::commitFacts().

bool CVC3::SearchEngineFast::d_inCheckSAT [private, inherited]

True when checkSAT() is running.

Used by addLiteralFact() to determine whether to BCP the literals immediately (outside of checkSAT()) or not.

Definition at line 201 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addLiteralFact(), and CVC3::SearchEngineFast::checkSAT().

CDList<Literal> CVC3::SearchEngineFast::d_litsAlive [private, inherited]

Set of alive literals that shouldn't be garbage-collected.

Unfortunately, I have a keep-alive issue. I think literals actually have to hang around, so I assert them to a separate d_litsAlive CDList.

Definition at line 208 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::bcp(), and CVC3::SearchEngineFast::newIntAssumption().

std::vector<Circuit*> CVC3::SearchEngineFast::d_circuits [private, inherited]

Mappings of literals to vectors of pointers to the corresponding watched literals.

A pointer is a pair (clause,i), where 'i' in {0,1} is the index of the watch pointer in the clause.

Definition at line 217 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addNonLiteralFact(), and CVC3::SearchEngineFast::~SearchEngineFast().

ExprHashMap<std::vector<Circuit*> > CVC3::SearchEngineFast::d_circuitsByExpr [private, inherited]

Definition at line 218 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::bcp(), and CVC3::Circuit::Circuit().

The scope of the last conflict.

This is the true scope of the conflict, not necessarily the scope where the conflict was detected.

Definition at line 223 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::analyzeUIPs(), CVC3::SearchEngineFast::fixConflict(), and CVC3::SearchEngineFast::traceConflict().

Clause CVC3::SearchEngineFast::d_lastConflictClause [private, inherited]

The last conflict clause (for checkSAT()). May be Null.

It records which conflict clause must be processed by BCP after backtracking from a conflict. A conflict may generate several conflict clauses, but only one of them will cause a unit propagation.

Definition at line 230 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::analyzeUIPs(), and CVC3::SearchEngineFast::fixConflict().

Theorem CVC3::SearchEngineFast::d_conflictTheorem [private, inherited]
unsigned CVC3::SearchEngineFast::d_litsMaxScorePos [private, inherited]

Position of a literal with max score in d_litsByScores.

Definition at line 261 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidMain(), CVC3::SearchEngineFast::findSplitter(), and CVC3::SearchEngineFast::fixConflict().

std::vector<Literal> CVC3::SearchEngineFast::d_litsByScores [private, inherited]

Vector of literals sorted by score.

Definition at line 263 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addSplitter(), CVC3::SearchEngineFast::findSplitter(), and CVC3::SearchEngineFast::updateLitCounts().

int CVC3::SearchEngineFast::d_splitterCount [private, inherited]

Internal splitter counter for delaying updateLitScores()

Definition at line 273 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::checkValidInternal(), CVC3::SearchEngineFast::findSplitter(), and CVC3::SearchEngineFast::split().

int CVC3::SearchEngineFast::d_litSortCount [private, inherited]

Internal (decrementing) count of added splitters, to sort d_litByScores.

Definition at line 275 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::addSplitter(), and CVC3::SearchEngineFast::updateLitCounts().

const bool CVC3::SearchEngineFast::d_berkminFlag [private, inherited]

Flag to switch on/off the berkmin heuristic.

Definition at line 278 of file search_fast.h.

Referenced by CVC3::SearchEngineFast::findSplitter().


friend class ConflictClauseManager [friend, inherited]

Helper class for managing conflict clauses.

Conflict clauses should only get popped when the context in which a call to checkValid originates is popped. This helper class checks every time there's a pop to see if the conflict clauses need to be restored.

Definition at line 152 of file search_fast.h.