com.ibm.wala.logic
Class BinaryRelation

java.lang.Object
  extended by com.ibm.wala.logic.BinaryRelation
All Implemented Interfaces:
IRelation
Direct Known Subclasses:
InvertedUnaryFunction

public class BinaryRelation
extends java.lang.Object
implements IRelation


Field Summary
static BinaryRelation EQUALS
           
static BinaryRelation GE
           
static BinaryRelation GT
           
static BinaryRelation LE
           
static BinaryRelation LT
           
static BinaryRelation NE
           
 
Constructor Summary
protected BinaryRelation(java.lang.String symbol)
           
 
Method Summary
static java.util.Collection<IFormula> buildConstraints(IBinaryNaturalRelation r, BinaryRelation R, IntPair domain)
          Build constraints which ensure that the relation r fully defines the relation R over the given range of integers.
 boolean equals(java.lang.Object obj)
           
 java.lang.String getSymbol()
           
 int getValence()
           
 int hashCode()
           
static BinaryRelation make(java.lang.String symbol)
           
static IFormula makeSetConstraint(Variable v, IntSet s)
          build a constraint saying v \in s
static BinaryRelation negate(IRelation relation)
          Attempt to negate a relation symbol.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EQUALS

public static final BinaryRelation EQUALS

NE

public static final BinaryRelation NE

LT

public static final BinaryRelation LT

LE

public static final BinaryRelation LE

GT

public static final BinaryRelation GT

GE

public static final BinaryRelation GE
Constructor Detail

BinaryRelation

protected BinaryRelation(java.lang.String symbol)
Method Detail

getValence

public int getValence()
Specified by:
getValence in interface IRelation
Returns:
the arity, or valence of this relation

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getSymbol

public java.lang.String getSymbol()
Specified by:
getSymbol in interface IRelation
Returns:
a string which uniquely identifies this relation

makeSetConstraint

public static IFormula makeSetConstraint(Variable v,
                                         IntSet s)
build a constraint saying v \in s

Throws:
java.lang.IllegalArgumentException - if s is null

buildConstraints

public static java.util.Collection<IFormula> buildConstraints(IBinaryNaturalRelation r,
                                                              BinaryRelation R,
                                                              IntPair domain)
Build constraints which ensure that the relation r fully defines the relation R over the given range of integers.

Throws:
java.lang.IllegalArgumentException - if domain is null

make

public static BinaryRelation make(java.lang.String symbol)

negate

public static BinaryRelation negate(IRelation relation)
Attempt to negate a relation symbol. Return null if unsucessful.