aima.logic.fol
Class Unifier
java.lang.Object
aima.logic.fol.Unifier
public class Unifier
- extends java.lang.Object
Method Summary |
protected boolean |
occurCheck(java.util.Map<Variable,Term> theta,
Variable var,
FOLNode x)
|
java.util.Map<Variable,Term> |
unify(FOLNode x,
FOLNode y)
|
java.util.Map<Variable,Term> |
unify(FOLNode x,
FOLNode y,
java.util.Map<Variable,Term> theta)
function UNIFY(x, y, theta) returns a substitution to make x and y identical
inputs: x, a variable, constant, list, or compound
y, a variable, constant, list, or compound
theta, the substitution built up so far (optional, defaults to empty)
|
java.util.Map<Variable,Term> |
unify(java.util.List<? extends FOLNode> x,
java.util.List<? extends FOLNode> y,
java.util.Map<Variable,Term> theta)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Unifier
public Unifier()
unify
public java.util.Map<Variable,Term> unify(FOLNode x,
FOLNode y)
unify
public java.util.Map<Variable,Term> unify(FOLNode x,
FOLNode y,
java.util.Map<Variable,Term> theta)
function UNIFY(x, y, theta) returns a substitution to make x and y identical
inputs: x, a variable, constant, list, or compound
y, a variable, constant, list, or compound
theta, the substitution built up so far (optional, defaults to empty)
- Returns:
- a Map representing the substitution (i.e. a set
of variable/term pairs, see pg. 254 for a description) or null
which is used to indicate a failure to unify.
unify
public java.util.Map<Variable,Term> unify(java.util.List<? extends FOLNode> x,
java.util.List<? extends FOLNode> y,
java.util.Map<Variable,Term> theta)
occurCheck
protected boolean occurCheck(java.util.Map<Variable,Term> theta,
Variable var,
FOLNode x)