#include <theory_simulate.h>
Inheritance diagram for CVC3::TheorySimulate:
Author: Sergey Berezin
Created: Tue Oct 7 10:13:15 2003
This theory owns the SIMULATE operator. It's job is to replace the above expressions by their definitions using rewrite rules.
Definition at line 46 of file theory_simulate.h.
TheorySimulate::TheorySimulate | ( | TheoryCore * | core | ) |
Constructor.
Definition at line 35 of file theory_simulate.cpp.
References createProofRules(), d_rules, CVC3::Theory::registerTheory(), and CVC3::SIMULATE.
TheorySimulate::~TheorySimulate | ( | ) |
SimulateProofRules * TheorySimulate::createProofRules | ( | ) | [private] |
Create proof rules for this theory.
Definition at line 38 of file simulate_theorem_producer.cpp.
References CVC3::Theory::theoryCore().
Referenced by TheorySimulate().
void CVC3::TheorySimulate::assertFact | ( | const Theorem & | e | ) | [inline, virtual] |
Assert a new fact to the decision procedure.
Each fact that makes it into the core framework is assigned to exactly one theory: the theory associated with that fact. assertFact is called to inform the theory that a new fact has been assigned to the theory.
Implements CVC3::Theory.
Definition at line 58 of file theory_simulate.h.
void CVC3::TheorySimulate::checkSat | ( | bool | fullEffort | ) | [inline, 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 59 of file theory_simulate.h.
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 53 of file theory_simulate.cpp.
References d_rules, CVC3::SimulateProofRules::expandSimulate(), CVC3::Expr::getKind(), CVC3::Theory::reflexivityRule(), and CVC3::SIMULATE.
void TheorySimulate::computeType | ( | const Expr & | e | ) | [virtual] |
Compute and store the type of e.
e | is the expression whose type is computed. |
Reimplemented from CVC3::Theory.
Definition at line 65 of file theory_simulate.cpp.
References CVC3::Type::arity(), CVC3::Expr::arity(), DebugAssert, CVC3::Type::funType(), CVC3::Theory::getBaseType(), CVC3::Expr::getKind(), CVC3::isRational(), CVC3::isReal(), CVC3::Expr::setType(), CVC3::SIMULATE, CVC3::Type::toString(), and CVC3::Expr::toString().
Compute and cache the TCC of e.
e | is an expression (term or formula). This function computes the TCC of e which is true iff the expression is defined. |
The default implementation is to compute TCCs recursively for all children, and return their conjunction.
Reimplemented from CVC3::Theory.
Definition at line 164 of file theory_simulate.cpp.
References CVC3::andExpr(), CVC3::Type::arity(), DebugAssert, CVC3::ExprManager::falseExpr(), CVC3::Theory::getEM(), CVC3::Expr::getKind(), CVC3::Expr::getRational(), CVC3::Theorem::getRHS(), CVC3::Theory::getTypePred(), CVC3::Theory::rewriteAnd(), CVC3::SIMULATE, CVC3::Expr::toString(), and CVC3::ExprManager::trueExpr().
Theory-specific parsing implemented by the DP.
Reimplemented from CVC3::Theory.
Definition at line 131 of file theory_simulate.cpp.
References CVC3::Expr::arity(), DebugAssert, CVC3::Theory::getEM(), CVC3::ExprManager::getKind(), CVC3::Expr::getKind(), CVC3::Theory::parseExpr(), CVC3::RAW_LIST, CVC3::SIMULATE, and CVC3::TRACE.
ExprStream & TheorySimulate::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 215 of file theory_simulate.cpp.
References CVC3::Expr::arity(), CVC3::Theory::d_theoryUsed, CVC3::Expr::getKind(), CVC3::ExprStream::lang(), CVC3::LISP_LANG, CVC3::pop(), CVC3::PRESENTATION_LANG, CVC3::Expr::printAST(), CVC3::push(), CVC3::SIMULATE, CVC3::SMTLIB_LANG, and CVC3::space().
SimulateProofRules* CVC3::TheorySimulate::d_rules [private] |
Our local proof rules.
Definition at line 49 of file theory_simulate.h.
Referenced by rewrite(), TheorySimulate(), and ~TheorySimulate().