logic
Class Variable
java.lang.Object
logic.SymbolicObject
logic.Term
logic.AtomicTerm
logic.Variable
- All Implemented Interfaces:
- java.lang.Cloneable
- public class Variable
- extends AtomicTerm
Constructor Summary |
Variable(java.lang.String name)
|
Variable(java.lang.String name,
java.lang.String realName)
|
Methods inherited from class logic.AtomicTerm |
compareTo, copyTypesFrom, equals, getFirstTerm, getRest, hashCode, isCompound, isSymbol, reconcileTypes, symbolicMatch, symbolicSignature, toString, typeCompatible |
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 |
Variable
public Variable(java.lang.String name)
Variable
public Variable(java.lang.String name,
java.lang.String realName)
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