#include "theory_quant.h"
#include "theory_arith.h"
#include "theory_array.h"
#include "typecheck_exception.h"
#include "parser_exception.h"
#include "smtlib_exception.h"
#include "quant_proof_rules.h"
#include "theory_core.h"
#include "command_line_flags.h"
#include "vcl.h"
#include <string>
#include <string.h>
#include <algorithm>
#include "assumptions.h"
Include dependency graph for theory_quant.cpp:
Go to the source code of this file.
Created: Wednesday July 2, 2003
License to use, copy, modify, sell and/or distribute this software and its documentation for any purpose is hereby granted without royalty, subject to the terms and conditions defined in the LICENSE file provided with this distribution.
Definition in file theory_quant.cpp.
std::string vectorExpr2string | ( | const std::vector< Expr > & | vec | ) |
bool isSysPred | ( | const Expr & | e | ) |
Definition at line 278 of file theory_quant.cpp.
References CVC3::Expr::isEq(), CVC3::isGE(), CVC3::isGT(), CVC3::isLE(), and CVC3::isLT().
Referenced by isGoodMultiTrigger(), isGoodPartTrigger(), isGoodSysPredTrigger(), CVC3::TheoryQuant::newTopMatchNoSig(), CVC3::TheoryQuant::newTopMatchSig(), CVC3::TheoryQuant::recMultMatch(), CVC3::TheoryQuant::recMultMatchDebug(), CVC3::TheoryQuant::recMultMatchOldWay(), recursiveGetSubTrig(), trigInitScore(), and usefulInMatch().
bool canGetHead | ( | const Expr & | e | ) |
Definition at line 282 of file theory_quant.cpp.
References CVC3::APPLY, CVC3::Expr::getKind(), CVC3::isDivide(), CVC3::isMinus(), CVC3::isMult(), CVC3::isPlus(), CVC3::isPow(), CVC3::READ, and CVC3::WRITE.
Referenced by CVC3::TheoryQuant::canMatch(), CVC3::TheoryQuant::checkSat(), isSimpleTrig(), CVC3::TheoryQuant::isTransLike(), CVC3::TheoryQuant::matchListOld(), CVC3::TheoryQuant::recMultMatch(), CVC3::TheoryQuant::recMultMatchDebug(), CVC3::TheoryQuant::recMultMatchOldWay(), and usefulInMatch().
bool isSimpleTrig | ( | const Expr & | t | ) |
Definition at line 295 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, and canGetHead().
Referenced by isSuperSimpleTrig().
bool isSuperSimpleTrig | ( | const Expr & | t | ) |
Definition at line 308 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::BOUND_VAR, CVC3::Expr::getKind(), isSimpleTrig(), CVC3::READ, and CVC3::WRITE.
bool usefulInMatch | ( | const Expr & | e | ) |
Definition at line 323 of file theory_quant.cpp.
References CVC3::Expr::arity(), canGetHead(), CVC3::Expr::isEq(), CVC3::Expr::isRational(), isSysPred(), CVC3::Expr::toString(), and CVC3::TRACE.
Referenced by isGoodFullTrigger(), isGoodMultiTrigger(), isGoodPartTrigger(), and isGoodSysPredTrigger().
Definition at line 556 of file theory_quant.cpp.
References CVC3::Expr::begin(), CVC3::Expr::end(), CVC3::Expr::getBody(), CVC3::Expr::getFlag(), CVC3::Expr::getKind(), CVC3::Expr::isApply(), CVC3::Expr::isClosure(), isSysPred(), CVC3::Expr::isTerm(), CVC3::Expr::isVar(), CVC3::RATIONAL_EXPR, and CVC3::Expr::setFlag().
Referenced by getSubTrig().
Definition at line 579 of file theory_quant.cpp.
References CVC3::Expr::clearFlags(), recursiveGetSubTrig(), CVC3::Expr::toString(), and CVC3::TRACE.
Definition at line 589 of file theory_quant.cpp.
References CVC3::Expr::begin(), CVC3::Expr::end(), CVC3::Expr::getBody(), CVC3::Expr::getFlag(), CVC3::Expr::isClosure(), and CVC3::Expr::setFlag().
Referenced by CVC3::TheoryQuant::getSubTerms().
int recursiveExprScore | ( | const Expr & | e | ) |
Definition at line 1035 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), DebugAssert, CVC3::Expr::end(), and CVC3::Expr::isClosure().
Referenced by exprScore().
int exprScore | ( | const Expr & | e | ) |
get the bound vars in term e,
Definition at line 1104 of file theory_quant.cpp.
References CVC3::Expr::begin(), CVC3::BOUND_VAR, CVC3::Expr::containsBoundVar(), CVC3::Expr::end(), CVC3::Expr::getBody(), CVC3::Expr::getFlag(), CVC3::Expr::getKind(), CVC3::Expr::isClosure(), CVC3::Expr::setContainsBoundVar(), and CVC3::Expr::setFlag().
Referenced by getBoundVars().
get bound vars in term e,
Definition at line 1137 of file theory_quant.cpp.
References CVC3::Expr::clearFlags(), and recursiveGetBoundVars().
Referenced by CVC3::TheoryQuant::arrayIndexName(), goodMultiTriggers(), hasMoreBVs(), CVC3::CompleteInstPreProcessor::isGood(), isGoodFullTrigger(), isGoodMultiTrigger(), isGoodPartTrigger(), CVC3::TheoryQuant::isTransLike(), CVC3::CompleteInstPreProcessor::rewriteNot(), and CVC3::TheoryQuant::theoryPreprocess().
Definition at line 1159 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::count(), CVC3::Expr::getType(), CVC3::Type::isBool(), CVC3::Neg, CVC3::Pos, CVC3::PosNeg, CVC3::TRACE, and CVC3::Ukn.
Referenced by CVC3::CompleteInstPreProcessor::collect_forall_index(), CVC3::CompleteInstPreProcessor::isGoodQuant(), CVC3::CompleteInstPreProcessor::rewriteNot(), and CVC3::CompleteInstPreProcessor::simplifyQuant().
bool isUniterpFunc | ( | const Expr & | e | ) |
Definition at line 1224 of file theory_quant.cpp.
References CVC3::Expr::getOpKind(), CVC3::Expr::isApply(), and CVC3::UFUNC.
Referenced by CVC3::CompleteInstPreProcessor::collect_shield_index(), CVC3::CompleteInstPreProcessor::collectHeads(), CVC3::CompleteInstPreProcessor::isMacro(), CVC3::CompleteInstPreProcessor::isShield(), and CVC3::CompleteInstPreProcessor::recInstMacros().
bool isGround | ( | const Expr & | e | ) |
Definition at line 1236 of file theory_quant.cpp.
References CVC3::Expr::containsBoundVar().
Referenced by CVC3::CompleteInstPreProcessor::collect_forall_index(), CVC3::CompleteInstPreProcessor::collect_shield_index(), CVC3::CompleteInstPreProcessor::collectIndex(), CVC3::CompleteInstPreProcessor::inst(), CVC3::CompleteInstPreProcessor::isShield(), and CVC3::CompleteInstPreProcessor::recRewriteNot().
Definition at line 1596 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::count(), DebugAssert, CVC3::Expr::getType(), CVC3::Type::isBool(), CVC3::Neg, CVC3::Pos, CVC3::PosNeg, and CVC3::Ukn.
Referenced by CVC3::CompleteInstPreProcessor::collectIndex(), and CVC3::CompleteInstPreProcessor::isGood().
Definition at line 2269 of file theory_quant.cpp.
References CVC3::Expr::begin(), CVC3::Expr::end(), CVC3::Expr::isAnd(), CVC3::Expr::isNot(), and CVC3::Expr::isOr().
Referenced by CVC3::TheoryQuant::theoryPreprocess().
bool isGoodSysPredTrigger | ( | const Expr & | e | ) |
Definition at line 2402 of file theory_quant.cpp.
References isSysPred(), and usefulInMatch().
Referenced by isGoodMultiTrigger(), isGoodPartTrigger(), and trigInitScore().
Definition at line 2427 of file theory_quant.cpp.
References getBoundVars(), isGoodSysPredTrigger(), isSysPred(), and usefulInMatch().
Definition at line 2462 of file theory_quant.cpp.
References getBoundVars(), isGoodSysPredTrigger(), isSysPred(), and usefulInMatch().
Definition at line 2500 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::Expr::begin(), CVC3::BOUND_VAR, CVC3::Expr::end(), CVC3::Expr::getBody(), CVC3::Expr::getFlag(), CVC3::Expr::getKind(), CVC3::Expr::isClosure(), and CVC3::Expr::setFlag().
Referenced by getPartTriggers().
Definition at line 2545 of file theory_quant.cpp.
References CVC3::Expr::clearFlags(), and recursiveGetPartTriggers().
int trigInitScore | ( | const Expr & | e | ) |
Definition at line 2553 of file theory_quant.cpp.
References isGoodSysPredTrigger(), and isSysPred().
Definition at line 2828 of file theory_quant.cpp.
References CVC3::ExprMap< Data >::end(), CVC3::ExprMap< Data >::find(), and getBoundVars().
Definition at line 2853 of file theory_quant.cpp.
int hasMoreBVs | ( | const Expr & | thm | ) |
test if a sub-term contains more bounded vars than quantified by out-most quantifier.
Definition at line 3416 of file theory_quant.cpp.
References DebugAssert, getBoundVars(), CVC3::Expr::getVars(), and CVC3::Expr::isForall().
Definition at line 3600 of file theory_quant.cpp.
References CVC3::Expr::getRational(), and CVC3::Expr::isRational().
Referenced by CVC3::ArithTheoremProducerOld::darkGrayShadow2ab(), CVC3::ArithTheoremProducer3::darkGrayShadow2ab(), CVC3::ArithTheoremProducer::darkGrayShadow2ab(), CVC3::ArithTheoremProducerOld::darkGrayShadow2ba(), CVC3::ArithTheoremProducer3::darkGrayShadow2ba(), CVC3::ArithTheoremProducer::darkGrayShadow2ba(), CVC3::TheoryArith3::doSolve(), CVC3::ArithTheoremProducerOld::eqElimIntRule(), CVC3::ArithTheoremProducer3::eqElimIntRule(), CVC3::ArithTheoremProducer::eqElimIntRule(), getLeft(), getRight(), CVC3::ArithTheoremProducerOld::intEqIrrational(), CVC3::ArithTheoremProducer3::intEqIrrational(), CVC3::ArithTheoremProducer::intEqIrrational(), CVC3::ArithTheoremProducerOld::intVarEqnConst(), CVC3::ArithTheoremProducer3::intVarEqnConst(), CVC3::ArithTheoremProducer::intVarEqnConst(), CVC3::ArithTheoremProducerOld::IsIntegerElim(), CVC3::ArithTheoremProducer3::IsIntegerElim(), CVC3::ArithTheoremProducer::IsIntegerElim(), CVC3::TheoryQuant::newTopMatchNoSig(), CVC3::TheoryQuant::newTopMatchSig(), CVC3::TheoryArithOld::normalizeProjectIneqs(), CVC3::TheoryArith3::normalizeProjectIneqs(), CVC3::TheoryArithOld::processSimpleIntEq(), CVC3::TheoryArithNew::processSimpleIntEq(), and CVC3::TheoryArith3::processSimpleIntEq().
Definition at line 3607 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::Expr::getKind(), isIntx(), CVC3::isRational(), CVC3::MULT, null_expr, and CVC3::PLUS.
Referenced by CVC3::TheoryQuant::newTopMatchNoSig(), and CVC3::TheoryQuant::newTopMatchSig().
Definition at line 3640 of file theory_quant.cpp.
References CVC3::Expr::arity(), CVC3::Expr::getKind(), isIntx(), CVC3::isRational(), CVC3::MULT, null_expr, and CVC3::PLUS.
Referenced by CVC3::TheoryQuant::newTopMatchNoSig(), and CVC3::TheoryQuant::newTopMatchSig().
Definition at line 5162 of file theory_quant.cpp.
References CVC3::Expr::getIndex(), and CVC3::Expr::isNull().
Definition at line 42 of file theory_quant.cpp.
Referenced by CVC3::TheoryQuant::enqueueInst(), CVC3::TheoryQuant::getHeadExpr(), getLeft(), getRight(), CVC3::TheoryQuant::matchListOld(), CVC3::TheoryQuant::newTopMatchNoSig(), CVC3::TheoryQuant::newTopMatchSig(), CVC3::TheoryQuant::recInstantiate(), CVC3::TheoryQuant::simpRAWList(), CVC3::TheoryQuant::synNewInst(), CVC3::TheoryQuant::TheoryQuant(), and CVC3::Trigger::Trigger().
const int FOUND_FALSE = 1 |