kodkod.ast
Class IntComparisonFormula

java.lang.Object
  extended by kodkod.ast.Formula
      extended by kodkod.ast.IntComparisonFormula
All Implemented Interfaces:
Node

public final class IntComparisonFormula
extends Formula

An integer comparison formula, e.g. x = y, x <= y, etc.

Author:
Emina Torlak
invariant:
children = left + right
specfield:
left: IntExpression
right: IntExpression
op: Operator

Nested Class Summary
static class IntComparisonFormula.Operator
          Represents a binary comarison operator: =, < , >, <=, >=.
 
Field Summary
 
Fields inherited from class kodkod.ast.Formula
FALSE, TRUE
 
Method Summary
<E,F,D,I> F
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).
 IntExpression left()
          Returns the left child of this.
 IntComparisonFormula.Operator op()
          Returns the operator of this.
 IntExpression right()
          Returns the right child of this.
 java.lang.String toString()
          Returns the string representation of this formula.
 
Methods inherited from class kodkod.ast.Formula
and, compose, comprehension, forAll, forSome, iff, implies, not, or, quantify, thenElse, thenElse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

left

public IntExpression left()
Returns the left child of this.

Returns:
this.left

right

public IntExpression right()
Returns the right child of this.

Returns:
this.right

op

public IntComparisonFormula.Operator op()
Returns the operator of this.

Returns:
this.op

toString

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

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

accept

public <E,F,D,I> F 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 Formula
Returns:
the result of being visited by the given visitor
See Also:
Formula.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)