|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkodkod.ast.Expression
public abstract class Expression
A relational expression. Unless otherwise noted, all methods in this class throw a NullPointerException when given null arguments.
arity > 0 |
arity: int |
Field Summary | |
---|---|
static Expression |
IDEN
The identity relation: maps all atoms in a universe of discourse to themselves. |
static Expression |
INTS
The integer relation: contains all atoms bound to integers |
static Expression |
NONE
The empty relation: contains no atoms. |
static Expression |
UNIV
The universal relation: contains all atoms in a universe of discourse . |
Method Summary | ||
---|---|---|
abstract
|
accept(ReturnVisitor<E,F,D,I> visitor)
Accepts the given visitor and returns the result. |
|
IntExpression |
apply(ExprToIntCast.Operator op)
Returns the cast of this expression to an integer expression, that represents either the cardinality of this expression (if op is CARDINALITY) or the sum of the integer atoms it contains (if op is SUM). |
|
Formula |
apply(Multiplicity mult)
Returns the formula that results from applying the specified multiplicity to this expression. |
|
Expression |
apply(UnaryExpression.Operator op)
Returns the expression that results from applying the given unary operator to this. |
|
abstract int |
arity()
Returns the arity of this expression. |
|
Expression |
closure()
Returns the transitive closure of this. |
|
Expression |
compose(BinaryExpression.Operator op,
Expression expr)
Returns the composition of this and the specified expression, using the given binary operator. |
|
Formula |
compose(ComparisonFormula.Operator op,
Expression expr)
Returns the formula that represents the composition of this and the given expression with the given comparison operator. |
|
IntExpression |
count()
Returns the cardinality of this expression. |
|
Expression |
difference(Expression expr)
Returns the difference of this and the specified expression. |
|
Formula |
eq(Expression expr)
Returns the formula 'this = expr'. |
|
Formula |
in(Expression expr)
Returns the formula 'this in expr'. |
|
Expression |
intersection(Expression expr)
Returns the intersection of this and the specified expression. |
|
Expression |
join(Expression expr)
Returns the join of this and the specified expression. |
|
Formula |
lone()
Returns the formula 'lone this'. |
|
Formula |
no()
Returns the formula 'no this'. |
|
Formula |
one()
Returns the formula 'one this'. |
|
Expression |
override(Expression expr)
Returns the relational override of this with the specified expression. |
|
Expression |
product(Expression expr)
Returns the product of this and the specified expression. |
|
Expression |
project(IntExpression... columns)
Returns the projection of this expression onto the specified columns. |
|
Expression |
reflexiveClosure()
Returns the reflexive transitive closure of this. |
|
Formula |
some()
Returns the formula 'some this'. |
|
IntExpression |
sum()
Returns the sum of the integer atoms in this expression. |
|
Expression |
transpose()
Returns the transpose of this. |
|
Expression |
union(Expression expr)
Returns the union of this and the specified expression. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface kodkod.ast.Node |
---|
accept |
Field Detail |
---|
public static final Expression UNIV
universe of discourse
.
public static final Expression IDEN
universe of discourse
to themselves.
public static final Expression NONE
public static final Expression INTS
bound
to integers
Method Detail |
---|
public final Expression join(Expression expr)
public final Expression product(Expression expr)
public final Expression union(Expression expr)
public final Expression difference(Expression expr)
public final Expression intersection(Expression expr)
public final Expression override(Expression expr)
public final Expression compose(BinaryExpression.Operator op, Expression expr)
public final Expression transpose()
public final Expression closure()
java.lang.IllegalArgumentException
- - this.arity != 2public final Expression reflexiveClosure()
java.lang.IllegalArgumentException
- - this.arity != 2public final Expression apply(UnaryExpression.Operator op)
java.lang.IllegalArgumentException
- - this.arity != 2public final Expression project(IntExpression... columns)
java.lang.IllegalArgumentException
- - columns.length < 1public final IntExpression count()
public final IntExpression sum()
public final IntExpression apply(ExprToIntCast.Operator op)
public final Formula eq(Expression expr)
public final Formula in(Expression expr)
public final Formula compose(ComparisonFormula.Operator op, Expression expr)
public final Formula some()
public final Formula no()
public final Formula one()
public final Formula lone()
public final Formula apply(Multiplicity mult)
java.lang.IllegalArgumentException
- - mult = Multiplicity.SETpublic abstract int arity()
public abstract <E,F,D,I> E accept(ReturnVisitor<E,F,D,I> visitor)
accept
in interface Node
Node.accept(kodkod.ast.visitor.ReturnVisitor)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |