Class ForContext
java.lang.Object
edu.tufts.hrilab.action.execution.Context
edu.tufts.hrilab.action.execution.ArgumentBasedContext
edu.tufts.hrilab.action.execution.control.ForContext
This represents the semantics of the FOR control in an action script.
Provides a compact way to iterate over a range of (integer) values.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class edu.tufts.hrilab.action.execution.ArgumentBasedContext
arguments, variable
Fields inherited from class edu.tufts.hrilab.action.execution.Context
caller, childContexts, cmd, constraints, endTime, log, maxTime, startTime, stateMachine
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeep copy of the context, its status, and its childrenstatic boolean
protected void
setupArguments
(List<? extends Object> inputArgs, List<? extends Object> returnArgs) Sets up the variable for the "for" context.protected void
If Context can have next steps (i.e., children), implement this method to add the next child context that should be executed.Methods inherited from class edu.tufts.hrilab.action.execution.ArgumentBasedContext
addArgument, addArgument, bindPredicate, bindText, copyArguments, getArgument, getArguments, getArgumentSilent, getArgumentType, getArgumentValue, getEvaluatedArgument, getLocalArgument, getSignatureInPredicateForm, hasArgumentInScope, hasLocalArgument, redistributeArguments, setArgument
Methods inherited from class edu.tufts.hrilab.action.execution.Context
acquireLocks, addEvent, addEvent, addEvent, causedFailure, copyInternal, createSimulatedEquivalent, doStep, getActor, getActualLogicalValue, getChildContexts, getCommand, getConstraints, getContextDescription, getContextDescription, getDuration, getElapsedTime, getEndTime, getEquivalentContext, getExecType, getId, getJustification, getLogicalValue, getMaxTime, getNearestTerminatedAncestor, getNextStep, getNextStepForType, getParentContext, getRootContext, getStartTime, getStateMachine, getStateUpdates, getStatus, hasNormCheckingAncestor, isAction, isApproved, isAsynchronous, isFailure, isSimulation, isSuccess, isTerminated, performAdditionalStatusUpdates, releaseLocks, resetConcreteContext, resetContext, resetCoreContext, setChildContexts, setConstraints, setEndTime, setExecType, setLogicalValue, setStartTime, setStartTime, setStateMachine, setStatus, setStatus, setTimeout, setupNextStep, startOverAllMonitor, toString, updatePerformanceModels, verifyEffects, verifyReturnValue, waitForTermination, waitForTermination
-
Field Details
-
loopVarName
-
-
Constructor Details
-
ForContext
-
-
Method Details
-
setupNextStep
protected void setupNextStep()Description copied from class:Context
If Context can have next steps (i.e., children), implement this method to add the next child context that should be executed.- Overrides:
setupNextStep
in classContext
-
setupArguments
Sets up the variable for the "for" context.- Specified by:
setupArguments
in classArgumentBasedContext
- Parameters:
inputArgs
- should be !var init_val compar_op compar_val incr_op (5 arguments)
-
isIncrementOperator
-
copy
Description copied from class:Context
deep copy of the context, its status, and its children
-