logic
Class AtomicSentence

java.lang.Object
  extended bylogic.SymbolicObject
      extended bylogic.Sentence
          extended bylogic.AtomicSentence
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
False, Predicate, True

public abstract class AtomicSentence
extends Sentence


Field Summary
protected  Structure _p
           
 
Constructor Summary
AtomicSentence()
           
AtomicSentence(java.lang.String name)
           
AtomicSentence(java.lang.String name, TermList terms)
           
AtomicSentence(SymbolicObject name, SymbolicObject terms)
           
AtomicSentence(Term p)
           
 
Method Summary
 TermList addTerm(Term term)
           
 TermList addTerms(TermList terms)
           
 java.lang.Object clone()
           
 int compareTo(java.lang.Object o)
          Compare two SymbolicObjects.
 Sentence eliminateExists()
           
 Sentence eliminateForall(api.ProblemInstance p)
           
 boolean equals(java.lang.Object other)
           
 Sentence flatten()
           
 SymbolicObject getFirst()
           
 Term getFirstTerm()
           
 SList getList()
           
 java.lang.String getName()
           
 SymbolicObject getRest()
           
 Structure getTerm()
           
 Term getTerm(int i)
           
 TermList getTerms()
           
 int hashCode()
           
 int numTerms()
           
 TermList obtainVariables()
          returns a * of Terms that are Variables.
 Sentence reconcileTypes(api.Domain d, api.ProblemInstance p)
           
 Sentence renameVariables()
           
 Term setTerm(int i, Term t)
           
 void setTerm(Structure p)
           
 TermList setTerms(TermList t)
           
 SymbolicObject substitute(Substitution sub)
           
 SymbolicObject substituteVariable(Variable oldVar, Term newVar)
           
 boolean symbolicMatch(java.lang.Object other)
           
 java.lang.String toString()
           
 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 logic.Sentence
containsDisjunction, containsTerm, getSList, infoString, initializeOccurrences, isAdmissibleOutcome, isAtomic, isCompound, isEquals, isNegation, isNegationOf, isNotEquals, isSymbol, negate, relativize, toSentence
 
Methods inherited from class logic.SymbolicObject
copyData, debugString, geq, getOccurrences, getProbability, getType, getTypeName, gt, isTyped, leq, lt, setOccurrences, setProbability, setType, symbolicSignature
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

_p

protected Structure _p
Constructor Detail

AtomicSentence

public AtomicSentence()

AtomicSentence

public AtomicSentence(SymbolicObject name,
                      SymbolicObject terms)

AtomicSentence

public AtomicSentence(java.lang.String name)

AtomicSentence

public AtomicSentence(java.lang.String name,
                      TermList terms)

AtomicSentence

public AtomicSentence(Term p)
Method Detail

clone

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

reconcileTypes

public Sentence reconcileTypes(api.Domain d,
                               api.ProblemInstance p)
Specified by:
reconcileTypes in class Sentence

eliminateExists

public Sentence eliminateExists()
Specified by:
eliminateExists in class Sentence

eliminateForall

public Sentence eliminateForall(api.ProblemInstance p)
Specified by:
eliminateForall in class Sentence

flatten

public Sentence flatten()
Specified by:
flatten in class Sentence

getTerm

public Structure getTerm()

setTerm

public void setTerm(Structure p)

getList

public SList getList()
Specified by:
getList in class Sentence

renameVariables

public Sentence renameVariables()
Specified by:
renameVariables in class Sentence

getName

public java.lang.String getName()
Specified by:
getName in class SymbolicObject

getFirst

public SymbolicObject getFirst()
Specified by:
getFirst in class SymbolicObject

getFirstTerm

public Term getFirstTerm()
Specified by:
getFirstTerm in class SymbolicObject

getRest

public SymbolicObject getRest()
Specified by:
getRest in class SymbolicObject

toString

public java.lang.String toString()
Specified by:
toString in class SymbolicObject

compareTo

public int compareTo(java.lang.Object o)
Description copied from class: SymbolicObject
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.

Specified by:
compareTo in class SymbolicObject

symbolicMatch

public boolean symbolicMatch(java.lang.Object other)
Overrides:
symbolicMatch in class Sentence

equals

public boolean equals(java.lang.Object other)
Specified by:
equals in class SymbolicObject

obtainVariables

public TermList obtainVariables()
Description copied from class: SymbolicObject
returns a * of Terms that are Variables. If this Term isn't a Variable, an empty * is returned.

Specified by:
obtainVariables in class SymbolicObject

substituteVariable

public SymbolicObject substituteVariable(Variable oldVar,
                                         Term newVar)
Specified by:
substituteVariable in class SymbolicObject

substitute

public SymbolicObject substitute(Substitution sub)
Specified by:
substitute in class SymbolicObject

unify

public Substitution unify(SymbolicObject t,
                          Substitution s)
Description copied from class: SymbolicObject
Given two terms, return their most general unifier, or null if they don't unify. may be mutated.

Specified by:
unify in class SymbolicObject

setTerms

public TermList setTerms(TermList t)

numTerms

public int numTerms()

getTerms

public TermList getTerms()

addTerm

public TermList addTerm(Term term)

addTerms

public TermList addTerms(TermList terms)

getTerm

public Term getTerm(int i)

setTerm

public Term setTerm(int i,
                    Term t)

hashCode

public int hashCode()