|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectLBJ2.infer.Constraint
LBJ2.infer.FirstOrderConstraint
LBJ2.infer.FirstOrderEquality
LBJ2.infer.FirstOrderEqualityWithValue
public class FirstOrderEqualityWithValue
Represents the comparison of a classifier application with a value.
| Field Summary | |
|---|---|
protected FirstOrderVariable |
left
The variable on the left of the equality. |
protected java.lang.String |
right
The value on the right of the equality. |
| Fields inherited from class LBJ2.infer.FirstOrderEquality |
|---|
equality, replacer, variableMap |
| Constructor Summary | |
|---|---|
FirstOrderEqualityWithValue(boolean e,
FirstOrderVariable l,
java.lang.String r)
Initializing constructor. |
|
FirstOrderEqualityWithValue(boolean e,
FirstOrderVariable l,
java.lang.String r,
EqualityArgumentReplacer ear)
This constructor specifies a variable setter for when this equality is quantified. |
|
| Method Summary | |
|---|---|
void |
consolidateVariables(java.util.AbstractMap m)
Replaces all unquantified variables with the unique copy stored as a value of the given map; also instantiates all quantified variables and stores them in the given map. |
boolean |
equals(java.lang.Object o)
Two FirstOrderEqualityWithValues are equivalent when their
children are equivalent. |
boolean |
evaluate()
Determines whether the constraint is satisfied. |
int |
hashCode()
The hash code of a FirstOrderEqualityWithValue is the sum
of the hash codes of its children plus 1. |
PropositionalConstraint |
propositionalize()
Transforms this first order constraint into a propositional constraint. |
void |
runVisit(Inference infer)
Calls the appropriate visit(·) method of the given
Inference for this Constraint, as per the
visitor pattern. |
void |
setQuantificationVariables(java.util.Vector o)
This method sets the given quantification variables to the given object references and evaluates the expressions involving those variables in this constraint's FirstOrderEquality children. |
| Methods inherited from class LBJ2.infer.FirstOrderEquality |
|---|
getChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected FirstOrderVariable left
protected java.lang.String right
| Constructor Detail |
|---|
public FirstOrderEqualityWithValue(boolean e,
FirstOrderVariable l,
java.lang.String r)
e - Indicates whether this is an equality or an inequality.l - The classifier application.r - The value.
public FirstOrderEqualityWithValue(boolean e,
FirstOrderVariable l,
java.lang.String r,
EqualityArgumentReplacer ear)
e - Indicates whether this is an equality or an inequality.l - The classifier application.r - The value.ear - An argument replacer.| Method Detail |
|---|
public void consolidateVariables(java.util.AbstractMap m)
consolidateVariables in class Constraintm - The map in which to find unique copies of the variables.public void setQuantificationVariables(java.util.Vector o)
FirstOrderEquality children.
setQuantificationVariables in class FirstOrderConstrainto - The new object references for the enclosing quantification
variables, in order of nesting.public boolean evaluate()
evaluate in class Constraintpublic PropositionalConstraint propositionalize()
propositionalize in class FirstOrderConstraintpublic int hashCode()
FirstOrderEqualityWithValue is the sum
of the hash codes of its children plus 1.
hashCode in class java.lang.ObjectFirstOrderEqualityWithValue.public boolean equals(java.lang.Object o)
FirstOrderEqualityWithValues are equivalent when their
children are equivalent.
equals in class java.lang.Objecttrue iff the argument is a
FirstOrderEqualityWithValue involving the same
children.public void runVisit(Inference infer)
visit(·) method of the given
Inference for this Constraint, as per the
visitor pattern.
runVisit in class Constraintinfer - The inference visiting this constraint.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||