logic
Class SymbolicObject
java.lang.Object
logic.SymbolicObject
- All Implemented Interfaces:
- java.lang.Cloneable
- Direct Known Subclasses:
- Sentence, SList, Term, TermList
- public abstract class SymbolicObject
- extends java.lang.Object
- implements java.lang.Cloneable
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SymbolicObject
public SymbolicObject()
clone
public java.lang.Object clone()
getProbability
public double getProbability()
setProbability
public double setProbability(double prob)
getOccurrences
public int getOccurrences()
setOccurrences
public int setOccurrences(int num)
copyData
protected void copyData(SymbolicObject o)
gt
public boolean gt(SymbolicObject other)
lt
public boolean lt(SymbolicObject other)
geq
public boolean geq(SymbolicObject other)
leq
public boolean leq(SymbolicObject other)
setType
public void setType(api.Type t)
isTyped
public boolean isTyped()
getType
public api.Type getType()
getTypeName
public java.lang.String getTypeName()
getName
public abstract java.lang.String getName()
isCompound
public abstract boolean isCompound()
isSymbol
public abstract boolean isSymbol()
getFirst
public abstract SymbolicObject getFirst()
getFirstTerm
public abstract Term getFirstTerm()
getRest
public abstract SymbolicObject getRest()
toString
public abstract java.lang.String toString()
symbolicSignature
public abstract SymbolicObject symbolicSignature()
infoString
public java.lang.String infoString()
debugString
public java.lang.String debugString()
compareTo
public abstract int compareTo(java.lang.Object other)
- Compare two SymbolicObjects. The result is zero if the objects
are equal according to the equals() operator. Otherwise, the
result is a negative integer if this object's name
lexicographically precedes the other's name. The result is a
positive integer if this object's name lexicographically follows
the other's name.
equals
public abstract boolean equals(java.lang.Object other)
obtainVariables
public abstract TermList obtainVariables()
- returns a * of Terms that are Variables. If this Term
isn't a Variable, an empty * is returned.
substituteVariable
public abstract SymbolicObject substituteVariable(Variable oldVar,
Term newVar)
substitute
public abstract SymbolicObject substitute(Substitution s)
unify
public abstract Substitution unify(SymbolicObject t,
Substitution s)
- Given two terms, return their most general unifier, or null if
they don't unify.
may be mutated.