kodkod.ast
Class RelationPredicate.TotalOrdering

java.lang.Object
  extended by kodkod.ast.Formula
      extended by kodkod.ast.RelationPredicate
          extended by kodkod.ast.RelationPredicate.TotalOrdering
All Implemented Interfaces:
Node
Enclosing class:
RelationPredicate

public static final class RelationPredicate.TotalOrdering
extends RelationPredicate

Represents the total ordering predicate. The predicate states that the given relation imposes a total ordering over the set ordered, and that the smallest/largest elements resulting from the ordering are given by the first/last relations.

invariant:
name = TOTAL_ORDERING
ordered.arity = first.arity = last.arity = 1
children = relation + ordered + first + last
specfield:
relation: Relation
ordered, first, last: Relation

Nested Class Summary
 
Nested classes/interfaces inherited from class kodkod.ast.RelationPredicate
RelationPredicate.Acyclic, RelationPredicate.Function, RelationPredicate.Name, RelationPredicate.TotalOrdering
 
Field Summary
 
Fields inherited from class kodkod.ast.Formula
FALSE, TRUE
 
Method Summary
 Relation first()
          Returns the relation representing the first element in the ordering imposed by this.relation.
 Relation last()
          Returns the relation representing the last element in the ordering imposed by this.relation.
 RelationPredicate.Name name()
          Returns the name of this predicate.
 Relation ordered()
          Returns the relation representing the atoms which are ordered by this.relation.
 Formula toConstraints()
          Turns this predicate into explicit constraiants.
 java.lang.String toString()
          Returns the string representation of this predicate.
 
Methods inherited from class kodkod.ast.RelationPredicate
accept, accept, relation
 
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

name

public RelationPredicate.Name name()
Returns the name of this predicate.

Specified by:
name in class RelationPredicate
Returns:
TOTAL_ORDERING

first

public Relation first()
Returns the relation representing the first element in the ordering imposed by this.relation.

Returns:
this.first

last

public Relation last()
Returns the relation representing the last element in the ordering imposed by this.relation.

Returns:
this.last

ordered

public Relation ordered()
Returns the relation representing the atoms which are ordered by this.relation.

Returns:
this.ordered

toConstraints

public Formula toConstraints()
Turns this predicate into explicit constraiants.

Specified by:
toConstraints in class RelationPredicate
Returns:
{f: Formula - RelationPredicate | f <=> this }

toString

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

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