logic
Class SymbolicObject

java.lang.Object
  extended bylogic.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


Constructor Summary
SymbolicObject()
           
 
Method Summary
 java.lang.Object clone()
           
abstract  int compareTo(java.lang.Object other)
          Compare two SymbolicObjects.
protected  void copyData(SymbolicObject o)
           
 java.lang.String debugString()
           
abstract  boolean equals(java.lang.Object other)
           
 boolean geq(SymbolicObject other)
           
abstract  SymbolicObject getFirst()
           
abstract  Term getFirstTerm()
           
abstract  java.lang.String getName()
           
 int getOccurrences()
           
 double getProbability()
           
abstract  SymbolicObject getRest()
           
 api.Type getType()
           
 java.lang.String getTypeName()
           
 boolean gt(SymbolicObject other)
           
 java.lang.String infoString()
           
abstract  boolean isCompound()
           
abstract  boolean isSymbol()
           
 boolean isTyped()
           
 boolean leq(SymbolicObject other)
           
 boolean lt(SymbolicObject other)
           
abstract  TermList obtainVariables()
          returns a * of Terms that are Variables.
 int setOccurrences(int num)
           
 double setProbability(double prob)
           
 void setType(api.Type t)
           
abstract  SymbolicObject substitute(Substitution s)
           
abstract  SymbolicObject substituteVariable(Variable oldVar, Term newVar)
           
abstract  SymbolicObject symbolicSignature()
           
abstract  java.lang.String toString()
           
abstract  Substitution unify(SymbolicObject t, Substitution s)
          Given two terms, return their most general unifier, or null if they don't unify.
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SymbolicObject

public SymbolicObject()
Method Detail

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.