kodkod.ast
Class RelationPredicate.Function

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

public static final class RelationPredicate.Function
extends RelationPredicate

Represents the function predicate. The predicate states that the given relation is a total or partial function with the specified domain and range.

Author:
Emina Torlak
invariant:
name = FUNCTION
domain.arity = range.arity = 1
children = relation + domain + range
specfield:
relation: Relation
domain, range: Expression
targetMult: ONE + LONE

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
 Expression domain()
          Returns the domain of this.relation.
 RelationPredicate.Name name()
          Returns the name of this predicate.
 Expression range()
          Returns the range of this.relation.
 Multiplicity targetMult()
          Returns the target multiplicity of the function represented 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:
this.name

targetMult

public Multiplicity targetMult()
Returns the target multiplicity of the function represented by this.relation.

Returns:
this.targetMult

domain

public Expression domain()
Returns the domain of this.relation.

Returns:
this.domain

range

public Expression range()
Returns the range of this.relation.

Returns:
this.range

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