|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.icore.IXAgent ix.ip2.Ip2 ix.iplan.IPlan ix.iplan.PlannerBase ix.iplan.Slip
public class Slip
Semi-linear planner.
Nested Class Summary | |
---|---|
(package private) static class |
Slip.HavePlanException
|
(package private) static interface |
Slip.ParameterMaker
|
(package private) class |
Slip.PossibleConditionFinder
|
(package private) class |
Slip.PossibleConstraintFinder
|
(package private) class |
Slip.PossibleEffectFinder
|
(package private) class |
Slip.PossiblesFinder
|
(package private) class |
Slip.ReplanStep
|
(package private) static interface |
Slip.Step
|
static class |
Slip.StepLimitException
|
Nested classes/interfaces inherited from class ix.ip2.Ip2 |
---|
Ip2.AddExtensionsHandler, Ip2.AddHandlersHandler |
Field Summary | |
---|---|
(package private) LListCollector |
alternatives
|
(package private) DomainAnalyser |
analysis
|
(package private) ContextBoolean |
contextIsPoisoned
|
(package private) static Symbol |
DEPTH_FIRST
|
(package private) int |
hardStepLimit
|
(package private) LLQueue<java.lang.Object[]> |
history
|
(package private) Slip.Step |
invalidStep
|
(package private) IPlanModelManager |
iplanMM
|
(package private) ContextMap<PNodeEnd,java.lang.Boolean> |
isWaiting
|
static Keyword |
K_ALL
|
static Keyword |
K_NONE
|
(package private) boolean |
liberalAchieveSemantics
|
(package private) Slip.ParameterMaker |
makeInput
|
(package private) Slip.ParameterMaker |
makeOutput
|
(package private) ContextMap<PNodeEnd,Status> |
nodeEndStatusMap
|
(package private) ContextGensym.Generator |
objectNameGenerator
|
(package private) boolean |
pickAlternativesDepthFirst
|
static Symbol |
S_ACHIEVABLE_CONDS
|
static Symbol |
S_ACHIEVE
|
(package private) static Symbol |
S_ACHIEVE_GOAL
|
(package private) static Symbol |
S_ACHIEVE_PV
|
(package private) static Symbol |
S_AT_END
|
static Symbol |
S_CONDITION_TYPE
|
(package private) static Symbol |
S_EQL
|
static Symbol |
S_TRUE
|
static Symbol |
S_USE_CONDITION_TYPES
|
static Symbol |
S_USE_FOR_EFFECT
|
static Symbol |
S_USE_FOR_EFFECTS
|
(package private) java.util.Map |
savedInitialWorldState
|
(package private) static Symbol |
SEARCH_PREFERENCE
|
(package private) boolean |
singleStep
|
(package private) SlipStats |
stats
|
(package private) int |
stepLimit
|
(package private) SlipSingleStepper |
stepper
|
(package private) Slip.Step |
testStep
|
(package private) ContextMultiMap |
unwaitTable
|
(package private) boolean |
useConditionTypes
|
(package private) boolean |
useDomainAnalysis
|
(package private) ContextHashMap |
waitingForAchieveTable
|
Fields inherited from class ix.ip2.Ip2 |
---|
activityViewer, agentTypeName, annotationViewer, controller, domain, frame, issueViewer, logoImage, logoLine1, logoLine2, modelManager, optionManager, resetHooks, showOptions, stateViewer |
Fields inherited from class ix.icore.IXAgent |
---|
contactManager, displayName, eventLogger, exitHooks, initialDisplayName, ipcName, ipcStrategyName, iSimTimer, mainAgent, nameListeners, startupDate, startupHooks, symbolName, textFrame |
Constructor Summary | |
---|---|
Slip(boolean standAlone)
|
Method Summary | |
---|---|
protected void |
addHandlers()
Install any built-in issue and activity handlers. |
(package private) void |
allComputeStatus(java.util.List nodeEnds)
|
(package private) boolean |
allHaveStatus(java.util.List nodeEnds,
Status status)
|
(package private) static boolean |
canBeUsedForEffect(Constraint effect,
Refinement r,
Domain d)
|
(package private) void |
cancelLocalChoices()
|
(package private) boolean |
canExecBegin(PNodeEnd ne)
|
(package private) boolean |
canExecEnd(PNodeEnd ne)
|
(package private) void |
computeProperStatus(PNodeEnd end)
|
(package private) void |
computeProperStatusValues()
|
(package private) void |
computeStatus(PNodeEnd end)
|
(package private) void |
createPlanContext()
|
(package private) void |
describeAlternative(Alternative alt)
|
(package private) void |
describeAlternatives()
|
(package private) void |
describeLinks(PNodeEnd at,
java.lang.String relation,
java.util.List nodeEnds)
|
(package private) void |
describeNodeEnd(PNodeEnd end)
|
(package private) void |
describeNodeEnds()
|
(package private) void |
describeNodeEnds(java.util.List nodeEnds)
|
(package private) boolean |
domainSays(java.lang.String propname)
|
static boolean |
domainUsesConditionTypes(Domain dom)
|
(package private) void |
execBegin(PNodeEnd ne)
|
(package private) void |
execEnd(PNodeEnd ne)
|
(package private) boolean |
existsAchieversForCond(Constraint cond)
|
(package private) PNodeEnd |
findExecutable()
|
(package private) PNodeEnd |
findExecutable(java.util.Iterator i)
|
(package private) boolean |
findFirstPlan()
|
(package private) boolean |
findNextPlan()
|
(package private) void |
finishedPlanning(boolean success)
|
(package private) Symbol |
generateObjectName(Symbol typeName)
|
(package private) java.util.List |
getAchieversForCond(Constraint cond)
Returns a list of ways to achieve a condition by introducing a node. |
(package private) PNodeEnd |
getAtEndForGoal(ActivityItem goalNode)
|
(package private) PNodeEnd |
getAtEndForGoal(PNodeEnd goalEnd)
|
(package private) java.util.List |
getGoalAchievers(PNode goalNode)
|
(package private) PatternAssignment |
getGoalCond(PNodeEnd ne)
|
(package private) java.util.Set |
getPossibleConditions(PNodeEnd ne)
|
(package private) java.util.Set |
getPossibleEffects(PNodeEnd ne)
|
(package private) java.util.Set |
getPossibleOtherConstraints(PNodeEnd ne)
|
(package private) java.util.Set |
getPossibleTopLevelConditions(PNodeEnd ne)
|
(package private) java.util.Set |
getPossibleTopLevelEffects(PNodeEnd ne)
|
(package private) java.util.Set |
getPossibleTopLevelOtherConstraints(PNodeEnd ne)
|
SlipStats |
getStatistics()
Returns statistics gathered by the most recent Planner.plan()
or Planner.replan() . |
(package private) Status |
getStatus(PNodeEnd end)
|
static boolean |
hasCondType(Constraint c,
Symbol type)
|
(package private) void |
history(java.lang.Object... words)
|
(package private) void |
initStatusTable()
|
(package private) static boolean |
isAchievableCondPattern(LList pattern,
Domain decider)
|
(package private) boolean |
isGoalNode(PNode n)
|
(package private) boolean |
isGoalNode(PNodeEnd ne)
|
(package private) boolean |
isWaitingForAchieve(PNode node)
|
static void |
main(java.lang.String[] argv)
Standalone main program. |
(package private) ActivityItem |
makeGoalNode(PatternAssignment goalCond,
java.util.List achievers,
PNodeEnd atNodeEnd)
|
(package private) IPlanModelManager |
MM()
|
(package private) boolean |
noPossibleTopLevelConstraints(PNodeEnd ne)
|
(package private) void |
normalizeGoalNode(ActivityItem goalNode)
|
(package private) void |
noteHistory()
|
(package private) Alternative |
pickAlternative(java.lang.Object reason)
|
void |
plan()
Finds a plan that is a completion of this planner's current plan and makes it the new current plan. |
(package private) boolean |
planIsComplete()
|
(package private) void |
planLoop()
|
(package private) Poison |
poison(java.lang.Object reason)
|
(package private) boolean |
possiblyInteracting(PNodeEnd w,
PNodeEnd releaser)
|
(package private) boolean |
possiblyInteractingCondsOrEffects(PNodeEnd selected,
java.util.Set conds,
java.util.Set effects,
PNodeEnd ne)
|
(package private) boolean |
possiblyInteractingConstraints(PNodeEnd selected,
java.util.Set constraints,
PNodeEnd ne)
|
(package private) void |
postAlternative(Alternative alt)
|
(package private) boolean |
preferDepthFirst()
|
protected void |
processCommandLineArguments()
Command-line argument processing for arguments used by all versions of I-P2. |
(package private) void |
recordAsWaitingForAchieve(PNode node)
|
(package private) void |
recordInputsAndOutputs()
|
(package private) void |
recordInputsAndOutputs(Refinement ref,
Activity act)
|
(package private) void |
recordParameters(Symbol refKey,
Symbol actKey,
Refinement ref,
Activity act,
Slip.ParameterMaker m)
|
(package private) void |
releaseWaitingEnds(PNodeEnd ne)
|
void |
replan()
Finds the next in a series of plans that are completions of the plan that was current when Planner.plan() was
most recently called. |
void |
reset()
Called to restore the initial state. |
void |
setDomain(Domain dom)
Sets this planner's domain. |
(package private) void |
setNextStep(Slip.Step s)
|
(package private) void |
setProperStatus(PNode node)
|
(package private) void |
setProperStatus(PNodeEnd end,
Status status)
|
(package private) void |
setStatus(PNodeEnd end,
Status status)
|
void |
setStepLimit(int limit)
|
void |
startup()
Completes setup and initialization. |
(package private) void |
stepLimitReached(boolean isHardLimit)
|
(package private) void |
testStatusPropagation()
|
(package private) void |
tryUnwaiting(PNodeEnd w,
PNodeEnd releaser)
|
Methods inherited from class ix.iplan.PlannerBase |
---|
completeStartup, handleInput, initOptions, isStandAlone, makeInstance, outputOwlSPlan, outputPlan, outputPlanPSGraphData, startServer |
Methods inherited from class ix.iplan.IPlan |
---|
displayFrame, makeDefaultPlanner, makeIp2Frame, makeModelManager |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ix.iplan.Planner |
---|
getPlan, loadPlan |
Field Detail |
---|
IPlanModelManager iplanMM
DomainAnalyser analysis
boolean useDomainAnalysis
boolean pickAlternativesDepthFirst
boolean useConditionTypes
LListCollector alternatives
ContextBoolean contextIsPoisoned
ContextMap<PNodeEnd,Status> nodeEndStatusMap
ContextMap<PNodeEnd,java.lang.Boolean> isWaiting
ContextMultiMap unwaitTable
LLQueue<java.lang.Object[]> history
java.util.Map savedInitialWorldState
SlipStats stats
ContextGensym.Generator objectNameGenerator
int stepLimit
int hardStepLimit
SlipSingleStepper stepper
boolean singleStep
Slip.Step invalidStep
Slip.Step testStep
public static final Symbol S_TRUE
static final Symbol SEARCH_PREFERENCE
static final Symbol DEPTH_FIRST
boolean liberalAchieveSemantics
public static final Keyword K_ALL
public static final Keyword K_NONE
public static final Symbol S_ACHIEVABLE_CONDS
public static final Symbol S_USE_FOR_EFFECTS
public static final Symbol S_USE_CONDITION_TYPES
public static final Symbol S_CONDITION_TYPE
public static final Symbol S_ACHIEVE
public static final Symbol S_USE_FOR_EFFECT
Slip.ParameterMaker makeInput
Slip.ParameterMaker makeOutput
static final Symbol S_ACHIEVE_GOAL
static final Symbol S_ACHIEVE_PV
static final Symbol S_AT_END
static final Symbol S_EQL
ContextHashMap waitingForAchieveTable
Constructor Detail |
---|
public Slip(boolean standAlone)
Method Detail |
---|
IPlanModelManager MM()
public static void main(java.lang.String[] argv)
public void startup()
startup
in class PlannerBase
protected void processCommandLineArguments()
Ip2
processCommandLineArguments
in class Ip2
IFUtil.adjustLookAndFeel()
,
IPC.makeCommunicationStrategy(String methodName)
,
ContactManager.processCommandLineArguments()
,
Debug.on
,
Parameters
public void reset()
reset
in class Ip2
public SlipStats getStatistics()
Planner
Planner.plan()
or Planner.replan()
.
getStatistics
in interface Planner
getStatistics
in class PlannerBase
Symbol generateObjectName(Symbol typeName)
public void setStepLimit(int limit)
public void setDomain(Domain dom)
Planner
setDomain
in interface Planner
setDomain
in class IPlan
protected void addHandlers()
addHandlers
in class PlannerBase
void setNextStep(Slip.Step s)
public void plan()
Planner
A successful call to plan() leaves this planner in a
state in which Planner.replan()
can be called.
plan
in interface Planner
plan
in class PlannerBase
public void replan()
Planner
Planner.plan()
was
most recently called. That completion then becomes the
new current plan. You can think of this as reconsidering
some choice made when producing earlier plans in the sequence
and making different decision at that point. However, it
is not guaranteed that the plan found in this way will
be interestingly different from all of the earlier plans
in the sequence.
The replan() method should not be called if plan() has not been called or if this planner has thrown an exception.
A successful call to replan() leaves this planner in a
state in which Planner.replan()
can be called again.
plan() may be called instead, but this will begin a new
sequence of plans based on this planner's now current plan,
rather than on the plan that was the base for the previous
sequence.
replan
in interface Planner
replan
in class PlannerBase
boolean findFirstPlan()
boolean findNextPlan()
void planLoop()
void stepLimitReached(boolean isHardLimit)
void finishedPlanning(boolean success)
void createPlanContext()
void postAlternative(Alternative alt)
void cancelLocalChoices()
Alternative pickAlternative(java.lang.Object reason)
Poison poison(java.lang.Object reason)
void history(java.lang.Object... words)
void noteHistory()
boolean domainSays(java.lang.String propname)
boolean preferDepthFirst()
public static boolean domainUsesConditionTypes(Domain dom)
public static boolean hasCondType(Constraint c, Symbol type)
static boolean isAchievableCondPattern(LList pattern, Domain decider)
static boolean canBeUsedForEffect(Constraint effect, Refinement r, Domain d)
void testStatusPropagation()
PNodeEnd findExecutable()
PNodeEnd findExecutable(java.util.Iterator i)
boolean planIsComplete()
Status getStatus(PNodeEnd end)
void setStatus(PNodeEnd end, Status status)
void computeStatus(PNodeEnd end)
void allComputeStatus(java.util.List nodeEnds)
boolean allHaveStatus(java.util.List nodeEnds, Status status)
void initStatusTable()
void computeProperStatusValues()
void computeProperStatus(PNodeEnd end)
void setProperStatus(PNodeEnd end, Status status)
void setProperStatus(PNode node)
boolean canExecBegin(PNodeEnd ne)
void execBegin(PNodeEnd ne)
boolean canExecEnd(PNodeEnd ne)
void execEnd(PNodeEnd ne)
void releaseWaitingEnds(PNodeEnd ne)
void tryUnwaiting(PNodeEnd w, PNodeEnd releaser)
boolean possiblyInteracting(PNodeEnd w, PNodeEnd releaser)
boolean possiblyInteractingCondsOrEffects(PNodeEnd selected, java.util.Set conds, java.util.Set effects, PNodeEnd ne)
boolean possiblyInteractingConstraints(PNodeEnd selected, java.util.Set constraints, PNodeEnd ne)
void recordInputsAndOutputs()
void recordInputsAndOutputs(Refinement ref, Activity act)
void recordParameters(Symbol refKey, Symbol actKey, Refinement ref, Activity act, Slip.ParameterMaker m)
boolean isGoalNode(PNodeEnd ne)
boolean isGoalNode(PNode n)
PatternAssignment getGoalCond(PNodeEnd ne)
ActivityItem makeGoalNode(PatternAssignment goalCond, java.util.List achievers, PNodeEnd atNodeEnd)
java.util.List getGoalAchievers(PNode goalNode)
PNodeEnd getAtEndForGoal(PNodeEnd goalEnd)
PNodeEnd getAtEndForGoal(ActivityItem goalNode)
void normalizeGoalNode(ActivityItem goalNode)
void recordAsWaitingForAchieve(PNode node)
boolean isWaitingForAchieve(PNode node)
java.util.List getAchieversForCond(Constraint cond)
boolean existsAchieversForCond(Constraint cond)
java.util.Set getPossibleTopLevelConditions(PNodeEnd ne)
java.util.Set getPossibleTopLevelEffects(PNodeEnd ne)
java.util.Set getPossibleTopLevelOtherConstraints(PNodeEnd ne)
boolean noPossibleTopLevelConstraints(PNodeEnd ne)
java.util.Set getPossibleConditions(PNodeEnd ne)
java.util.Set getPossibleEffects(PNodeEnd ne)
java.util.Set getPossibleOtherConstraints(PNodeEnd ne)
void describeAlternatives()
void describeAlternative(Alternative alt)
void describeNodeEnds()
void describeNodeEnds(java.util.List nodeEnds)
void describeNodeEnd(PNodeEnd end)
void describeLinks(PNodeEnd at, java.lang.String relation, java.util.List nodeEnds)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |