com.ibm.wala.logic
Class BinaryRelation
java.lang.Object
com.ibm.wala.logic.BinaryRelation
- All Implemented Interfaces:
- IRelation
- Direct Known Subclasses:
- InvertedUnaryFunction
public class BinaryRelation
- extends java.lang.Object
- implements IRelation
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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
BinaryRelation
protected BinaryRelation(java.lang.String symbol)
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.