kodkod.ast
Class SumExpression

java.lang.Object
  extended by kodkod.ast.IntExpression
      extended by kodkod.ast.SumExpression
All Implemented Interfaces:
Node

public final class SumExpression
extends IntExpression

Denotes the integer obtained by summing the values of an iteger expression ie for all values of a scalar x drawn from a set e.

Author:
Emina Torlak
invariant:
all d: decls.children | d.multiplicity = 1
specfield:
intExpr: IntExpression
decls: Decls
children = intExpr + decls

Method Summary
<E,F,D,I> I
accept(ReturnVisitor<E,F,D,I> visitor)
          Accepts the given visitor and returns the result of the visit (i.e. the result of the call visitor.visit(this))
 void accept(VoidVisitor visitor)
          Accepts the given void visitor by calling visitor.visit(this).
 Decls declarations()
          Returns this.decls.
 IntExpression intExpr()
          Returns this.intExpr.
 java.lang.String toString()
          Returns the string representation of this int expression.
 
Methods inherited from class kodkod.ast.IntExpression
abs, and, apply, compare, compose, divide, eq, gt, gte, lt, lte, minus, modulo, multiply, negate, not, or, plus, sha, shl, shr, signum, sum, toExpression, xor
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

declarations

public final Decls declarations()
Returns this.decls.

Returns:
this.decls

intExpr

public final IntExpression intExpr()
Returns this.intExpr.

Returns:
this.intExpr

accept

public <E,F,D,I> I accept(ReturnVisitor<E,F,D,I> visitor)
Accepts the given visitor and returns the result of the visit (i.e. the result of the call visitor.visit(this))

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

accept

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

Specified by:
accept in interface Node
Specified by:
accept in class IntExpression
See Also:
IntExpression.accept(kodkod.ast.visitor.VoidVisitor)

toString

public java.lang.String toString()
Returns the string representation of this int expression.

Overrides:
toString in class java.lang.Object
Returns:
string representation of this int expression