logic
Class DisjunctivePrecondition
java.lang.Object
logic.SymbolicObject
logic.Sentence
logic.Precondition
logic.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
|
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 |
_l
protected java.util.List _l
DisjunctivePrecondition
public DisjunctivePrecondition()
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