

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object ai.krr.fol.Instantiation
public class Instantiation
An Instantiation maps a set of Variables to a set of Terms. The resulting mapping need not be onetoone, i.e. several Variables may be mapped to the same Variable.
Constructor Summary  

Instantiation()

Method Summary  

boolean 
contains(Variable var)
This function tests whether this Substitution maps the given Variable to a new Term. 
Term 
getValue(Variable aVar)
This function returns the Term the given Variable is mapped to. 
int 
size()
This function returns the number of variables bound by this Grounding. 
boolean 
unify(Term aTerm,
Variable aVar)
This function attempts to extend this Substitution such that the given Variable (from the "right" expression) and the given Term (from the "left") are unified and returns whether this succeeded. 
boolean 
unify(Variable aVar,
Term aTerm)
This function attempts to extend this Substitution such that the given Variable (from the "left" expression) and the given Term (from the "right") are unified and returns whether this succeeded. 
boolean 
unify(Variable leftVar,
Variable rightVar)
This function attempts to extend this Substitution such that the given Variables will be unified and returns true if this was possible. 
Methods inherited from class java.lang.Object 

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
Constructor Detail 

public Instantiation()
Method Detail 

public int size()
This function returns the number of variables bound by this Grounding.
public boolean unify(Variable aVar, Term aTerm)
This function attempts to extend this Substitution such that the given Variable (from the "left" expression) and the given Term (from the "right") are unified and returns whether this succeeded. This can only succeed if the given Term is a Constant or a Variable.
unify
in interface Substitution
aVar
 the Variable the given Term is to be unified withaTerm
 the Term the given Variable will be mapped to
public boolean unify(Term aTerm, Variable aVar)
This function attempts to extend this Substitution such that the given Variable (from the "right" expression) and the given Term (from the "left") are unified and returns whether this succeeded. This can only succeed if the given Term is a Variable.
unify
in interface Substitution
aTerm
 the Term the given Variable will be mapped toaVar
 the Variable the given Term is to be unified with
public boolean unify(Variable leftVar, Variable rightVar)
This function attempts to extend this Substitution such that the given Variables will be unified and returns true if this was possible. Where this matters, the first variable is considered to come from the "left" expression and the second from the "right".
unify
in interface Substitution
leftVar
 a Variable to be associated with the other given VariablerightVar
 a Variable to be associated with the other given Variable
public boolean contains(Variable var)
This function tests whether this Substitution maps the given Variable to a new Term.
contains
in interface Substitution
var
 the Variable the Term is being sought for
public Term getValue(Variable aVar)
This function returns the Term the given Variable is mapped to. More specifically, it returns:
The given Variable is assumed to occur in the left Term.
getValue
in interface Substitution
aVar
 the Variable the Term is being sought for


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 