Data structure of expressions in CVC Lite.
More...
#include <expr.h>
Collaboration diagram for CVCL::Expr:
[legend]List of all members.Public Member Functions
- Expr ()
- Default constructor creates the Null Expr.
- Expr (const Expr &e)
- Copy constructor and assignment (copy the pointer and take care of the refcount).
- Expr & operator= (const Expr &e)
- Assignment operator: take care of the refcounting and GC.
- Expr (const Op &op, const Expr &child)
- Expr (const Op &op, const Expr &child0, const Expr &child1)
- Expr (const Op &op, const Expr &child0, const Expr &child1, const Expr &child2)
- Expr (const Op &op, const Expr &child0, const Expr &child1, const Expr &child2, const Expr &child3)
- Expr (const Op &op, const std::vector< Expr > &children, ExprManager *em=NULL)
- ~Expr ()
- Destructor.
- Expr eqExpr (const Expr &right) const
- Expr notExpr () const
- Expr negate () const
- Expr andExpr (const Expr &right) const
- Expr orExpr (const Expr &right) const
- Expr iteExpr (const Expr &thenpart, const Expr &elsepart) const
- Expr iffExpr (const Expr &right) const
- Expr impExpr (const Expr &right) const
- Expr skolemExpr (int i) const
- Create a Skolem constant for the i'th variable of an existential (*this).
- Expr rebuild (ExprManager *em) const
- Rebuild Expr with a new ExprManager.
- Expr substExpr (const std::vector< Expr > &oldTerms, const std::vector< Expr > &newTerms) const
- Expr substExpr (const ExprHashMap< Expr > &oldToNew) const
- Expr operator! () const
- Expr operator && (const Expr &right) const
- Expr operator|| (const Expr &right) const
- size_t hash () const
- bool isFalse () const
- bool isTrue () const
- bool isBoolConst () const
- bool isVar () const
- bool isBoundVar () const
- bool isString () const
- bool isClosure () const
- bool isQuantifier () const
- bool isLambda () const
- bool isApply () const
- bool isSymbol () const
- bool isType () const
- Expr represents a type.
- const ExprValue * getExprValue () const
- Provide access to ExprValue for client subclasses of ExprValue *only*.
- bool isTerm () const
- Test if e is a term (as opposed to a predicate/formula).
- bool isAtomic () const
- Test if e is atomic.
- bool isAtomicFormula () const
- Test if e is an atomic formula.
- bool isAbsAtomicFormula () const
- An abstract atomic formua is an atomic formula or a quantified formula.
- bool isLiteral () const
- Test if e is a literal.
- bool isAbsLiteral () const
- Test if e is an abstract literal.
- bool isBoolConnective () const
- A Bool connective is one of NOT,AND,OR,IMPLIES,IFF,XOR,ITE (with type Bool).
- bool isPropAtom () const
- True iff expr is not a Bool connective.
- bool isPropLiteral () const
- PropAtom or negation of PropAtom.
- bool isEq () const
- bool isNot () const
- bool isAnd () const
- bool isOr () const
- bool isITE () const
- bool isIff () const
- bool isImpl () const
- bool isXor () const
- bool isForall () const
- bool isExists () const
- bool isRational () const
- bool isSkolem () const
- const std::string & getName () const
- const std::string & getUid () const
- For BOUND_VAR, get the UID.
- const std::string & getString () const
- const std::vector< Expr > & getVars () const
- Get bound variables from a closure Expr.
- const Expr & getExistential () const
- Get the existential axiom expression for skolem constant.
- int getBoundIndex () const
- Get the index of the bound var that skolem constant comes from.
- const Expr & getBody () const
- Get the body of the closure Expr.
- const Rational & getRational () const
- Get the Rational value out of RATIONAL_EXPR.
- ExprManager * getEM () const
- const std::vector< Expr > & getKids () const
- int getKind () const
- ExprIndex getIndex () const
- bool hasLastIndex () const
- Op mkOp () const
- Make the expr into an operator.
- Op getOp () const
- Get operator from expression.
- Expr getOpExpr () const
- Get expression of operator (for APPLY Exprs only).
- int getOpKind () const
- Get kind of operator (for APPLY Exprs only).
- int arity () const
- const Expr & operator[] (int i) const
- const Expr & unnegate () const
- Remove leading NOT if any.
- iterator begin () const
- Begin iterator.
- iterator end () const
- End iterator.
- bool isNull () const
- bool isInitialized () const
- size_t getMMIndex () const
- Get the memory manager index (it uniquely identifies the subclass).
- bool hasFind () const
- Theorem getFind () const
- NotifyList * getNotify () const
- const Type getType () const
- Get the type. Recursively compute if necessary.
- const Type lookupType () const
- Look up the current type. Do not recursively compute (i.e. may be NULL).
- const Expr lookupTCC () const
- Look up the cached TCC (may return Null).
- const Theorem lookupSubtypePred () const
- Look up the cached subtyping predicate (may return Null).
- bool validSimpCache () const
- Return true if there is a valid cached value for calling simplify on this Expr.
- const Theorem & getSimpCache () const
- bool isValidType () const
- bool validIsAtomicFlag () const
- bool getIsAtomicFlag () const
- bool isRewriteNormal () const
- bool isFinite () const
- bool isWellFounded () const
- bool computeTransClosure () const
- bool isImpliedLiteral () const
- bool isUserAssumption () const
- bool isIntAssumption () const
- bool isJustified () const
- bool isTranslated () const
- bool isUserRegisteredAtom () const
- bool isSelected () const
- bool getFlag () const
- Check if the generic flag is set.
- void setFlag () const
- Set the generic flag.
- void clearFlags () const
- Clear the generic flag in all Exprs.
- std::string toString () const
- Print the expression to a string.
- std::string toString (InputLanguage lang) const
- Print the expression to a string using the given output language.
- void print (InputLanguage lang, bool dagify=true) const
- Print the expression in the specified format.
- void print () const
- Print the expression as AST (lisp-like format).
- void printnodag () const
- Print the expression as AST without dagifying.
- void pprint () const
- Pretty-print the expression.
- void pprintnodag () const
- Pretty-print without dagifying.
- ExprStream & print (ExprStream &os) const
- Print a leaf node.
- ExprStream & printAST (ExprStream &os) const
- Print the top node and then recurse through the children */.
- Expr & indent (int n, bool permanent=false)
- Set initial indentation to n.
- void setFind (const Theorem &e) const
- Set the find attribute to e.
- void addToNotify (Theory *i, const Expr &e) const
- Add (e,i) to the notify list of this expression.
- void setType (const Type &t) const
- Set the cached type.
- void setTCC (const Expr &tcc) const
- Set the cached TCC.
- void setSubtypePred (const Theorem &pred) const
- Set the cached subtyping predicate.
- void setSimpCache (const Theorem &e) const
- void setValidType () const
- void setIsAtomicFlag (bool value) const
- void setRewriteNormal () const
- void clearRewriteNormal () const
- void setFinite () const
- void setWellFounded () const
- void setComputeTransClosure () const
- void setImpliedLiteral () const
- void setUserAssumption (int scope=-1) const
- void setIntAssumption () const
- void setJustified () const
- void setTranslated (int scope=-1) const
- Set the translated flag for this Expr.
- void setUserRegisteredAtom () const
- Set the UserRegisteredAtom flag for this Expr.
- void setSelected () const
- Set the Selected flag for this Expr.
- bool subExprOf (const Expr &e) const
- Check if the current Expr (*this) is a subexpression of e.
- int getHeight () const
- int getHighestKid () const
- bool hasSimpFrom () const
- const Expr & getSimpFrom () const
- void setSimpFrom (const Expr &simpFrom)
- bool hasSig () const
- bool hasRep () const
- const Theorem & getSig () const
- const Theorem & getRep () const
- void setSig (const Theorem &e) const
- void setRep (const Theorem &e) const
Static Public Member Functions
Private Types
- enum StaticFlagsEnum {
VALID_TYPE = 0x1,
VALID_IS_ATOMIC = 0x2,
IS_ATOMIC = 0x4,
REWRITE_NORMAL = 0x8,
IS_FINITE = 0x400,
WELL_FOUNDED = 0x800,
COMPUTE_TRANS_CLOSURE = 0x1000
}
- bit-masks for static flags More...
- enum DynamicFlagsEnum {
IMPLIED_LITERAL = 0x10,
IS_USER_ASSUMPTION = 0x20,
IS_INT_ASSUMPTION = 0x40,
IS_JUSTIFIED = 0x80,
IS_TRANSLATED = 0x100,
IS_USER_REGISTERED_ATOM = 0x200,
IS_SELECTED = 0x2000
}
- bit-masks for dynamic flags More...
Private Member Functions
Private Attributes
Static Private Attributes
Friends
Classes
Detailed Description
Data structure of expressions in CVC Lite.
Class: Expr
Author: Clark Barrett
Created: Mon Nov 25 15:29:37 2002
This class is the main data structure for expressions that all other components should use. It is actually a smart pointer to the actual data holding class ExprValue and its subclasses.
Expressions are represented as DAGs with maximal sharing of subexpressions. Therefore, testing for equality is a constant time operation (simply compare the pointers).
Unused expressions are automatically garbage-collected. The use is determined by a reference counting mechanism. In particular, this means that if there is a circular dependency among expressions (e.g. an attribute points back to the expression itself), these expressions will not be garbage-collected, even if no one else is using them.
The most frequently used operations are getKind() (determining the kind of the top level node of the expression), arity() (how many children an Expr has), operator[]() for accessing a child, and various testers and methods for constructing new expressions.
In addition, a total ordering operator<() is provided. It is guaranteed to remain the same for the lifetime of the expressions (it may change, however, if the expression is garbage-collected and reborn).
Definition at line 133 of file expr.h.
Friends And Related Function Documentation
friend class ExprHasher [friend] |
|
friend class ::CInterface [friend] |
|
The documentation for this class was generated from the following files:
Generated on Thu Apr 13 16:57:43 2006 for CVC Lite by
1.4.4