CVCL::TheoryDatatypeLazy Class Reference
[Theories]

This theory handles datatypes. More...

#include <theory_datatype_lazy.h>

Inheritance diagram for CVCL::TheoryDatatypeLazy:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

Private Types

Private Member Functions

Private Attributes


Detailed Description

This theory handles datatypes.

Author: Clark Barrett

Created: Wed Dec 1 22:27:12 2004

Definition at line 50 of file theory_datatype_lazy.h.


Member Enumeration Documentation

enum CVCL::TheoryDatatypeLazy::ProcessKinds [private]
 

Enumerator:
MERGE1 
MERGE2 
ENQUEUE 

Definition at line 52 of file theory_datatype_lazy.h.


Constructor & Destructor Documentation

TheoryDatatypeLazy::TheoryDatatypeLazy TheoryCore theoryCore  ) 
 

Definition at line 49 of file theory_datatype_lazy.cpp.

CVCL::TheoryDatatypeLazy::~TheoryDatatypeLazy  )  [inline]
 

Definition at line 72 of file theory_datatype_lazy.h.


Member Function Documentation

void TheoryDatatypeLazy::instantiate const Expr e,
const bigunsigned u
[private]
 

Definition at line 58 of file theory_datatype_lazy.cpp.

References CVCL::Type::arity(), CVCL::ExprMap< Data >::begin(), CVCL::TheoryDatatype::d_datatypes, CVCL::TheoryDatatype::d_facts, d_processQueue, d_processQueueKind, CVCL::TheoryDatatype::d_rules, CVCL::DatatypeProofRules::dummyTheorem(), CVCL::ExprMap< Data >::end(), ENQUEUE, CVCL::Expr::eqExpr(), CVCL::EXISTS, CVCL::ExprMap< Data >::find(), CVCL::Theory::findExpr(), CVCL::Theory::getEM(), CVCL::Type::getExpr(), CVCL::Expr::getType(), CVCL::Expr::hasFind(), CVCL::isConstructor(), CVCL::Expr::isFinite(), CVCL::Expr::isSelected(), CVCL::Expr::isTranslated(), CVCL::Expr::mkOp(), CVCL::ExprManager::newClosureExpr(), CVCL::CDList< T >::push_back(), CVCL::Expr::setTranslated(), CVCL::Expr::toString(), and CVCL::Type::toString().

Referenced by initializeLabels(), and mergeLabels().

void TheoryDatatypeLazy::initializeLabels const Expr e,
const Type t
[private, virtual]
 

Reimplemented from CVCL::TheoryDatatype.

Definition at line 98 of file theory_datatype_lazy.cpp.

References CVCL::TheoryDatatype::d_datatypes, CVCL::TheoryDatatype::d_labels, CVCL::TheoryDatatype::d_splitters, d_typeComplete, CVCL::CDMap< Key, Data, HashFcn >::end(), CVCL::ExprMap< Data >::end(), CVCL::CDMap< Key, Data, HashFcn >::find(), CVCL::ExprMap< Data >::find(), CVCL::Theory::findExpr(), CVCL::getConstructor(), CVCL::Type::getExpr(), CVCL::CDMap< Key, Data, HashFcn >::insert(), instantiate(), CVCL::isConstructor(), CVCL::CDList< T >::push_back(), CVCL::ExprMap< Data >::size(), CVCL::Theory::theoryCore(), and CVCL::Expr::toString().

Referenced by setup().

void TheoryDatatypeLazy::mergeLabels const Theorem thm,
const Expr e1,
const Expr e2
[private, virtual]
 

Reimplemented from CVCL::TheoryDatatype.

Definition at line 131 of file theory_datatype_lazy.cpp.

References CVCL::TheoryDatatype::d_facts, CVCL::TheoryDatatype::d_labels, CVCL::TheoryDatatype::d_rules, CVCL::DatatypeProofRules::dummyTheorem(), CVCL::CDMap< Key, Data, HashFcn >::end(), CVCL::Theory::falseExpr(), CVCL::CDMap< Key, Data, HashFcn >::find(), CVCL::Theory::find(), CVCL::Theorem::getRHS(), CVCL::Expr::getType(), CVCL::Expr::hasFind(), instantiate(), CVCL::Theorem::isNull(), CVCL::CDList< T >::push_back(), and CVCL::Theory::setInconsistent().

Referenced by checkSat().

void TheoryDatatypeLazy::mergeLabels const Theorem thm,
const Expr e,
unsigned  position,
bool  positive
[private, virtual]
 

Reimplemented from CVCL::TheoryDatatype.

Definition at line 159 of file theory_datatype_lazy.cpp.

References CVCL::TheoryDatatype::d_facts, CVCL::TheoryDatatype::d_labels, CVCL::TheoryDatatype::d_rules, CVCL::DatatypeProofRules::dummyTheorem(), CVCL::CDMap< Key, Data, HashFcn >::end(), CVCL::Theory::falseExpr(), CVCL::CDMap< Key, Data, HashFcn >::find(), CVCL::Theory::find(), CVCL::Theorem::getRHS(), CVCL::Expr::hasFind(), instantiate(), CVCL::CDList< T >::push_back(), and CVCL::Theory::setInconsistent().

