CVCL::TheorySimulate Class Reference
[Theories]

"Theory" of symbolic simulation. More...

#include <theory_simulate.h>

Inheritance diagram for CVCL::TheorySimulate:

Inheritance graph
[legend]
Collaboration diagram for CVCL::TheorySimulate:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Member Functions

Private Attributes


Detailed Description

"Theory" of symbolic simulation.

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 54 of file theory_simulate.h.


Constructor & Destructor Documentation

TheorySimulate::TheorySimulate TheoryCore core  ) 
 

Constructor.

Definition at line 43 of file theory_simulate.cpp.

References createProofRules(), d_rules, CVCL::Theory::registerTheory(), and CVCL::SIMULATE.

TheorySimulate::~TheorySimulate  ) 
 

Destructor.

Definition at line 55 of file theory_simulate.cpp.

References d_rules.


Member Function Documentation

SimulateProofRules * TheorySimulate::createProofRules  )  [private]
 

Create proof rules for this theory.

Definition at line 46 of file simulate_theorem_producer.cpp.

References CVCL::Theory::theoryCore().

Referenced by TheorySimulate().

void CVCL::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 CVCL::Theory.

Definition at line 66 of file theory_simulate.h.

void CVCL::TheorySimulate::checkSat bool  fullEffort  )  [inline, virtual]
 

Check for satisfiability in the theory.

Parameters:
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.
If satisfiability can be acheived by merging some of the shared terms, a new fact must be enqueued using enqueueFact (this fact need not be a literal). If there is no way to make things satisfiable, setInconsistent must be called.

Implements CVCL::Theory.

Definition at line 67 of file theory_simulate.h.

Theorem TheorySimulate::rewrite const Expr e  )  [virtual]
 

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 61 of file theory_simulate.cpp.

References d_rules, CVCL::SimulateProofRules::expandSimulate(), CVCL::Expr::getKind(), CVCL::Theory::reflexivityRule(), and CVCL::SIMULATE.

void TheorySimulate::computeType const Expr e  )  [virtual]
 

Compute and store the type of e.

Parameters:
e is the expression whose type is computed.
This function computes the type of the top-level operator of e, and recurses into children using getType(), if necessary.

Reimplemented from CVCL::Theory.

Definition at line 73 of file theory_simulate.cpp.

References CVCL::Type::arity(), CVCL::Expr::arity(), CVCL::Type::funType(), CVCL::Theory::getBaseType(), CVCL::Expr::getKind(), CVCL::int2string(), CVCL::Type::isFunction(), CVCL::isRational(), CVCL::isReal(), CVCL::Expr::setType(), CVCL::SIMULATE, CVCL::Type::toString(), and CVCL::Expr::toString().

Expr TheorySimulate::computeTCC const Expr e  )  [virtual]
 

Compute and cache the TCC of e.

Parameters:
e is an expression (term or formula). This function computes the TCC of e which is true iff the expression is defined.
This function computes the TCC or predicate of the top-level operator of e, and recurses into children using getTCC(), if necessary.

The default implementation is to compute TCCs recursively for all children, and return their conjunction.

Reimplemented from CVCL::Theory.

Definition at line 172 of file theory_simulate.cpp.

References CVCL::andExpr(), CVCL::Expr::arity(), CVCL::Type::arity(), CVCL::ExprManager::falseExpr(), CVCL::Theory::getEM(), CVCL::Expr::getKind(), CVCL::Expr::getRational(), CVCL::Theorem::getRHS(), CVCL::Theory::getTypePred(), CVCL::Type::isFunction(), CVCL::Theory::rewriteAnd(), CVCL::SIMULATE, CVCL::Expr::toString(), and CVCL::ExprManager::trueExpr().

Expr CVCL::TheorySimulate::TheorySimulate::parseExprOp const Expr e  ) 
 

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 CVCL::Theory.

Definition at line 223 of file theory_simulate.cpp.

References CVCL::Expr::arity(), CVCL::Theory::d_theoryUsed, CVCL::Expr::getKind(), CVCL::ExprStream::lang(), CVCL::LISP_LANG, CVCL::pop(), CVCL::PRESENTATION_LANG, CVCL::Expr::printAST(), CVCL::push(), CVCL::SIMULATE, CVCL::SMTLIB_LANG, and CVCL::space().


Member Data Documentation

SimulateProofRules* CVCL::TheorySimulate::d_rules [private]
 

Our local proof rules.

Definition at line 57 of file theory_simulate.h.

Referenced by rewrite(), TheorySimulate(), and ~TheorySimulate().


The documentation for this class was generated from the following files:
Generated on Thu Apr 13 16:57:45 2006 for CVC Lite by  doxygen 1.4.4