logic
Class DisjunctivePrecondition

java.lang.Object
  extended bylogic.SymbolicObject
      extended bylogic.Sentence
          extended bylogic.Precondition
              extended bylogic.DisjunctivePrecondition
All Implemented Interfaces:
java.lang.Cloneable

public class DisjunctivePrecondition
extends Precondition

a very, very, special-purpose sentence Basically just a list of SLists, where each SList is a unit precondition.


Field Summary
protected  java.util.List _l
           
 
Constructor Summary
DisjunctivePrecondition()
           
 
Method Summary
 DisjunctivePrecondition add(SList precondition)
          Adds a unit set of Precondition to the main list
 DisjunctivePrecondition addToAll(Sentence addme)
           
 java.lang.Object clone()
           
 Sentence eliminateExists()
           
 Sentence eliminateForall(api.ProblemInstance p)
           
 boolean equals(java.lang.Object other)
           
 Sentence flatten()
           
 java.util.List getDisjunctionLists()
           
 SList getList()
           
 SList getPrecondition(int i)
           
 boolean isDisjunction()
           
 boolean isUnit()
           
 DisjunctivePrecondition normalize(Conjunction precond)
          Makes one conjunctive precond per disjunction
 int numPreconditionSentences()
          Just see how many precondition "conditions" we are dealing with in each disjunction
 int numUnits()
          How many disjoint preconditions are there?
 Sentence reconcileTypes(api.Domain d, api.ProblemInstance p)
           
 DisjunctivePrecondition set(int i, SList precondition)
           
 DisjunctivePrecondition set(java.util.List listOfDisjointPreconditions)
          Sets the list of disjoint Preconditions
 SymbolicObject substitute(Substitution sub)
           
 SymbolicObject substituteVariable(Variable oldVar, Term newVar)
           
 java.lang.String toString()
           
 
Methods inherited from class logic.Precondition
compareTo, getFirst, getFirstTerm, getName, getRest, negate, obtainVariables, renameVariables, symbolicMatch, symbolicSignature, unify
 
Methods inherited from class logic.Sentence
containsDisjunction, containsTerm, getSList, infoString, initializeOccurrences, isAdmissibleOutcome, isAtomic, isCompound, isEquals, isNegation, isNegationOf, isNotEquals, isSymbol, relativize, toSentence
 
Methods inherited from class logic.SymbolicObject
copyData, debugString, geq, getOccurrences, getProbability, getType, getTypeName, gt, isTyped, leq, lt, setOccurrences, setProbability, setType
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_l

protected java.util.List _l
Constructor Detail

DisjunctivePrecondition

public DisjunctivePrecondition()
Method Detail

numUnits

public int numUnits()
How many disjoint preconditions are there?


numPreconditionSentences

public int numPreconditionSentences()
Just see how many precondition "conditions" we are dealing with in each disjunction


getPrecondition

public SList getPrecondition(int i)

isUnit

public boolean isUnit()

isDisjunction

public boolean isDisjunction()

toString

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

clone

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

equals

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

normalize

public DisjunctivePrecondition normalize(Conjunction precond)
Makes one conjunctive precond per disjunction


set

public DisjunctivePrecondition set(java.util.List listOfDisjointPreconditions)
Sets the list of disjoint Preconditions


add

public DisjunctivePrecondition add(SList precondition)
Adds a unit set of Precondition to the main list


set

public DisjunctivePrecondition set(int i,
                                   SList precondition)

addToAll

public DisjunctivePrecondition addToAll(Sentence addme)

reconcileTypes

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

getDisjunctionLists

public java.util.List getDisjunctionLists()

getList

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

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

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