Class PVariable
java.lang.Object
tools.refinery.interpreter.matchers.psystem.PVariable
-
Method Summary
Modifier and TypeMethodDescriptiongetName()
<ConstraintType>
Set<ConstraintType> getReferringConstraintsOfType
(Class<ConstraintType> constraintClass) boolean
Determines whether there are any constraints that can deduce this variableboolean
isUnique()
boolean
void
refer
(PConstraint constraint) Register that this variable is referred by the given constraint.toString()
void
Replaces this variable with a given other, resulting in their unification.void
unrefer
(PConstraint constraint) Register that this variable is no longer referred by the given constraint.
-
Method Details
-
unifyInto
Replaces this variable with a given other, resulting in their unification. This variable will no longer be unique.- Parameters:
replacement
-
-
isDeducable
public boolean isDeducable()Determines whether there are any constraints that can deduce this variable -
refer
Register that this variable is referred by the given constraint.- Parameters:
constraint
-
-
unrefer
Register that this variable is no longer referred by the given constraint.- Parameters:
constraint
-
-
getName
- Returns:
- the name of the pattern variable. This is the unique key of the pattern node.
-
isVirtual
public boolean isVirtual()- Returns:
- the virtual
-
getReferringConstraints
- Returns:
- the referringConstraints
-
getReferringConstraintsOfType
-
toString
-
getDirectUnifiedInto
-
getUnifiedIntoRoot
-
isUnique
public boolean isUnique()
-