#include <theory_uf.h>
Inheritance diagram for CVCL::TheoryUF:
Author: Clark Barrett
Created: Sat Feb 8 14:51:19 2003
Definition at line 56 of file theory_uf.h.
|
|
|
Definition at line 49 of file theory_uf.cpp. References CVCL::ANY_TYPE, CVCL::ARROW, createProofRules(), d_anyType, d_rules, CVCL::Theory::getEM(), CVCL::LAMBDA, CVCL::ExprManager::newKind(), CVCL::OLD_ARROW, CVCL::Theory::registerTheory(), CVCL::TRANS_CLOSURE, CVCL::TYPEDECL, and CVCL::UFUNC. |
|
Definition at line 78 of file theory_uf.cpp. References d_rules. |
|
Definition at line 49 of file uf_theorem_producer.cpp. References CVCL::Theory::theoryCore(). Referenced by TheoryUF(). |
|
Notify theory of a new shared term. When a term e associated with theory i occurs as a child of an expression associated with theory j, the framework calls i->addSharedTerm(e) and j->addSharedTerm(e) Reimplemented from CVCL::Theory. Definition at line 88 of file theory_uf.h. |
|
|
Check for satisfiability in the theory.
Implements CVCL::Theory. Definition at line 163 of file theory_uf.cpp. References CVCL::UFProofRules::applyLambda(), CVCL::Debug::counter(), d_funApplications, d_funApplicationsIdx, d_rules, CVCL::debugger, CVCL::Theory::enqueueFact(), CVCL::Op::getExpr(), CVCL::Expr::getOp(), IF_DEBUG(), CVCL::Expr::isLambda(), and CVCL::CDList< T >::size(). |
|
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 CVCL::Theory. Definition at line 177 of file theory_uf.cpp. References CVCL::UFProofRules::applyLambda(), CVCL::CONSTDEF, CVCL::Debug::counter(), d_rules, CVCL::debugger, CVCL::Expr::getKind(), CVCL::Expr::getOpExpr(), CVCL::Theorem::getRHS(), CVCL::Expr::getType(), IF_DEBUG(), CVCL::Expr::isApply(), CVCL::Type::isBool(), CVCL::LAMBDA, CVCL::LETDECL, CVCL::Theory::reflexivityRule(), CVCL::Theory::rewriteCC(), CVCL::UFProofRules::rewriteOpDef(), CVCL::Expr::setRewriteNormal(), CVCL::Theory::simplify(), and CVCL::Theory::transitivityRule(). |
|
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 CVCL::Theory. Definition at line 207 of file theory_uf.cpp. References CVCL::APPLY, d_funApplications, CVCL::Expr::getKind(), CVCL::CDList< T >::push_back(), CVCL::Theory::setupCC(), and CVCL::TRACE. |
|
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 CVCL::Theory. Definition at line 217 of file theory_uf.cpp. References CVCL::Expr::computeTransClosure(), d_rules, CVCL::Theory::enqueueFact(), CVCL::Theory::find(), CVCL::Theory::findExpr(), CVCL::Theory::getCommonRules(), CVCL::Expr::getOpExpr(), CVCL::Expr::getOpKind(), CVCL::Theorem::getRHS(), CVCL::Expr::getSig(), CVCL::CommonProofRules::iffTrueElim(), CVCL::Expr::isApply(), CVCL::Theorem::isNull(), CVCL::Expr::isTrue(), CVCL::UFProofRules::relToClosure(), CVCL::Theory::symmetryRule(), CVCL::TRANS_CLOSURE, CVCL::Theory::transitivityRule(), and CVCL::Theory::updateCC(). |
|
Check that e is a valid Type expr.
Reimplemented from CVCL::Theory. Definition at line 277 of file theory_uf.cpp. References CVCL::ANY_TYPE, CVCL::Expr::arity(), CVCL::ARROW, CVCL::Expr::begin(), CVCL::Expr::end(), CVCL::Theory::getEM(), CVCL::Expr::getKind(), CVCL::Type::isBool(), CVCL::Type::isFunction(), CVCL::Expr::toString(), and CVCL::TYPEDECL. |
|
Compute and store the type of e.
Reimplemented from CVCL::Theory. Definition at line 314 of file theory_uf.cpp. References CVCL::APPLY, CVCL::Type::arity(), CVCL::Expr::arity(), d_anyType, CVCL::Type::funType(), CVCL::Theory::getBaseType(), CVCL::Expr::getBody(), CVCL::Type::getExpr(), CVCL::Expr::getKind(), CVCL::Expr::getName(), CVCL::Expr::getOpExpr(), CVCL::Expr::getType(), CVCL::Expr::getVars(), CVCL::int2string(), CVCL::Expr::isApply(), CVCL::Type::isFunction(), CVCL::Expr::isNull(), CVCL::Expr::isSymbol(), CVCL::LAMBDA, CVCL::Theory::resolveID(), CVCL::Expr::setType(), CVCL::Type::toString(), CVCL::Expr::toString(), and CVCL::TRANS_CLOSURE. |
|
Compute the base type of the top-level operator of an arbitrary type.
Reimplemented from CVCL::Theory. Definition at line 404 of file theory_uf.cpp. References CVCL::ANY_TYPE, CVCL::Expr::arity(), CVCL::ARROW, CVCL::Expr::begin(), CVCL::Expr::end(), CVCL::Theory::getBaseType(), CVCL::Type::getExpr(), CVCL::Expr::getKind(), CVCL::Expr::getOp(), CVCL::Type::toString(), and CVCL::TYPEDECL. |
|
Add variables from 'e' to 'v' for constructing a concrete model. If e is already of primitive type, do NOT add it to v. Reimplemented from CVCL::Theory. Definition at line 425 of file theory_uf.cpp. References CVCL::CDList< T >::begin(), d_funApplications, and CVCL::CDList< T >::end(). |
|
Compute the value of a compound variable from the more primitive ones. The more primitive variables for e are already assigned concrete values, and are available through getModelValue(). The new value for e must be assigned using assignValue() method.
Reimplemented from CVCL::Theory. Definition at line 443 of file theory_uf.cpp. References CVCL::andExpr(), CVCL::Type::arity(), CVCL::Theory::assignValue(), CVCL::ExprHashMap< Data >::begin(), CVCL::CDList< T >::begin(), d_applicationsInModel, d_funApplications, CVCL::ExprHashMap< Data >::end(), CVCL::CDList< T >::end(), CVCL::Theory::getEM(), CVCL::Theorem::getLHS(), CVCL::Theory::getModelValue(), CVCL::Theorem::getRHS(), CVCL::Expr::getType(), CVCL::int2string(), CVCL::Type::isFunction(), CVCL::Expr::iteExpr(), lambdaExpr(), CVCL::ExprManager::newBoundVarExpr(), CVCL::CDList< T >::push_back(), CVCL::Theory::reflexivityRule(), CVCL::Expr::setType(), CVCL::ExprHashMap< Data >::size(), CVCL::Theory::substitutivityRule(), CVCL::Theory::symmetryRule(), CVCL::Type::toString(), CVCL::Expr::toString(), and CVCL::Theory::transitivityRule(). |
|
Compute and cache the TCC of e.
The default implementation is to compute TCCs recursively for all children, and return their conjunction. Reimplemented from CVCL::Theory. Definition at line 524 of file theory_uf.cpp. References CVCL::andExpr(), CVCL::APPLY, CVCL::Type::arity(), CVCL::Theory::computeTCC(), CVCL::CONSTDEF, CVCL::Expr::getBody(), CVCL::Expr::getKind(), CVCL::Theorem::getRHS(), CVCL::Theory::getTCC(), CVCL::Expr::getType(), CVCL::Theory::getTypePred(), CVCL::Expr::getVars(), CVCL::Type::isBool(), CVCL::Type::isFunction(), CVCL::Expr::isLambda(), CVCL::LAMBDA, lambdaExpr(), CVCL::LETDECL, CVCL::Expr::mkOp(), CVCL::Theory::rewriteAnd(), CVCL::Expr::toString(), CVCL::Type::toString(), and CVCL::Theory::trueExpr(). |
|
Theory-specific parsing implemented by the DP.
Reimplemented from CVCL::Theory. Definition at line 803 of file theory_uf.cpp. References CVCL::Theory::addBoundVar(), CVCL::Expr::arity(), CVCL::ARROW, CVCL::Expr::begin(), CVCL::Expr::end(), CVCL::Expr::getEM(), CVCL::Theory::getEM(), CVCL::ExprManager::getKind(), CVCL::Expr::getKind(), CVCL::Expr::getOpKind(), CVCL::Expr::getString(), CVCL::ID, CVCL::Expr::isNull(), CVCL::LAMBDA, lambdaExpr(), CVCL::Expr::mkOp(), CVCL::OLD_ARROW, CVCL::Theory::parseExpr(), CVCL::RAW_LIST, CVCL::Theory::resolveID(), CVCL::Theory::theoryCore(), CVCL::Expr::toString(), CVCL::TRANS_CLOSURE, transClosureExpr(), CVCL::TUPLE_TYPE, and CVCL::TYPEDECL. |
|
|
Create a new LAMBDA-abstraction.
Referenced by computeModel(), computeTCC(), and parseExprOp(). |
|
Create a transitive closure expression.
Definition at line 910 of file theory_uf.cpp. References CVCL::Theory::getEM(), and CVCL::TRANS_CLOSURE. Referenced by parseExprOp(), and CVCL::UFTheoremProducer::relToClosure(). |
|
Definition at line 108 of file theory_uf.h. References d_anyType. |
|
Definition at line 57 of file theory_uf.h. Referenced by assertFact(), checkSat(), rewrite(), TheoryUF(), update(), and ~TheoryUF(). |
|
Flag to include function applications to the concrete model.
Definition at line 59 of file theory_uf.h. Referenced by computeModel(). |
|
Type that matches any type in a function argument.
Definition at line 62 of file theory_uf.h. Referenced by anyType(), computeType(), and TheoryUF(). |
|
Definition at line 70 of file theory_uf.h. Referenced by assertFact(). |
|
Backtracking list of function applications. Used for building concrete models and beta-reducing lambda-expressions. Definition at line 75 of file theory_uf.h. Referenced by checkSat(), computeModel(), computeModelTerm(), and setup(). |
|
Pointer to the last unprocessed element (for lambda expansions).
Definition at line 77 of file theory_uf.h. Referenced by checkSat(). |