java.lang.Object
tools.refinery.interpreter.matchers.psystem.PVariable

public class PVariable extends Object
  • Method Details

    • unifyInto

      public void unifyInto(PVariable replacement)
      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

      public void refer(PConstraint constraint)
      Register that this variable is referred by the given constraint.
      Parameters:
      constraint -
    • unrefer

      public void unrefer(PConstraint constraint)
      Register that this variable is no longer referred by the given constraint.
      Parameters:
      constraint -
    • getName

      public String 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

      public Set<PConstraint> getReferringConstraints()
      Returns:
      the referringConstraints
    • getReferringConstraintsOfType

      public <ConstraintType> Set<ConstraintType> getReferringConstraintsOfType(Class<ConstraintType> constraintClass)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDirectUnifiedInto

      public PVariable getDirectUnifiedInto()
    • getUnifiedIntoRoot

      public PVariable getUnifiedIntoRoot()
    • isUnique

      public boolean isUnique()