CVC3
Public Member Functions | Private Types | Private Member Functions | Private Attributes

CVC3::TheoryDatatypeLazy Class Reference

This theory handles datatypes. More...

#include <theory_datatype_lazy.h>

Inherits CVC3::TheoryDatatype.

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


Member Enumeration Documentation

Enumerator:
MERGE1 
MERGE2 
ENQUEUE 

Definition at line 45 of file theory_datatype_lazy.h.


Constructor & Destructor Documentation

TheoryDatatypeLazy::TheoryDatatypeLazy ( TheoryCore theoryCore)

Definition at line 41 of file theory_datatype_lazy.cpp.

CVC3::TheoryDatatypeLazy::~TheoryDatatypeLazy ( ) [inline]

Definition at line 65 of file theory_datatype_lazy.h.


Member Function Documentation

void TheoryDatatypeLazy::instantiate ( const Expr e,
const Unsigned u 
) [private, virtual]
void TheoryDatatypeLazy::initializeLabels ( const Expr e,
const Type t 
) [private, virtual]
void TheoryDatatypeLazy::mergeLabels ( const Theorem thm,
const Expr e1,
const Expr e2 
) [private, virtual]
void TheoryDatatypeLazy::mergeLabels ( const Theorem thm,
const Expr e,
unsigned  position,
bool  positive 
) [private, virtual]
void TheoryDatatypeLazy::checkSat ( bool  fullEffort) [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.

Reimplemented from CVC3::TheoryDatatype.

Definition at line 178 of file theory_datatype_lazy.cpp.

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

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 CVC3::TheoryDatatype.

Definition at line 246 of file theory_datatype_lazy.cpp.

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

Definition at line 267 of file theory_datatype_lazy.cpp.

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


Member Data Documentation

Definition at line 51 of file theory_datatype_lazy.h.

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

Definition at line 52 of file theory_datatype_lazy.h.

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

Definition at line 53 of file theory_datatype_lazy.h.

Referenced by checkSat().

Definition at line 54 of file theory_datatype_lazy.h.

Referenced by checkSat(), and initializeLabels().


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