CVC3
Public Member Functions | Private Member Functions | Private Attributes

CVC3::TheorySimulate Class Reference

"Theory" of symbolic simulation. More...

#include <theory_simulate.h>

Inherits CVC3::Theory.

Collaboration diagram for CVC3::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 46 of file theory_simulate.h.


Constructor & Destructor Documentation

TheorySimulate::TheorySimulate ( TheoryCore core)

Constructor.

Definition at line 35 of file theory_simulate.cpp.

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

TheorySimulate::~TheorySimulate ( )

Destructor.

Definition at line 47 of file theory_simulate.cpp.

References d_rules.


Member Function Documentation

SimulateProofRules * TheorySimulate::createProofRules ( ) [private]

Create proof rules for this theory.

Definition at line 38 of file simulate_theorem_producer.cpp.

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.

Parameters:
fullEffortwhen 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 CVC3::Theory.

Definition at line 59 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 CVC3::Theory.

Definition at line 53 of file theory_simulate.cpp.

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

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

Compute and store the type of e.

Parameters:
eis 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 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::int2string(), CVC3::Type::isFunction(), CVC3::isRational(), CVC3::isReal(), CVC3::Expr::setType(), SIMULATE, CVC3::Type::toString(), and CVC3::Expr::toString().

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

Compute and cache the TCC of e.

Parameters:
eis 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 CVC3::Theory.

Definition at line 164 of file theory_simulate.cpp.

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

Expr TheorySimulate::parseExprOp ( const Expr e) [virtual]
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(), SIMULATE, CVC3::SMTLIB_LANG, CVC3::SMTLIB_V2_LANG, and CVC3::space().


Member Data Documentation

Our local proof rules.

Definition at line 49 of file theory_simulate.h.

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


The documentation for this class was generated from the following files: