uk.ac.man.cs.rainbow.rapa.data
Class Unifier
java.lang.Object
|
+--uk.ac.man.cs.rainbow.rapa.data.Unifier
- All Implemented Interfaces:
- Serializable
- public class Unifier
- extends Object
- implements Serializable
The most general unifier of two expressions.
- See Also:
- Serialized Form
Constructor Summary |
Unifier(Value v1,
Value v2)
Create a unifier that is the MGU of the two expressions. |
Unifier
public Unifier(Value v1,
Value v2)
throws NotUnifiable
- Create a unifier that is the MGU of the two expressions.
lookup
public Value lookup(Variable v)
- What does the unifier map the given variable to?
unify
public static Substitution unify(Substitution sub,
Value[] v1,
Value[] v2)
throws NotUnifiable
- Compute a substitution that will unify two arrays of expressions.
combine
public void combine(Unifier u)
- Merge the given unifier into this unifier.
toString
public String toString()
- Overrides:
toString
in class Object