kodkod.ast
Class ProjectExpression

java.lang.Object
  extended by kodkod.ast.Expression
      extended by kodkod.ast.ProjectExpression
All Implemented Interfaces:
Node

public final class ProjectExpression
extends Expression

A general projection expression. For example, let [[e]] = {<a, b, c>, <d, e, f>, <d, g, f>}. Then, project(e, 1, 3) = {<a, c>, <d, f>} and project(e, 1, 1, 2) = {<a, a, b>, <d, d, e>, <d, d, g>}.

Author:
Emina Torlak
invariant:
children = expression + columns[int]
specfield:
expression: Expression
arity: [1..)
columns: [0..arity) -> one IntExpression

Field Summary
 
Fields inherited from class kodkod.ast.Expression
IDEN, INTS, NONE, UNIV
 
Method Summary
<E,F,D,I> E
accept(ReturnVisitor<E,F,D,I> visitor)
          Accepts the given visitor and returns the result.
 void accept(VoidVisitor visitor)
          Accepts the given void visitor by calling visitor.visit(this).
 int arity()
          Returns this.arity.
 java.util.List<IntExpression> columns()
          Returns this.columns.
 Expression expression()
          Returns this.expression.
 java.lang.String toString()
          Returns the string representation of this expression.
 
Methods inherited from class kodkod.ast.Expression
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
 

Method Detail

arity

public int arity()
Returns this.arity.

Specified by:
arity in class Expression
Returns:
this.arity

expression

public Expression expression()
Returns this.expression.

Returns:
this.expressioin

columns

public java.util.List<IntExpression> columns()
Returns this.columns.

Returns:
this.columns

accept

public <E,F,D,I> E accept(ReturnVisitor<E,F,D,I> visitor)
Accepts the given visitor and returns the result.

Specified by:
accept in interface Node
Specified by:
accept in class Expression
Returns:
the result of being visited by the given visitor
See Also:
Expression.accept(kodkod.ast.visitor.ReturnVisitor)

accept

public void accept(VoidVisitor visitor)
Accepts the given void visitor by calling visitor.visit(this).

See Also:
Node.accept(kodkod.ast.visitor.VoidVisitor)

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