void TheoryDatatypeLazy::checkSat bool  fullEffort  )  [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.

Reimplemented from CVCL::TheoryDatatype.

Definition at line 186 of file theory_datatype_lazy.cpp.

References CVCL::Theory::addSplitter(), CVCL::ExprMap< Data >::begin(), CVCL::TheoryDatatype::d_datatypes, CVCL::TheoryDatatype::d_facts, CVCL::TheoryDatatype::d_labels, d_processIndex, d_processQueue, d_processQueueKind, CVCL::TheoryDatatype::d_splitterAsserted, CVCL::TheoryDatatype::d_splitters, CVCL::TheoryDatatype::d_splittersIndex, d_typeComplete, CVCL::TheoryDatatype::datatypeTestExpr(), CVCL::ExprMap< Data >::end(), CVCL::CDMap< Key, Data, HashFcn >::end(), ENQUEUE, CVCL::Theory::enqueueFact(), CVCL::ExprMap< Data >::find(), CVCL::CDMap< Key, Data, HashFcn >::find(), CVCL::Theory::findExpr(), CVCL::Theorem::getLHS(), CVCL::Theorem::getRHS(), CVCL::Expr::isSelected(), MERGE1, MERGE2, mergeLabels(), CVCL::CDList< T >::push_back(), CVCL::Expr::setSelected(), and CVCL::CDList< T >::size().

void TheoryDatatypeLazy::setup const Expr e  )  [virtual]
 

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.

See also:
update

Reimplemented from CVCL::TheoryDatatype.

Definition at line 254 of file theory_datatype_lazy.cpp.

References CVCL::Expr::addToNotify(), CVCL::APPLY, CVCL::Expr::arity(), CVCL::TheoryDatatype::d_labels, d_processQueue, d_processQueueKind, CVCL::TheoryDatatype::d_rules, CVCL::DATATYPE, CVCL::CDMap< Key, Data, HashFcn >::end(), ENQUEUE, CVCL::CDMap< Key, Data, HashFcn >::find(), CVCL::Type::getExpr(), CVCL::Expr::getKind(), CVCL::Expr::getType(), initializeLabels(), CVCL::isConstructor(), CVCL::isSelector(), MERGE2, CVCL::DatatypeProofRules::noCycle(), CVCL::CDList< T >::push_back(), CVCL::Theory::reflexivityRule(), CVCL::Expr::setSelected(), and CVCL::Theory::setupCC().

void TheoryDatatypeLazy::update const Theorem e,
const Expr d
[virtual]
 

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.

See also:
setup

Reimplemented from CVCL::TheoryDatatype.

Definition at line 275 of file theory_datatype_lazy.cpp.

References CVCL::Expr::addToNotify(), CVCL::Expr::arity(), CVCL::TheoryDatatype::canCollapse(), CVCL::TheoryDatatype::d_facts, d_processQueue, d_processQueueKind, CVCL::TheoryDatatype::d_rules, CVCL::DatatypeProofRules::decompose(), ENQUEUE, CVCL::Theorem::getLHS(), CVCL::Expr::getOpExpr(), CVCL::Expr::getRep(), CVCL::Theorem::getRHS(), CVCL::Expr::getSig(), CVCL::Expr::isApply(), CVCL::isConstructor(), CVCL::Theorem::isNull(), CVCL::Expr::isNull(), CVCL::isSelector(), CVCL::isTester(), MERGE2, CVCL::CDList< T >::push_back(), CVCL::DatatypeProofRules::rewriteSelCons(), CVCL::DatatypeProofRules::rewriteTestCons(), CVCL::Expr::setRep(), CVCL::Expr::setSig(), CVCL::Theory::symmetryRule(), CVCL::Theory::transitivityRule(), and CVCL::Theory::updateHelper().


Member Data Documentation

CDList<Theorem> CVCL::TheoryDatatypeLazy::d_processQueue [private]
 

Definition at line 58 of file theory_datatype_lazy.h.

Referenced by checkSat(), instantiate(), setup(), and update().

CDList<ProcessKinds> CVCL::TheoryDatatypeLazy::d_processQueueKind [private]
 

Definition at line 59 of file theory_datatype_lazy.h.

Referenced by checkSat(), instantiate(), setup(), and update().

CDO<unsigned> CVCL::TheoryDatatypeLazy::d_processIndex [private]
 

Definition at line 60 of file theory_datatype_lazy.h.

Referenced by checkSat().

CDO<bool> CVCL::TheoryDatatypeLazy::d_typeComplete [private]
 

Definition at line 61 of file theory_datatype_lazy.h.

Referenced by checkSat(), and initializeLabels().


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