kodkod.ast
Class LeafExpression
java.lang.Object
kodkod.ast.Expression
kodkod.ast.LeafExpression
- All Implemented Interfaces:
- Node
- Direct Known Subclasses:
- ConstantExpression, Relation, Variable
public abstract class LeafExpression
- extends Expression
An expression with no children.
Relation
and Variable
are examples of leaf exressions. Two leaf expressions are equal
if and only if they refer to the same object. That is,
leaf1.eauls(leaf2) <=> leaf1 == leaf2. A leaf has a name, which is
basically a comment for the purpose of printing, viewing, etc. The name
has no meaning otherwise.
- Author:
- Emina Torlak
- specfield:
name: String |
arity: int |
no children |
Method Summary |
int |
arity()
Returns the arity of this leaf. |
java.lang.String |
name()
Returns the name of this leaf. |
java.lang.String |
toString()
Returns the string representation of this expression. |
Methods inherited from class kodkod.ast.Expression |
accept, apply, apply, apply, closure, compose, compose, count, difference, eq, in, intersection, join, lone, no, one, override, product, project, reflexiveClosure, some, sum, transpose, union |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface kodkod.ast.Node |
accept |
arity
public final int arity()
- Returns the arity of this leaf.
- Specified by:
arity
in class Expression
- Returns:
- this.arity
name
public final java.lang.String name()
- Returns the name of this leaf.
- Returns:
- this.name
toString
public java.lang.String toString()
- Returns the string representation of this expression.
- Overrides:
toString
in class java.lang.Object
- Returns:
- string representation of this expression