Package jason.stdlib
Class fork
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.fork
- All Implemented Interfaces:
InternalAction,Serializable
Implementation of .fork (used for |invalid input: '&'| and ||| operators).
Syntax:
plan_body1 "|invalid input: '&'|" | "|||" plan_body2 ....
|invalid input: '&'| is concurrent and: both plan_body1 and plan_body2 have to finishes successfully
||| is concurrent or : either plan_body1 or plan_body2 have to finishes successfully- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if the internal action can be used in plans' contextprotected voidcheckArguments(Term[] args) static InternalActioncreate()execute(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.intTerm[]prepareArguments(Literal body, Unifier un) Prepare body's terms to be used in 'execute', normally it consist of cloning and applying each termbooleanReturns true if the internal action (IA) should suspend the intention where the IA is calledMethods inherited from class jason.asSemantics.DefaultInternalAction
destroy, getMaxArgs
-
Field Details
-
aAnd
-
aOr
-
-
Constructor Details
-
fork
public fork()
-
-
Method Details
-
create
-
prepareArguments
Description copied from interface:InternalActionPrepare body's terms to be used in 'execute', normally it consist of cloning and applying each term- Specified by:
prepareArgumentsin interfaceInternalAction- Overrides:
prepareArgumentsin classDefaultInternalAction
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgsin classDefaultInternalAction
-
checkArguments
- Overrides:
checkArgumentsin classDefaultInternalAction- Throws:
JasonException
-
suspendIntention
public boolean suspendIntention()Description copied from interface:InternalActionReturns true if the internal action (IA) should suspend the intention where the IA is called- Specified by:
suspendIntentionin interfaceInternalAction- Overrides:
suspendIntentionin classDefaultInternalAction
-
canBeUsedInContext
public boolean canBeUsedInContext()Description copied from interface:InternalActionReturn true if the internal action can be used in plans' context- Specified by:
canBeUsedInContextin interfaceInternalAction- Overrides:
canBeUsedInContextin classDefaultInternalAction
-
execute
Description copied from interface:InternalActionExecutes the internal action. It should return a Boolean or an Iterator. A true boolean return means that the IA was successfully executed. An Iterator result means that there is more than one answer for this IA (e.g. see member internal action). - Specified by:
executein interfaceInternalAction- Overrides:
executein classDefaultInternalAction- Throws:
Exception
-