logic
Class Variable

java.lang.Object
  extended bylogic.SymbolicObject
      extended bylogic.Term
          extended bylogic.AtomicTerm
              extended bylogic.Variable
All Implemented Interfaces:
java.lang.Cloneable

public class Variable
extends AtomicTerm


Field Summary
 
Fields inherited from class logic.Term
_name, _type
 
Constructor Summary
Variable(java.lang.String name)
           
Variable(java.lang.String name, java.lang.String realName)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o, Substitution s)
           
 TermList obtainVariables()
          from Term abstract class.
 Variable rename()
          Generate a new variable whose name is with a unique numeric suffix
 SymbolicObject substitute(Substitution s)
          from Term abstract class
 SymbolicObject substituteVariable(Variable oldVar, Term newVar)
          implemented from interface Term if oldVar's name is equal to the name of this, replace with newVar.
 Substitution unify(SymbolicObject o, Substitution s)
          Implements abstract method from Term.
 
Methods inherited from class logic.AtomicTerm
compareTo, copyTypesFrom, equals, getFirstTerm, getRest, hashCode, isCompound, isSymbol, reconcileTypes, symbolicMatch, symbolicSignature, toString, typeCompatible
 
Methods inherited from class logic.Term
getFirst, getName, getType, getTypeName, isTyped, setType
 
Methods inherited from class logic.SymbolicObject
copyData, debugString, geq, getOccurrences, getProbability, gt, infoString, leq, lt, setOccurrences, setProbability
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Variable

public Variable(java.lang.String name)

Variable

public Variable(java.lang.String name,
                java.lang.String realName)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class Term

obtainVariables

public TermList obtainVariables()
from Term abstract class. Since this is sort of the base case, create a new * with this as the sole element.

Specified by:
obtainVariables in class SymbolicObject

substituteVariable

public SymbolicObject substituteVariable(Variable oldVar,
                                         Term newVar)
implemented from interface Term if oldVar's name is equal to the name of this, replace with newVar.

Specified by:
substituteVariable in class SymbolicObject

substitute

public SymbolicObject substitute(Substitution s)
from Term abstract class

Specified by:
substitute in class SymbolicObject

unify

public Substitution unify(SymbolicObject o,
                          Substitution s)
Implements abstract method from Term. Attempts to find the mgu of and . AKA "unify-var"

Specified by:
unify in class SymbolicObject

equals

public boolean equals(java.lang.Object o,
                      Substitution s)
Overrides:
equals in class AtomicTerm

rename

public Variable rename()
Generate a new variable whose name is with a unique numeric suffix