public class FirstOrderEqualityWithVariable extends FirstOrderEquality
| Modifier and Type | Field and Description |
|---|---|
protected FirstOrderVariable |
left
The variable on the left of the equality.
|
protected FirstOrderVariable |
right
The classifier application on the right of the equality.
|
equality, replacer, variableMap| Constructor and Description |
|---|
FirstOrderEqualityWithVariable(boolean e,
FirstOrderVariable l,
FirstOrderVariable r)
Initializing constructor.
|
FirstOrderEqualityWithVariable(boolean e,
FirstOrderVariable l,
FirstOrderVariable r,
EqualityArgumentReplacer ear)
This constructor specifies a variable setter for when this equality is quantified.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consolidateVariables(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(Object o)
Two
FirstOrderEqualityWithVariables are equivalent when their children are
equivalent in either order. |
boolean |
evaluate()
Determines whether the constraint is satisfied.
|
int |
hashCode()
The hash code of a
FirstOrderEqualityWithVariable is the sum of the hash codes
of its children plus 2. |
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(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. |
getChildrenprotected FirstOrderVariable left
protected FirstOrderVariable right
public FirstOrderEqualityWithVariable(boolean e,
FirstOrderVariable l,
FirstOrderVariable r)
e - Indicates whether this is an equality or an inequality.l - The left classifier application.r - The right classifier application.public FirstOrderEqualityWithVariable(boolean e,
FirstOrderVariable l,
FirstOrderVariable r,
EqualityArgumentReplacer ear)
e - Indicates whether this is an equality or an inequality.l - The left classifier application.r - The right classifier application.ear - An argument replacer.public void consolidateVariables(AbstractMap m)
consolidateVariables in class Constraintm - The map in which to find unique copies of the variables.public void setQuantificationVariables(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()
FirstOrderEqualityWithVariable is the sum of the hash codes
of its children plus 2.public boolean equals(Object o)
FirstOrderEqualityWithVariables are equivalent when their children are
equivalent in either order.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.Copyright © 2016. All rights reserved.