#include <theory_quant.h>
Author: Daniel Wichs
Created: Wednesday July 2, 2003
Definition at line 184 of file theory_quant.h.
typedef std::map<Type, std::vector<size_t>, TypeComp > CVC3::TheoryQuant::typeMap [private] |
used to facilitate instantiation of universal quantifiers
Definition at line 197 of file theory_quant.h.
TheoryQuant::TheoryQuant | ( | TheoryCore * | core | ) |
categorizes all the terms contained in an expressions by type.
Updates d_contextTerms, d_contextMap, d_contextCache accordingly. returns true if the expression does not contain bound variables, false otherwise. Constructor
core | Constructor |
Definition at line 140 of file theory_quant.cpp.
References CVC3::TheoryCore::addNotifyEq(), CVC3::Type::anyType(), createProofRules(), d_cacheThmPos, d_initMaxScore, d_instCount, d_mybvs, d_offset_multi_trig, d_partCalled, d_rules, d_trans2_num, d_trans_num, d_univs, defaultDivideExpr, defaultMinusExpr, defaultMultExpr, defaultPlusExpr, defaultPowExpr, defaultReadExpr, defaultWriteExpr, CVC3::EXISTS, CVC3::FORALL, CVC3::Theory::getEM(), CVC3::TheoryCore::getFlags(), IF_DEBUG, CVC3::int2string(), MAX_TRIG_BVS, CVC3::ExprManager::newBoundVarExpr(), CVC3::ExprManager::newStringExpr(), CVC3::Theory::registerTheory(), and CVC3::Theory::theoryCore().
TheoryQuant::~TheoryQuant | ( | ) |
Theory-specific rewrite rules.
By default, rewrite just returns a reflexive theorem stating that the input expression is equivalent to itself. However, rewrite is allowed to return any theorem which describes how the input expression is equivalent to some new expression. rewrite should be used to perform simplifications, normalization, and any other preprocessing on theory-specific expressions that needs to be done.
Reimplemented from CVC3::Theory.
Definition at line 254 of file theory_quant.cpp.
References d_rules, CVC3::Expr::isExists(), CVC3::Expr::isForall(), CVC3::Expr::isNot(), CVC3::QuantProofRules::normalizeQuant(), and CVC3::Theory::reflexivityRule().
Theory-specific preprocessing.
This gets called each time a new assumption or query is preprocessed. By default it does nothing.
Reimplemented from CVC3::Theory.
Definition at line 2290 of file theory_quant.cpp.
References CVC3::QuantProofRules::addNewConst(), CVC3::AND, CVC3::CompleteInstPreProcessor::collectIndex(), CVC3::Expr::containsBoundVar(), d_rules, flatAnds(), getBoundVars(), CVC3::CompleteInstPreProcessor::hasMacros(), CVC3::Expr::iffExpr(), CVC3::CompleteInstPreProcessor::inst(), CVC3::CompleteInstPreProcessor::instMacros(), CVC3::CompleteInstPreProcessor::isGood(), CVC3::Theory::reflexivityRule(), CVC3::CompleteInstPreProcessor::simplifyEq(), CVC3::CompleteInstPreProcessor::simplifyQuant(), CVC3::Theory::theoryCore(), and CVC3::Theory::trueExpr().
bool TheoryQuant::recursiveMap | ( | const Expr & | e | ) | [private] |
categorizes all the terms contained in an expressions by type.
categorizes all the terms contained in an expressions by type.
Updates d_contextTerms, d_contextMap, d_contextCache accordingly. returns true if the expression does not contain bound variables, false otherwise.
Definition at line 8433 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BOUND_VAR, CVC3::ExprMap< Data >::count(), CVC3::CDMap< Key, Data, HashFcn >::count(), d_contextCache, d_contextMap, d_contextTerms, d_savedCache, CVC3::Expr::end(), CVC3::EXISTS, CVC3::FORALL, CVC3::Theory::getBaseType(), CVC3::Expr::getBody(), CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), CVC3::Expr::getKind(), CVC3::Type::isBool(), CVC3::CDList< T >::push_back(), CVC3::CDList< T >::size(), CVC3::Theory::theoryCore(), CVC3::Type::toString(), CVC3::Expr::toString(), and CVC3::TRACE.
Referenced by mapTermsByType().
categorizes all the terms contained in a vector of expressions by type.
Updates d_contextTerms, d_contextMap, d_contextCache accordingly.
Definition at line 8405 of file theory_quant.cpp.
References CVC3::Theory::boolType(), d_contextMap, d_contextTerms, d_univs, CVC3::Theory::falseExpr(), CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), CVC3::CDList< T >::push_back(), recursiveMap(), CVC3::CDList< T >::size(), CVC3::Theory::theoryCore(), and CVC3::Theory::trueExpr().
Referenced by naiveCheckSat().
void TheoryQuant::instantiate | ( | Theorem | univ, | |
bool | all, | |||
bool | savedMap, | |||
size_t | newIndex | |||
) | [private] |
Queues up all possible instantiations of bound variables.
The savedMap boolean indicates whether to use savedMap or d_contextMap the all boolean indicates weather to use all instantiation or only new ones and newIndex is the index where new instantiations begin.
Definition at line 8318 of file theory_quant.cpp.
References d_contextTerms, d_savedTerms, recInstantiate(), CVC3::CDList< T >::size(), and CVC3::TRACE.
Referenced by naiveCheckSat().
void TheoryQuant::recInstantiate | ( | Theorem & | univ, | |
bool | all, | |||
bool | savedMap, | |||
size_t | newIndex, | |||
std::vector< Expr > & | varReplacements | |||
) | [private] |
does most of the work of the instantiate function.
Definition at line 8334 of file theory_quant.cpp.
References d_contextMap, d_contextTerms, d_instCount, d_insts, d_maxQuantInst, d_rules, d_savedMap, d_savedTerms, enqueueInst(), CVC3::Theory::getBaseType(), CVC3::Theorem::getExpr(), CVC3::Expr::getVars(), CVC3::CDList< T >::size(), CVC3::Theorem::toString(), CVC3::TRACE, and CVC3::QuantProofRules::universalInst().
Referenced by instantiate().
void TheoryQuant::findInstAssumptions | ( | const Theorem & | thm | ) | [private] |
A recursive function used to find instantiated universals in the hierarchy of assumptions.
Definition at line 8521 of file theory_quant.cpp.
References CVC3::Assumptions::begin(), CVC3::ExprMap< Data >::count(), d_insts, d_savedCache, d_savedMap, d_savedTerms, CVC3::Assumptions::end(), CVC3::Theorem::getAssumptionsRef(), CVC3::Theory::getBaseType(), CVC3::Theorem::getExpr(), CVC3::Theorem::isAssump(), CVC3::Theorem::isFlagged(), CVC3::Theorem::isNull(), CVC3::Theorem::isRefl(), CVC3::Theorem::setFlag(), and CVC3::TRACE.
void TheoryQuant::arrayIndexName | ( | const Expr & | e | ) | [private] |
Definition at line 2563 of file theory_quant.cpp.
References d_arrayIndic, getBoundVars(), getSubTerms(), CVC3::READ, and CVC3::WRITE.
Referenced by checkSat(), and setupTriggers().
int TheoryQuant::getExprScore | ( | const Expr & | e | ) | [inline, private] |
Definition at line 274 of file theory_quant.cpp.
References CVC3::TheoryCore::getQuantLevelForTerm(), and CVC3::Theory::theoryCore().
Referenced by debug(), multMatchChild(), recMultMatch(), recMultMatchDebug(), recMultMatchOldWay(), and synCheckSat().
bool TheoryQuant::transFound | ( | const Expr & | comb | ) | [inline, private] |
Definition at line 6842 of file theory_quant.cpp.
References CVC3::CDMap< Key, Data, HashFcn >::count(), and d_trans_found.
Referenced by synNewInst().
void TheoryQuant::setTransFound | ( | const Expr & | comb | ) | [inline, private] |
Definition at line 6846 of file theory_quant.cpp.
References d_trans_found.
Referenced by synNewInst().
bool TheoryQuant::trans2Found | ( | const Expr & | comb | ) | [inline, private] |
Definition at line 6850 of file theory_quant.cpp.
References CVC3::CDMap< Key, Data, HashFcn >::count(), and d_trans2_found.
Referenced by synNewInst().
void TheoryQuant::setTrans2Found | ( | const Expr & | comb | ) | [inline, private] |
Definition at line 6854 of file theory_quant.cpp.
References d_trans2_found.
Referenced by synNewInst().
Definition at line 6859 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::count(), d_trans_back, and null_cdlist.
Referenced by iterBKList(), and update().
Definition at line 6868 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::count(), d_trans_forw, and null_cdlist.
Referenced by iterFWList(), and update().
void TheoryQuant::iterFWList | ( | const Expr & | sr, | |
const Expr & | dt, | |||
size_t | univ_id, | |||
const Expr & | gterm | |||
) | [inline, private] |
Definition at line 7093 of file theory_quant.cpp.
References enqueueInst(), forwList(), and CVC3::CDList< T >::size().
Referenced by synNewInst().
void TheoryQuant::iterBKList | ( | const Expr & | sr, | |
const Expr & | dt, | |||
size_t | univ_id, | |||
const Expr & | gterm | |||
) | [inline, private] |
Definition at line 7104 of file theory_quant.cpp.
References backList(), enqueueInst(), and CVC3::CDList< T >::size().
Referenced by synNewInst().
Definition at line 1099 of file theory_quant.cpp.
References getHeadExpr().
Referenced by canMatch(), checkSat(), isTransLike(), matchListNew(), matchListOld(), multMatchChild(), recMultMatch(), recMultMatchDebug(), recMultMatchOldWay(), and setupTriggers().
Definition at line 1056 of file theory_quant.cpp.
References CVC3::APPLY, defaultDivideExpr, defaultMinusExpr, defaultMultExpr, defaultPlusExpr, defaultPowExpr, defaultReadExpr, defaultWriteExpr, CVC3::Op::getExpr(), CVC3::Expr::getKind(), CVC3::Expr::getOp(), CVC3::isDivide(), CVC3::isMinus(), CVC3::isMult(), CVC3::isPlus(), CVC3::isPow(), CVC3::READ, and CVC3::WRITE.
Referenced by getHead(), and setupTriggers().
Definition at line 6877 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::count(), d_trans_back, CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), and CVC3::Theory::theoryCore().
Referenced by synNewInst().
Definition at line 6887 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::count(), d_trans_forw, CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), and CVC3::Theory::theoryCore().
Referenced by synNewInst().
Definition at line 3697 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::begin(), d_eqs, d_eqs_pos, d_parent_list, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::CDList< T >::push_back(), CVC3::CDO< T >::set(), and CVC3::CDList< T >::size().
Referenced by synCheckSat().
void CVC3::TheoryQuant::recSearchCover | ( | const std::vector< Expr > & | border, | |
const std::vector< Expr > & | mtrigs, | |||
int | cur_depth, | |||
std::vector< std::vector< Expr > > & | instSet, | |||
std::vector< Expr > & | cur_inst | |||
) | [private] |
void CVC3::TheoryQuant::searchCover | ( | const Expr & | thm, | |
const std::vector< Expr > & | border, | |||
std::vector< std::vector< Expr > > & | instSet | |||
) | [private] |
void TheoryQuant::addNotify | ( | const Expr & | e | ) | [private] |
Definition at line 1033 of file theory_quant.cpp.
int TheoryQuant::sendInstNew | ( | ) | [private] |
Definition at line 991 of file theory_quant.cpp.
References d_allInstCount, d_bindGlobalHistory, d_gBindQueue, d_gfactLimit, d_gUnivQueue, d_instThisRound, d_simplifiedThmQueue, d_thmCount, d_useGFact, d_useInstGCache, CVC3::ExprMap< Data >::end(), CVC3::Theory::enqueueFact(), CVC3::ExprMap< Data >::find(), and CVC3::Theorem::getExpr().
Referenced by checkSat(), and synCheckSat().
Definition at line 606 of file theory_quant.cpp.
References CVC3::Expr::clearFlags(), d_subTermsMap, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), recGetSubTerms(), and CVC3::TRACE.
Referenced by arrayIndexName().
Definition at line 538 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::begin(), CVC3::ExprMap< Data >::end(), and CVC3::Theory::simplifyExpr().
Referenced by simplifyVectorExprMap().
void TheoryQuant::simplifyVectorExprMap | ( | std::vector< ExprMap< Expr > > & | orgVectorExprMap | ) | [private] |
Definition at line 546 of file theory_quant.cpp.
References simplifyExprMap().
Referenced by newTopMatch().
void CVC3::TheoryQuant::enqueueInst | ( | const | Theorem, | |
const | Theorem | |||
) | [private] |
Referenced by arrayHeuristic(), checkSat(), enqueueInst(), iterBKList(), iterFWList(), recInstantiate(), and synNewInst().
void TheoryQuant::enqueueInst | ( | const Theorem & | univ, | |
const std::vector< Expr > & | bind, | |||
const Expr & | gterm | |||
) | [private] |
Definition at line 626 of file theory_quant.cpp.
References d_allInstCount, d_bindHistory, d_gfactLimit, d_instThisRound, d_rules, d_simplifiedThmQueue, d_thmCount, d_totalInstCount, d_totalThmCount, d_trueInstCount, d_useGFact, d_useInstLCache, d_useInstTrue, CVC3::CDMap< Key, Data, HashFcn >::end(), CVC3::ExprMap< Data >::end(), CVC3::Theory::enqueueFact(), CVC3::CDMap< Key, Data, HashFcn >::find(), CVC3::ExprMap< Data >::find(), FOUND_FALSE, CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), CVC3::Theory::getEM(), CVC3::Theorem::getExpr(), CVC3::TheoryCore::getQuantLevelForTerm(), CVC3::Theorem::getRHS(), CVC3::Expr::getVars(), CVC3::Expr::isFalse(), CVC3::Expr::isTrue(), CVC3::QuantProofRules::partialUniversalInst(), CVC3::RAW_LIST, CVC3::Theory::simplify(), CVC3::Theory::simplifyExpr(), CVC3::Theory::theoryCore(), CVC3::TRACE, CVC3::QuantProofRules::universalInst(), and vectorExpr2string().
void TheoryQuant::enqueueInst | ( | size_t | univ_id, | |
const std::vector< Expr > & | bind, | |||
const Expr & | gterm | |||
) | [private] |
Definition at line 726 of file theory_quant.cpp.
References d_allInstCount, d_allInstCount2, d_bindGlobalHistory, d_bindGlobalThmHistory, d_bindHistory, d_gBindQueue, d_gfactLimit, d_gUnivQueue, d_instThisRound, d_rules, d_simplifiedThmQueue, d_thmCount, d_totalInstCount, d_totalThmCount, d_trueInstCount, d_univs, d_useGFact, d_useInstGCache, d_useInstLCache, d_useInstThmCache, d_useInstTrue, Hash::hash_map< _Key, _Data, _HashFcn, _EqualKey >::end(), CVC3::CDMap< Key, Data, HashFcn >::end(), CVC3::ExprMap< Data >::end(), CVC3::Theory::enqueueFact(), Hash::hash_map< _Key, _Data, _HashFcn, _EqualKey >::find(), CVC3::CDMap< Key, Data, HashFcn >::find(), CVC3::ExprMap< Data >::find(), FOUND_FALSE, CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), CVC3::Theory::getEM(), CVC3::Theorem::getExpr(), CVC3::TheoryCore::getQuantLevelForTerm(), CVC3::Theorem::getRHS(), CVC3::Expr::getVars(), CVC3::Expr::isFalse(), CVC3::Expr::isTrue(), CVC3::QuantProofRules::partialUniversalInst(), CVC3::RAW_LIST, CVC3::Theory::simplify(), CVC3::Theory::simplifyExpr(), CVC3::Theory::theoryCore(), CVC3::TRACE, CVC3::QuantProofRules::universalInst(), and vectorExpr2string().
void TheoryQuant::synCheckSat | ( | ExprMap< ExprMap< std::vector< dynTrig > * > * > & | new_trigs, | |
bool | fullEffort | |||
) | [private] |
Definition at line 7987 of file theory_quant.cpp.
References add_parent(), arrayHeuristic(), collectChangedTerms(), d_allout, d_arrayTrigs, d_callThisRound, d_curMaxExprScore, d_inEnd, d_lastArrayPos, d_lastPredsPos, d_lastTermsPos, d_lastUsefulGtermsPos, d_maxIL, d_maxILReached, d_univs, d_univsSavedPos, d_useExprScore, d_usefulGterms, d_useFullTrig, d_useGFact, CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), getExprScore(), CVC3::TheoryCore::getPredicates(), CVC3::TheoryCore::getTerms(), matchListNew(), matchListOld(), CVC3::CDList< T >::push_back(), sendInstNew(), CVC3::Theory::setIncomplete(), CVC3::CDList< T >::size(), CVC3::Theory::theoryCore(), CVC3::Expr::toString(), CVC3::TRACE, and usefulInMatch().
Referenced by checkSat().
void CVC3::TheoryQuant::synCheckSat | ( | bool | ) | [private] |
void TheoryQuant::semCheckSat | ( | bool | fullEffort | ) | [private] |
void TheoryQuant::naiveCheckSat | ( | bool | fullEffort | ) | [private] |
Definition at line 8253 of file theory_quant.cpp.
References d_contextTerms, d_instCount, d_maxQuantInst, d_savedTerms, d_savedTermsPos, d_univs, d_univsContextPos, d_univsSavedPos, CVC3::CDO< T >::get(), CVC3::TheoryCore::getTerms(), IF_DEBUG, instantiate(), CVC3::int2string(), mapTermsByType(), CVC3::CDO< T >::set(), CVC3::Theory::setIncomplete(), CVC3::CDList< T >::size(), CVC3::Theory::theoryCore(), and CVC3::TRACE.
Referenced by checkSat().
bool CVC3::TheoryQuant::insted | ( | const Theorem & | univ, | |
const std::vector< Expr > & | binds | |||
) | [private] |
void CVC3::TheoryQuant::synInst | ( | const Theorem & | univ, | |
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
void CVC3::TheoryQuant::synFullInst | ( | const Theorem & | univ, | |
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
void TheoryQuant::arrayHeuristic | ( | const Trigger & | trig, | |
size_t | univid | |||
) | [private] |
Definition at line 7081 of file theory_quant.cpp.
References d_arrayIndic, enqueueInst(), and CVC3::Trigger::head.
Referenced by synCheckSat().
Definition at line 7117 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::RAW_LIST, and CVC3::Theory::simplifyExpr().
Referenced by synNewInst().
void TheoryQuant::synNewInst | ( | size_t | univ_id, | |
const std::vector< Expr > & | binds, | |||
const Expr & | gterm, | |||
const Trigger & | trig | |||
) | [private] |
Definition at line 7127 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::begin(), CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::common_pos, d_all_multTrigsInfo, d_useNewEqu, CVC3::ExprMap< Data >::end(), CVC3::CDMap< Key, Data, HashFcn >::end(), enqueueInst(), FatalAssert, CVC3::CDMap< Key, Data, HashFcn >::find(), CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), CVC3::Expr::getEqNext(), CVC3::Theorem::getRHS(), CVC3::Trigger::hasT2, CVC3::Trigger::hasTrans, CVC3::Trigger::isMulti, iterBKList(), iterFWList(), CVC3::Trigger::multiId, CVC3::Trigger::multiIndex, CVC3::CDList< T >::push_back(), pushBackList(), pushForwList(), CVC3::RAW_LIST, setTrans2Found(), setTransFound(), CVC3::Theory::simplifyExpr(), simpRAWList(), CVC3::CDList< T >::size(), CVC3::Theory::theoryCore(), trans2Found(), transFound(), CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::uncomm_list, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::var_binds_found, and CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::var_pos.
Referenced by matchListNew(), and matchListOld().
void CVC3::TheoryQuant::synMultInst | ( | const Theorem & | univ, | |
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
void CVC3::TheoryQuant::synPartInst | ( | const Theorem & | univ, | |
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
void CVC3::TheoryQuant::semInst | ( | const Theorem & | univ, | |
size_t | tBegin | |||
) | [private] |
void CVC3::TheoryQuant::goodSynMatch | ( | const Expr & | e, | |
const std::vector< Expr > & | boundVars, | |||
std::vector< std::vector< Expr > > & | instBindsTerm, | |||
std::vector< Expr > & | instGterm, | |||
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
void CVC3::TheoryQuant::goodSynMatchNewTrig | ( | const Trigger & | trig, | |
const std::vector< Expr > & | boundVars, | |||
std::vector< std::vector< Expr > > & | instBinds, | |||
std::vector< Expr > & | instGterms, | |||
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
bool CVC3::TheoryQuant::goodSynMatchNewTrig | ( | const Trigger & | trig, | |
const std::vector< Expr > & | boundVars, | |||
std::vector< std::vector< Expr > > & | instBinds, | |||
std::vector< Expr > & | instGterms, | |||
const Expr & | gterm | |||
) | [private] |
void TheoryQuant::matchListOld | ( | const CDList< Expr > & | list, | |
size_t | gbegin, | |||
size_t | gend | |||
) | [private] |
Definition at line 3944 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::begin(), canGetHead(), d_allmap_trigs, d_allout, d_univs, CVC3::ExprMap< Data >::end(), FatalAssert, CVC3::ExprMap< Data >::find(), CVC3::Expr::getFind(), getHead(), CVC3::Expr::getKind(), CVC3::Theorem::getRHS(), CVC3::Expr::getSig(), CVC3::Expr::getType(), CVC3::Expr::hasFind(), CVC3::Trigger::hasTrans, CVC3::Type::isBool(), CVC3::Expr::isEq(), CVC3::Trigger::isMulti, CVC3::Theorem::isNull(), CVC3::Trigger::isSuperSimple, newTopMatch(), CVC3::CDList< T >::push_back(), CVC3::CDList< T >::size(), synNewInst(), and CVC3::Trigger::trig.
Referenced by synCheckSat().
void TheoryQuant::matchListNew | ( | ExprMap< ExprMap< std::vector< dynTrig > * > * > & | new_trigs, | |
const CDList< Expr > & | list, | |||
size_t | gbegin, | |||
size_t | gend | |||
) | [private] |
Definition at line 4140 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::begin(), d_allout, d_univs, FatalAssert, CVC3::ExprMap< Data >::find(), getHead(), CVC3::Expr::getKind(), CVC3::Expr::getSig(), CVC3::Expr::getType(), CVC3::Trigger::hasTrans, CVC3::Type::isBool(), CVC3::Expr::isEq(), CVC3::Theorem::isNull(), CVC3::Trigger::isSuperSimple, newTopMatch(), CVC3::CDList< T >::push_back(), synNewInst(), and CVC3::Trigger::trig.
Referenced by synCheckSat().
void TheoryQuant::delNewTrigs | ( | ExprMap< ExprMap< std::vector< dynTrig > * > * > & | new_trigs | ) | [private] |
Definition at line 4060 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::begin(), CVC3::ExprMap< Data >::clear(), and CVC3::ExprMap< Data >::end().
Referenced by checkSat(), and combineOldNewTrigs().
void TheoryQuant::combineOldNewTrigs | ( | ExprMap< ExprMap< std::vector< dynTrig > * > * > & | new_trigs | ) | [private] |
Definition at line 4079 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::begin(), d_allmap_trigs, delNewTrigs(), CVC3::CDMap< Key, Data, HashFcn >::end(), CVC3::ExprMap< Data >::end(), CVC3::CDMap< Key, Data, HashFcn >::find(), CVC3::ExprMap< Data >::find(), CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), CVC3::CDList< T >::push_back(), and CVC3::Theory::theoryCore().
Referenced by checkSat().
void TheoryQuant::add_parent | ( | const Expr & | parent | ) | [inline, private] |
Definition at line 3682 of file theory_quant.cpp.
References CVC3::Expr::arity(), d_parent_list, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), and CVC3::Theory::theoryCore().
Referenced by synCheckSat().
void TheoryQuant::newTopMatch | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds, | |||
const Trigger & | trig | |||
) | [private] |
Definition at line 4461 of file theory_quant.cpp.
References std::endl(), exprMap2string(), exprMap2stringSig(), exprMap2stringSimplify(), CVC3::Theorem::getRHS(), CVC3::Expr::getSig(), CVC3::Expr::hasSig(), CVC3::Expr::isApply(), newTopMatchNoSig(), newTopMatchSig(), and simplifyVectorExprMap().
Referenced by matchListNew(), and matchListOld().
void TheoryQuant::newTopMatchSig | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds, | |||
const Trigger & | trig | |||
) | [private] |
Definition at line 4540 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, d_useManTrig, d_usePolarity, std::endl(), CVC3::Theory::falseExpr(), FatalAssert, CVC3::Theory::findExpr(), CVC3::Theory::getBaseType(), getLeft(), CVC3::Theorem::getRHS(), getRight(), CVC3::Expr::getSig(), CVC3::Expr::getType(), CVC3::Expr::hasSig(), CVC3::Expr::isApply(), CVC3::Type::isBool(), CVC3::isGE(), CVC3::isGT(), isIntx(), CVC3::isLE(), CVC3::isLT(), CVC3::Trigger::isSimple, CVC3::Trigger::isSuperSimple, isSysPred(), multMatchChild(), multMatchTop(), CVC3::Neg, CVC3::Trigger::polarity, CVC3::Pos, CVC3::PosNeg, CVC3::Theory::simplifyExpr(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::Theory::trueExpr().
Referenced by newTopMatch().
void TheoryQuant::newTopMatchNoSig | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds, | |||
const Trigger & | trig | |||
) | [private] |
Definition at line 4246 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, d_usePolarity, CVC3::Theory::falseExpr(), FatalAssert, CVC3::Theory::findExpr(), CVC3::Theory::getBaseType(), getLeft(), getRight(), CVC3::Expr::getType(), CVC3::Type::isBool(), CVC3::isGE(), CVC3::isGT(), isIntx(), CVC3::isLE(), CVC3::isLT(), CVC3::Trigger::isSimple, CVC3::Trigger::isSuperSimple, isSysPred(), multMatchChild(), multMatchTop(), CVC3::Neg, CVC3::Trigger::polarity, CVC3::Pos, CVC3::PosNeg, CVC3::Theory::simplifyExpr(), CVC3::Expr::toString(), CVC3::TRACE, and CVC3::Theory::trueExpr().
Referenced by newTopMatch().
void CVC3::TheoryQuant::newTopMatchBackupOnly | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds, | |||
const Trigger & | trig | |||
) | [private] |
bool CVC3::TheoryQuant::synMatchTopPred | ( | const Expr & | gterm, | |
const Trigger | trig, | |||
ExprMap< Expr > & | env | |||
) | [private] |
bool CVC3::TheoryQuant::recSynMatch | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
ExprMap< Expr > & | env | |||
) | [private] |
bool TheoryQuant::recMultMatch | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds | |||
) | [private] |
Definition at line 5456 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, canGetHead(), CVC3::Expr::containsBoundVar(), d_curMaxExprScore, d_useNewEqu, DebugAssert, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::Expr::getEqNext(), getExprScore(), getHead(), CVC3::Expr::getKind(), CVC3::Theorem::getRHS(), CVC3::Expr::hasFind(), CVC3::Expr::isAtomicFormula(), isSysPred(), multMatchChild(), CVC3::Theory::simplifyExpr(), CVC3::Expr::toString(), and CVC3::TRACE.
Referenced by multMatchChild(), and multMatchTop().
bool TheoryQuant::recMultMatchDebug | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds | |||
) | [private] |
Definition at line 5179 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, canGetHead(), CVC3::Expr::containsBoundVar(), CVC3::ExprMap< Data >::count(), d_curMaxExprScore, d_same_head_expr, d_useNewEqu, DebugAssert, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::Expr::getEqNext(), getExprScore(), getHead(), CVC3::Expr::getKind(), CVC3::Theorem::getRHS(), CVC3::Expr::isAtomicFormula(), isSysPred(), multMatchChild(), CVC3::Theory::simplifyExpr(), CVC3::CDList< T >::size(), CVC3::Expr::toString(), and CVC3::TRACE.
bool CVC3::TheoryQuant::recMultMatchNewWay | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds | |||
) | [private] |
bool TheoryQuant::recMultMatchOldWay | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds | |||
) | [private] |
Definition at line 5347 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, canGetHead(), CVC3::Expr::containsBoundVar(), CVC3::ExprMap< Data >::count(), d_curMaxExprScore, d_same_head_expr, DebugAssert, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), getExprScore(), getHead(), CVC3::Expr::getKind(), CVC3::Expr::isAtomicFormula(), isSysPred(), multMatchChild(), CVC3::Theory::simplifyExpr(), CVC3::CDList< T >::size(), CVC3::Expr::toString(), and CVC3::TRACE.
bool TheoryQuant::multMatchChild | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds, | |||
bool | top = false | |||
) | [inline, private] |
Definition at line 3819 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, CVC3::Expr::containsBoundVar(), d_curMaxExprScore, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::Expr::getEqNext(), getExprScore(), getHead(), CVC3::Expr::getKind(), CVC3::Theorem::getRHS(), CVC3::Expr::getSig(), CVC3::Expr::hasFind(), CVC3::Expr::isAtomicFormula(), CVC3::Theorem::isNull(), recMultMatch(), CVC3::Theory::simplifyExpr(), and CVC3::TRACE.
Referenced by newTopMatchNoSig(), newTopMatchSig(), recMultMatch(), recMultMatchDebug(), and recMultMatchOldWay().
bool TheoryQuant::multMatchTop | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
std::vector< ExprMap< Expr > > & | binds | |||
) | [inline, private] |
Definition at line 3914 of file theory_quant.cpp.
References recMultMatch().
Referenced by newTopMatchNoSig(), and newTopMatchSig().
bool CVC3::TheoryQuant::recSynMatchBackupOnly | ( | const Expr & | gterm, | |
const Expr & | vterm, | |||
ExprMap< Expr > & | env | |||
) | [private] |
bool CVC3::TheoryQuant::hasGoodSynInstNewTrigOld | ( | Trigger & | trig, | |
std::vector< Expr > & | boundVars, | |||
std::vector< std::vector< Expr > > & | instBinds, | |||
std::vector< Expr > & | instGterms, | |||
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
bool CVC3::TheoryQuant::hasGoodSynInstNewTrig | ( | Trigger & | trig, | |
const std::vector< Expr > & | boundVars, | |||
std::vector< std::vector< Expr > > & | instBinds, | |||
std::vector< Expr > & | instGterms, | |||
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
bool CVC3::TheoryQuant::hasGoodSynMultiInst | ( | const Expr & | e, | |
std::vector< Expr > & | bVars, | |||
std::vector< std::vector< Expr > > & | instSet, | |||
const CDList< Expr > & | allterms, | |||
size_t | tBegin | |||
) | [private] |
void TheoryQuant::recGoodSemMatch | ( | const Expr & | e, | |
const std::vector< Expr > & | bVars, | |||
std::vector< Expr > & | newInst, | |||
std::set< std::vector< Expr > > & | instSet | |||
) | [private] |
Definition at line 3569 of file theory_quant.cpp.
References d_typeExprMap, CVC3::Theory::getBaseType(), CVC3::Expr::hasFind(), CVC3::Theory::simplifyExpr(), CVC3::Expr::substExpr(), CVC3::Expr::toString(), and CVC3::TRACE.
bool CVC3::TheoryQuant::hasGoodSemInst | ( | const Expr & | e, | |
std::vector< Expr > & | bVars, | |||
std::set< std::vector< Expr > > & | instSet, | |||
size_t | tBegin | |||
) | [private] |
bool TheoryQuant::isTransLike | ( | const std::vector< Expr > & | cur_trig | ) | [private] |
Definition at line 2769 of file theory_quant.cpp.
References canGetHead(), d_useTrans, getBoundVars(), and getHead().
Referenced by setupTriggers().
bool TheoryQuant::isTrans2Like | ( | const std::vector< Expr > & | all_terms, | |
const Expr & | tr2 | |||
) | [private] |
Definition at line 2812 of file theory_quant.cpp.
References d_useTrans2.
Referenced by setupTriggers().
Expr CVC3::TheoryQuant::recGeneralTrig | ( | const Expr & | trig, | |
ExprMap< Expr > & | bvs, | |||
size_t & | mybvs_count | |||
) | [private] |
void TheoryQuant::registerTrig | ( | ExprMap< ExprMap< std::vector< dynTrig > * > * > & | cur_trig_map, | |
Trigger | trig, | |||
const std::vector< Expr > | thmBVs, | |||
size_t | univ_id | |||
) | [private] |
Definition at line 2584 of file theory_quant.cpp.
References d_arrayTrigs, CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), CVC3::Trigger::getEx(), CVC3::Trigger::getHead(), CVC3::Trigger::hasRWOp, and CVC3::CDList< T >::push_back().
Referenced by setupTriggers().
void CVC3::TheoryQuant::registerTrigReal | ( | Trigger | trig, | |
const std::vector< Expr > | , | |||
size_t | univ_id | |||
) | [private] |
Definition at line 2744 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, canGetHead(), CVC3::Theory::getBaseType(), getHead(), and CVC3::Expr::getKind().
Referenced by setupTriggers().
void CVC3::TheoryQuant::setGround | ( | const Expr & | gterm, | |
const Expr & | trig, | |||
const Theorem & | univ, | |||
const std::vector< Expr > & | subTerms | |||
) | [private] |
void TheoryQuant::setupTriggers | ( | ExprMap< ExprMap< std::vector< dynTrig > * > * > & | trig_maps, | |
const Theorem & | thm, | |||
size_t | univs_id | |||
) | [private] |
Definition at line 2863 of file theory_quant.cpp.
References arrayIndexName(), CVC3::BOUND_VAR, canGetHead(), canMatch(), CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::common_pos, CVC3::ExprMap< Data >::count(), d_all_multTrigsInfo, d_fullTrigs, d_hasTriggers, d_multitrigs_maps, d_multTriggers, d_multTrigs, d_offset_multi_trig, d_trans2_num, d_trans_num, d_transThm, d_univs, d_useManTrig, d_usePolarity, d_useTrans2, DebugAssert, exprScore(), findPolarity(), getBoundVars(), CVC3::Theorem::getExpr(), getHead(), getHeadExpr(), CVC3::Expr::getIndex(), CVC3::Expr::getKind(), getSubTrig(), CVC3::Expr::getTrigs(), CVC3::Expr::getType(), CVC3::Expr::getVars(), goodMultiTriggers(), CVC3::int2string(), CVC3::Type::isBool(), isGoodFullTrigger(), isGoodMultiTrigger(), isSimpleTrig(), isSuperSimpleTrig(), isSysPred(), isTrans2Like(), isTransLike(), locVar(), CVC3::Trigger::multiId, CVC3::Trigger::multiIndex, CVC3::Neg, CVC3::Pos, CVC3::PosNeg, CVC3::CDList< T >::push_back(), CVC3::READ, registerTrig(), CVC3::Trigger::setHead(), CVC3::Trigger::setMultiTrig(), CVC3::Trigger::setRWOp(), CVC3::Trigger::setSimp(), CVC3::Trigger::setSuperSimp(), CVC3::Trigger::setTrans(), CVC3::Trigger::setTrans2(), CVC3::ExprMap< Data >::size(), CVC3::Expr::subExprOf(), CVC3::Theory::theoryCore(), CVC3::Expr::toString(), CVC3::TRACE, trigInitScore(), CVC3::Ukn, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::uncomm_list, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::univ_id, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::univThm, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::var_binds_found, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::var_pos, and CVC3::WRITE.
Referenced by checkSat().
void TheoryQuant::saveContext | ( | ) | [private] |
Definition at line 7977 of file theory_quant.cpp.
References d_arrayTrigs, d_eqsUpdate, d_lastArrayPos, d_lastEqsUpdatePos, d_lastPredsPos, d_lastTermsPos, d_lastUsefulGtermsPos, d_rawUnivs, d_rawUnivsSavedPos, d_univs, d_univsSavedPos, d_usefulGterms, CVC3::CDO< T >::set(), CVC3::CDList< T >::size(), and CVC3::Theory::theoryCore().
Referenced by checkSat().
QuantProofRules * TheoryQuant::createProofRules | ( | ) |
Destructor.
Definition at line 39 of file quant_theorem_producer.cpp.
References CVC3::Theory::theoryCore().
Referenced by TheoryQuant().
void CVC3::TheoryQuant::addSharedTerm | ( | const Expr & | e | ) | [inline, virtual] |
void TheoryQuant::assertFact | ( | const Theorem & | thm | ) | [virtual] |
Theory interface function to assert quantified formulas.
pushes in negations and converts to either universally or existentially quantified theorems. Universals are stored in a database while existentials are enqueued to be handled by the search engine.
pushes in negations and converts to either universally or existentially quantified theorems. Universals are stored in a database while existentials are enqueued to be handled by the search engine.
Implements CVC3::Theory.
Definition at line 3435 of file theory_quant.cpp.
References CVC3::QuantProofRules::boundVarElim(), d_maxILReached, d_rawUnivs, d_rules, d_translate, d_univs, d_useGFact, d_useNew, DebugAssert, CVC3::Theory::enqueueFact(), CVC3::Theorem::getExpr(), CVC3::Theory::iffMP(), CVC3::Expr::isExists(), CVC3::Expr::isForall(), CVC3::Expr::isNot(), CVC3::QuantProofRules::packVar(), CVC3::CDList< T >::push_back(), CVC3::QuantProofRules::rewriteNotExists(), CVC3::QuantProofRules::rewriteNotForall(), CVC3::Expr::toString(), CVC3::Theorem::toString(), and CVC3::TRACE.
void TheoryQuant::checkSat | ( | bool | fullEffort | ) | [virtual] |
Check for satisfiability in the theory.
fullEffort | when it is false, checkSat can do as much or as little work as it likes, though simple inferences and checks for consistency should be done to increase efficiency. If fullEffort is true, checkSat must check whether the set of facts given by assertFact together with the arrangement of shared terms (provided by addSharedTerm) induced by the global find database equivalence relation are satisfiable. If satisfiable, checkSat does nothing. |
Implements CVC3::Theory.
Definition at line 7516 of file theory_quant.cpp.
References CVC3::QuantProofRules::addNewConst(), arrayIndexName(), CVC3::ExprMap< Data >::begin(), canGetHead(), CVC3::ExprMap< Data >::clear(), combineOldNewTrigs(), CVC3::ExprMap< Data >::count(), d_abInstCount, d_all_multTrigsInfo, d_eqs, d_eqsUpdate, d_gBindQueue, d_gUnivQueue, d_inEnd, d_instThisRound, d_lastEqsUpdatePos, d_lastPredsPos, d_lastTermsPos, d_maxILReached, d_maxNaiveCall, d_rawUnivs, d_rules, d_same_head_expr, d_simplifiedThmQueue, d_tempBinds, d_translate, d_univs, d_univsQueue, d_useFullTrig, d_useGFact, d_useLazyInst, d_useNaiveInst, d_useNew, d_useSemMatch, DebugAssert, delNewTrigs(), CVC3::ExprMap< Data >::end(), std::endl(), CVC3::Theory::enqueueFact(), enqueueInst(), CVC3::Expr::eqExpr(), FatalAssert, CVC3::Theory::findExpr(), CVC3::TheoryCore::getCM(), CVC3::ContextManager::getCurrentContext(), CVC3::Theory::getEM(), getHead(), CVC3::Expr::getKind(), CVC3::TheoryCore::getPredicates(), CVC3::Theorem::getRHS(), CVC3::TheoryCore::getTerms(), CVC3::Expr::getVars(), CVC3::Expr::isEq(), naiveCheckSat(), CVC3::ExprManager::newVarExpr(), CVC3::CDList< T >::push_back(), CVC3::READ, saveContext(), semCheckSat(), sendInstNew(), CVC3::Expr::setType(), setupTriggers(), CVC3::Theory::simplifyExpr(), CVC3::ExprMap< Data >::size(), CVC3::CDList< T >::size(), synCheckSat(), CVC3::Theory::theoryCore(), CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::uncomm_list, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::univ_id, CVC3::TheoryQuant::TheoryQuant::multTrigsInfo::univThm, and CVC3::WRITE.
void TheoryQuant::setup | ( | const Expr & | e | ) | [virtual] |
Set up the term e for call-backs when e or its children change.
setup is called once for each expression associated with the theory. It is typically used to setup theory-specific data for an expression and to add call-back information for use with update.
Reimplemented from CVC3::Theory.
Definition at line 331 of file theory_quant.cpp.
int TheoryQuant::help | ( | int | i | ) |
Notify a theory of a new equality.
update is a call-back used by the notify mechanism of the core theory. It works as follows. When an equation t1 = t2 makes it into the core framework, the two find equivalence classes for t1 and t2 are merged. The result is that t2 is the new equivalence class representative and t1 is no longer an equivalence class representative. When this happens, the notify list of t1 is traversed. Notify list entries consist of a theory and an expression d. For each entry (i,d), i->update(e, d) is called, where e is the theorem corresponding to the equality t1=t2.
To add the entry (i,d) to a term t1's notify list, a call must be made to t1.addNotify(i,d). This is typically done in setup.
Reimplemented from CVC3::Theory.
Definition at line 412 of file theory_quant.cpp.
References backList(), d_eqsUpdate, forwList(), CVC3::Theorem::getExpr(), CVC3::Theorem::getLHS(), CVC3::Theorem::getRHS(), CVC3::CDList< T >::push_back(), CVC3::CDList< T >::size(), and CVC3::TRACE.
void TheoryQuant::debug | ( | int | i | ) |
Used to notify the quantifier algorithm of possible instantiations that were used in proving a context inconsistent.
Definition at line 337 of file theory_quant.cpp.
References d_curMaxExprScore, d_usefulGterms, std::endl(), getExprScore(), CVC3::TheoryCore::getPredicates(), CVC3::Expr::getRep(), CVC3::Theorem::getRHS(), CVC3::Expr::getSig(), CVC3::TheoryCore::getTerms(), CVC3::Expr::hasRep(), CVC3::Expr::hasSig(), CVC3::Expr::isApply(), CVC3::CDList< T >::size(), and CVC3::Theory::theoryCore().
void TheoryQuant::notifyInconsistent | ( | const Theorem & | thm | ) | [virtual] |
Used to notify the quantifier algorithm of possible instantiations that were used in proving a context inconsistent.
Reimplemented from CVC3::Theory.
Definition at line 8489 of file theory_quant.cpp.
References d_savedTerms, d_univs, DebugAssert, std::endl(), CVC3::Theorem::getAssumptionsRef(), CVC3::Theorem::getExpr(), CVC3::Theorem::getLeafAssumptions(), CVC3::Expr::isFalse(), CVC3::CDList< T >::size(), CVC3::Theorem::toString(), CVC3::Assumptions::toString(), and CVC3::TRACE.
void TheoryQuant::computeType | ( | const Expr & | e | ) | [virtual] |
computes the type of a quantified term. Always a boolean.
Reimplemented from CVC3::Theory.
Definition at line 8551 of file theory_quant.cpp.
References DebugAssert, CVC3::EXISTS, CVC3::FORALL, CVC3::Expr::getBody(), CVC3::Expr::getKind(), CVC3::Expr::getType(), CVC3::Type::isBool(), CVC3::Expr::setType(), CVC3::Type::toString(), and CVC3::Expr::toString().
TCC(forall x.phi(x)) = (forall x. TCC(phi(x))) OR (exists x. TCC(phi(x)) & !phi(x)) TCC(exists x.phi(x)) = (forall x. TCC(phi(x))) OR (exists x. TCC(phi(x)) & phi(x))
Reimplemented from CVC3::Theory.
Definition at line 8582 of file theory_quant.cpp.
References DebugAssert, CVC3::EXISTS, CVC3::FORALL, CVC3::Expr::getBody(), CVC3::Theory::getEM(), CVC3::Expr::getKind(), CVC3::Theory::getTCC(), CVC3::Expr::getVars(), CVC3::Expr::isQuantifier(), CVC3::ExprManager::newClosureExpr(), and CVC3::Expr::toString().
Theory-specific parsing implemented by the DP.
Reimplemented from CVC3::Theory.
Definition at line 8814 of file theory_quant.cpp.
References CVC3::Theory::addBoundVar(), CVC3::Expr::arity(), CVC3::Theory::boolType(), DebugAssert, CVC3::Expr::end(), CVC3::EXISTS, CVC3::FORALL, CVC3::Theory::getEM(), CVC3::ExprManager::getKind(), CVC3::Expr::getKind(), CVC3::ID, CVC3::ExprManager::newClosureExpr(), CVC3::Theory::parseExpr(), CVC3::RAW_LIST, CVC3::Expr::toString(), and CVC3::TRACE.
ExprStream & TheoryQuant::print | ( | ExprStream & | os, | |
const Expr & | e | |||
) | [virtual] |
Theory-specific pretty-printing.
By default, print the top node in AST, and resume pretty-printing the children. The same call e.print(os) can be used in DP-specific printers to use AST printing for the given node. In fact, it is strongly recommended to add e.print(os) as the default for all the cases/kinds that are not handled by the particular pretty-printer.
Reimplemented from CVC3::Theory.
Definition at line 8597 of file theory_quant.cpp.
References CVC3::Theory::d_theoryUsed, d_translate, CVC3::EXISTS, CVC3::FORALL, CVC3::Expr::getBody(), CVC3::Theory::getEM(), CVC3::Expr::getKind(), CVC3::Expr::getTrigs(), CVC3::Expr::getVars(), CVC3::Expr::isQuantifier(), CVC3::ExprStream::lang(), CVC3::LISP_LANG, CVC3::nodag(), CVC3::pop(), CVC3::popdag(), CVC3::PRESENTATION_LANG, CVC3::Expr::print(), CVC3::push(), CVC3::pushdag(), CVC3::SIMPLIFY_LANG, CVC3::SMTLIB_LANG, CVC3::space(), and CVC3::TPTP_LANG.
CDList<Theorem> CVC3::TheoryQuant::d_univs [private] |
database of universally quantified theorems
Definition at line 200 of file theory_quant.h.
Referenced by assertFact(), checkSat(), enqueueInst(), mapTermsByType(), matchListNew(), matchListOld(), naiveCheckSat(), notifyInconsistent(), saveContext(), setupTriggers(), synCheckSat(), and TheoryQuant().
CDList<Theorem> CVC3::TheoryQuant::d_rawUnivs [private] |
Definition at line 202 of file theory_quant.h.
Referenced by assertFact(), checkSat(), and saveContext().
CDList<dynTrig> CVC3::TheoryQuant::d_arrayTrigs [private] |
Definition at line 204 of file theory_quant.h.
Referenced by registerTrig(), saveContext(), and synCheckSat().
CDO<size_t> CVC3::TheoryQuant::d_lastArrayPos [private] |
std::queue<Theorem> CVC3::TheoryQuant::d_univsQueue [private] |
universally quantified formulas to be instantiated, the var bindings is in d_bingQueue and the ground term matched with the trigger is in d_gtermQueue
Definition at line 208 of file theory_quant.h.
Referenced by checkSat().
std::queue<Theorem> CVC3::TheoryQuant::d_simplifiedThmQueue [private] |
Definition at line 210 of file theory_quant.h.
Referenced by checkSat(), enqueueInst(), and sendInstNew().
std::queue<Theorem> CVC3::TheoryQuant::d_gUnivQueue [private] |
Definition at line 212 of file theory_quant.h.
Referenced by checkSat(), enqueueInst(), and sendInstNew().
std::queue<Expr> CVC3::TheoryQuant::d_gBindQueue [private] |
Definition at line 214 of file theory_quant.h.
Referenced by checkSat(), enqueueInst(), and sendInstNew().
ExprMap<std::set<std::vector<Expr> > > CVC3::TheoryQuant::d_tempBinds [private] |
CDO<size_t> CVC3::TheoryQuant::d_lastPredsPos [private] |
tracks the possition of preds
Definition at line 220 of file theory_quant.h.
Referenced by checkSat(), saveContext(), and synCheckSat().
CDO<size_t> CVC3::TheoryQuant::d_lastTermsPos [private] |
tracks the possition of terms
Definition at line 222 of file theory_quant.h.
Referenced by checkSat(), saveContext(), and synCheckSat().
CDO<size_t> CVC3::TheoryQuant::d_lastPartPredsPos [private] |
tracks the positions of preds for partial instantiation
Definition at line 225 of file theory_quant.h.
CDO<size_t> CVC3::TheoryQuant::d_lastPartTermsPos [private] |
tracks the possition of terms for partial instantiation
Definition at line 227 of file theory_quant.h.
CDO<size_t> CVC3::TheoryQuant::d_univsPartSavedPos [private] |
tracks a possition in the database of universals for partial instantiation
Definition at line 229 of file theory_quant.h.
CDO<size_t> CVC3::TheoryQuant::d_lastPartLevel [private] |
the last decision level on which partial instantion is called
Definition at line 232 of file theory_quant.h.
CDO<bool> CVC3::TheoryQuant::d_partCalled [private] |
CDO<bool> CVC3::TheoryQuant::d_maxILReached [private] |
the max instantiation level reached
Definition at line 237 of file theory_quant.h.
Referenced by assertFact(), checkSat(), and synCheckSat().
CDList<Expr> CVC3::TheoryQuant::d_usefulGterms [private] |
useful gterms for matching
Definition at line 242 of file theory_quant.h.
Referenced by debug(), saveContext(), and synCheckSat().
CDO<size_t> CVC3::TheoryQuant::d_lastUsefulGtermsPos [private] |
tracks the position in d_usefulGterms
Definition at line 245 of file theory_quant.h.
Referenced by saveContext(), and synCheckSat().
CDO<size_t> CVC3::TheoryQuant::d_savedTermsPos [private] |
tracks a possition in the savedTerms map
Definition at line 248 of file theory_quant.h.
Referenced by naiveCheckSat().
CDO<size_t> CVC3::TheoryQuant::d_univsSavedPos [private] |
tracks a possition in the database of universals
Definition at line 250 of file theory_quant.h.
Referenced by naiveCheckSat(), saveContext(), and synCheckSat().
CDO<size_t> CVC3::TheoryQuant::d_rawUnivsSavedPos [private] |
CDO<size_t> CVC3::TheoryQuant::d_univsPosFull [private] |
CDO<size_t> CVC3::TheoryQuant::d_univsContextPos [private] |
tracks a possition in the database of universals if fulleffort mode, the d_univsSavedPos now uesed when fulleffort=0 only.
Definition at line 256 of file theory_quant.h.
Referenced by naiveCheckSat().
CDO<int> CVC3::TheoryQuant::d_instCount [private] |
number of instantiations made in given context
Definition at line 259 of file theory_quant.h.
Referenced by naiveCheckSat(), recInstantiate(), and TheoryQuant().
int CVC3::TheoryQuant::d_inEnd [private] |
set if the fullEffort = 1
Definition at line 262 of file theory_quant.h.
Referenced by checkSat(), and synCheckSat().
int CVC3::TheoryQuant::d_allout [private] |
Definition at line 264 of file theory_quant.h.
Referenced by matchListNew(), matchListOld(), and synCheckSat().
std::map<Type, CDList<size_t>* ,TypeComp> CVC3::TheoryQuant::d_contextMap [private] |
a map of types to posisitions in the d_contextTerms list
Definition at line 267 of file theory_quant.h.
Referenced by mapTermsByType(), recInstantiate(), recursiveMap(), and ~TheoryQuant().
CDList<Expr> CVC3::TheoryQuant::d_contextTerms [private] |
a list of all the terms appearing in the current context
chache of expressions
Definition at line 270 of file theory_quant.h.
Referenced by instantiate(), mapTermsByType(), naiveCheckSat(), recInstantiate(), and recursiveMap().
CDMap<Expr, bool> CVC3::TheoryQuant::d_contextCache [private] |
typeMap CVC3::TheoryQuant::d_savedMap [private] |
a map of types to positions in the d_savedTerms vector
Definition at line 274 of file theory_quant.h.
Referenced by findInstAssumptions(), and recInstantiate().
ExprMap<bool> CVC3::TheoryQuant::d_savedCache [private] |
cache of expressions
Definition at line 275 of file theory_quant.h.
Referenced by findInstAssumptions(), and recursiveMap().
std::vector<Expr> CVC3::TheoryQuant::d_savedTerms [private] |
a vector of all of the terms that have produced conflicts.
Definition at line 277 of file theory_quant.h.
Referenced by findInstAssumptions(), instantiate(), naiveCheckSat(), notifyInconsistent(), and recInstantiate().
ExprMap<std::vector<Expr> > CVC3::TheoryQuant::d_insts [private] |
a map of instantiated universals to a vector of their instantiations
Definition at line 280 of file theory_quant.h.
Referenced by findInstAssumptions(), and recInstantiate().
QuantProofRules* CVC3::TheoryQuant::d_rules [private] |
quantifier theorem production rules
Definition at line 283 of file theory_quant.h.
Referenced by assertFact(), checkSat(), enqueueInst(), recInstantiate(), rewrite(), theoryPreprocess(), TheoryQuant(), and ~TheoryQuant().
const int* CVC3::TheoryQuant::d_maxQuantInst [private] |
Command line option.
Definition at line 285 of file theory_quant.h.
Referenced by naiveCheckSat(), and recInstantiate().
const bool* CVC3::TheoryQuant::d_useNew [private] |
const bool* CVC3::TheoryQuant::d_useLazyInst [private] |
use new way of instantiation
Definition at line 324 of file theory_quant.h.
Referenced by checkSat().
const bool* CVC3::TheoryQuant::d_useSemMatch [private] |
const bool* CVC3::TheoryQuant::d_useCompleteInst [private] |
const bool* CVC3::TheoryQuant::d_translate [private] |
Try complete instantiation.
Definition at line 327 of file theory_quant.h.
Referenced by assertFact(), checkSat(), and print().
const bool* CVC3::TheoryQuant::d_usePart [private] |
const bool* CVC3::TheoryQuant::d_useMult [private] |
const bool* CVC3::TheoryQuant::d_useInstLCache [private] |
const bool* CVC3::TheoryQuant::d_useInstGCache [private] |
const bool* CVC3::TheoryQuant::d_useInstThmCache [private] |
const bool* CVC3::TheoryQuant::d_useInstTrue [private] |
const bool* CVC3::TheoryQuant::d_usePullVar [private] |
Definition at line 336 of file theory_quant.h.
const bool* CVC3::TheoryQuant::d_useExprScore [private] |
const int* CVC3::TheoryQuant::d_useTrigLoop [private] |
Definition at line 338 of file theory_quant.h.
const int* CVC3::TheoryQuant::d_maxInst [private] |
Definition at line 339 of file theory_quant.h.
const int* CVC3::TheoryQuant::d_maxIL [private] |
const bool* CVC3::TheoryQuant::d_useTrans [private] |
const bool* CVC3::TheoryQuant::d_useTrans2 [private] |
const bool* CVC3::TheoryQuant::d_useManTrig [private] |
const bool* CVC3::TheoryQuant::d_useGFact [private] |
Definition at line 345 of file theory_quant.h.
Referenced by assertFact(), checkSat(), enqueueInst(), sendInstNew(), and synCheckSat().
const int* CVC3::TheoryQuant::d_gfactLimit [private] |
const bool* CVC3::TheoryQuant::d_useInstAll [private] |
Definition at line 347 of file theory_quant.h.
const bool* CVC3::TheoryQuant::d_usePolarity [private] |
Definition at line 348 of file theory_quant.h.
Referenced by newTopMatchNoSig(), newTopMatchSig(), and setupTriggers().
const bool* CVC3::TheoryQuant::d_useEqu [private] |
Definition at line 349 of file theory_quant.h.
const bool* CVC3::TheoryQuant::d_useNewEqu [private] |
Definition at line 350 of file theory_quant.h.
Referenced by recMultMatch(), recMultMatchDebug(), and synNewInst().
const int* CVC3::TheoryQuant::d_maxNaiveCall [private] |
const bool* CVC3::TheoryQuant::d_useNaiveInst [private] |
CDO<int> CVC3::TheoryQuant::d_curMaxExprScore [private] |
Definition at line 355 of file theory_quant.h.
Referenced by debug(), help(), multMatchChild(), recMultMatch(), recMultMatchDebug(), recMultMatchOldWay(), and synCheckSat().
bool CVC3::TheoryQuant::d_useFullTrig [private] |
bool CVC3::TheoryQuant::d_usePartTrig [private] |
Definition at line 358 of file theory_quant.h.
bool CVC3::TheoryQuant::d_useMultTrig [private] |
Definition at line 359 of file theory_quant.h.
CDMap<Expr, std::vector<Expr> > CVC3::TheoryQuant::d_arrayIndic [private] |
Definition at line 362 of file theory_quant.h.
Referenced by arrayHeuristic(), and arrayIndexName().
std::vector<Expr> CVC3::TheoryQuant::d_allInsts [private] |
Definition at line 365 of file theory_quant.h.
int CVC3::TheoryQuant::d_initMaxScore [private] |
int CVC3::TheoryQuant::d_offset_multi_trig [private] |
int CVC3::TheoryQuant::d_instThisRound [private] |
Definition at line 370 of file theory_quant.h.
Referenced by checkSat(), enqueueInst(), and sendInstNew().
int CVC3::TheoryQuant::d_callThisRound [private] |
int CVC3::TheoryQuant::partial_called [private] |
Definition at line 373 of file theory_quant.h.
ExprMap<std::vector<Expr> > CVC3::TheoryQuant::d_multTriggers [private] |
ExprMap<std::vector<Expr> > CVC3::TheoryQuant::d_partTriggers [private] |
Definition at line 380 of file theory_quant.h.
ExprMap<std::vector<Trigger> > CVC3::TheoryQuant::d_fullTrigs [private] |
ExprMap<std::vector<Trigger> > CVC3::TheoryQuant::d_multTrigs [private] |
ExprMap<std::vector<Trigger> > CVC3::TheoryQuant::d_partTrigs [private] |
Definition at line 385 of file theory_quant.h.
CDO<size_t> CVC3::TheoryQuant::d_exprLastUpdatedPos [private] |
Definition at line 388 of file theory_quant.h.
std::map<ExprIndex, int> CVC3::TheoryQuant::d_indexScore [private] |
Definition at line 390 of file theory_quant.h.
std::map<ExprIndex, Expr> CVC3::TheoryQuant::d_indexExpr [private] |
Definition at line 392 of file theory_quant.h.
ExprMap<bool> CVC3::TheoryQuant::d_hasTriggers [private] |
the score for a full trigger
Definition at line 398 of file theory_quant.h.
Referenced by setupTriggers().
ExprMap<bool> CVC3::TheoryQuant::d_hasMoreBVs [private] |
Definition at line 399 of file theory_quant.h.
int CVC3::TheoryQuant::d_trans_num [private] |
int CVC3::TheoryQuant::d_trans2_num [private] |
std::vector<multTrigsInfo> CVC3::TheoryQuant::d_all_multTrigsInfo [private] |
Definition at line 416 of file theory_quant.h.
Referenced by checkSat(), setupTriggers(), and synNewInst().
ExprMap<CDList<Expr>* > CVC3::TheoryQuant::d_trans_back [private] |
ExprMap<CDList<Expr>* > CVC3::TheoryQuant::d_trans_forw [private] |
CDMap<Expr,bool > CVC3::TheoryQuant::d_trans_found [private] |
CDMap<Expr,bool > CVC3::TheoryQuant::d_trans2_found [private] |
Expr CVC3::TheoryQuant::defaultWriteExpr [private] |
Expr CVC3::TheoryQuant::defaultReadExpr [private] |
Expr CVC3::TheoryQuant::defaultPlusExpr [private] |
Expr CVC3::TheoryQuant::defaultMinusExpr [private] |
Expr CVC3::TheoryQuant::defaultMultExpr [private] |
Expr CVC3::TheoryQuant::defaultDivideExpr [private] |
Expr CVC3::TheoryQuant::defaultPowExpr [private] |
CDList<Expr> CVC3::TheoryQuant::null_cdlist [private] |
Theorem CVC3::TheoryQuant::d_transThm [private] |
ExprMap<CDList<std::vector<Expr> >* > CVC3::TheoryQuant::d_mtrigs_inst [private] |
Definition at line 461 of file theory_quant.h.
ExprMap<CDList<Expr>* > CVC3::TheoryQuant::d_same_head_expr [private] |
Definition at line 463 of file theory_quant.h.
Referenced by checkSat(), recMultMatchDebug(), and recMultMatchOldWay().
ExprMap<CDList<Expr>* > CVC3::TheoryQuant::d_eq_list [private] |
Definition at line 464 of file theory_quant.h.
CDList<Theorem> CVC3::TheoryQuant::d_eqsUpdate [private] |
Definition at line 466 of file theory_quant.h.
Referenced by checkSat(), saveContext(), and update().
CDO<size_t> CVC3::TheoryQuant::d_lastEqsUpdatePos [private] |
CDList<Expr > CVC3::TheoryQuant::d_eqs [private] |
CDO<size_t > CVC3::TheoryQuant::d_eqs_pos [private] |
ExprMap<CDO<size_t>* > CVC3::TheoryQuant::d_eq_pos [private] |
Definition at line 472 of file theory_quant.h.
ExprMap<CDList<Expr>* > CVC3::TheoryQuant::d_parent_list [private] |
Definition at line 474 of file theory_quant.h.
Referenced by add_parent(), and collectChangedTerms().
ExprMap<std::vector<Expr> > CVC3::TheoryQuant::d_mtrigs_bvorder [private] |
std::map<Type, std::vector<Expr>,TypeComp > CVC3::TheoryQuant::d_typeExprMap [private] |
std::set<std::string> CVC3::TheoryQuant::cacheHead [private] |
Definition at line 496 of file theory_quant.h.
StatCounter CVC3::TheoryQuant::d_allInstCount [private] |
StatCounter CVC3::TheoryQuant::d_abInstCount [private] |
std::vector<Theorem> CVC3::TheoryQuant::d_cacheTheorem [private] |
Definition at line 510 of file theory_quant.h.
size_t CVC3::TheoryQuant::d_cacheThmPos [private] |
CDMap<Expr, std::set<std::vector<Expr> > > CVC3::TheoryQuant::d_instHistory [private] |
Definition at line 517 of file theory_quant.h.
ExprMap<int> CVC3::TheoryQuant::d_thmCount [private] |
ExprMap<size_t> CVC3::TheoryQuant::d_totalThmCount [private] |
ExprMap<CDMap<Expr, bool>* > CVC3::TheoryQuant::d_bindHistory [private] |
ExprMap<std::hash_map<Expr, bool>* > CVC3::TheoryQuant::d_bindGlobalHistory [private] |
ExprMap<std::hash_map<Expr, Theorem>* > CVC3::TheoryQuant::d_bindGlobalThmHistory [private] |
ExprMap<std::set<std::vector<Expr> > > CVC3::TheoryQuant::d_instHistoryGlobal [private] |
Definition at line 528 of file theory_quant.h.
ExprMap<std::vector<Expr> > CVC3::TheoryQuant::d_subTermsMap [private] |
const size_t CVC3::TheoryQuant::MAX_TRIG_BVS = 15 [static, private] |
Expr CVC3::TheoryQuant::d_mybvs[MAX_TRIG_BVS] [private] |
Definition at line 687 of file theory_quant.h.
Referenced by combineOldNewTrigs(), and matchListOld().
CDList<Trigger> CVC3::TheoryQuant::d_alltrig_list [private] |
Definition at line 689 of file theory_quant.h.