Package jason.stdlib
Class suspended
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.suspended
- All Implemented Interfaces:
InternalAction
,Serializable
@Manual(literal=".suspended(goal,reason)",
hint="checks whether given goal belongs to a suspended intention. Unifies with the reason for the suspend (waiting action to be performed, .wait, ....)",
argsHint={"the goals to check if are suspended","the reason for being suspended"},
argsType={"literal","term"},
examples=".suspended(go(1,3),R): true if go(1,3) is a suspended goal. R unifies with \"act\" if the reason is an action waiting feedback from environment",
seeAlso={"jason.stdlib.intend","jason.stdlib.desire","jason.stdlib.drop_all_desires","jason.stdlib.drop_all_events","jason.stdlib.drop_all_intentions","jason.stdlib.drop_intention","jason.stdlib.drop_desire","jason.stdlib.succeed_goal","jason.stdlib.fail_goal","jason.stdlib.intention","jason.stdlib.suspend","jason.stdlib.resume"})
public class suspended
extends DefaultInternalAction
Internal action: .suspended(G, R)
.
Description: checks whether goal G belongs to a suspended intention. R (a term)
unifies with the reason for the
suspend (waiting action to be performed, .wait, ....).
The literal G
represents a suspended goal if there is a triggering event +!G
in any plan within
any intention in PI or PA.
Example:
-
.suspended(go(1,3),R)
: true ifgo(1,3)
is a suspended goal.R
unifies with "act" if the reason for being suspended is an action waiting feedback from environment.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkArguments
(Term[] args) execute
(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.int
int
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
suspended
public suspended()
-
-
Method Details
-
getMinArgs
public int getMinArgs()- Overrides:
getMinArgs
in classDefaultInternalAction
-
getMaxArgs
public int getMaxArgs()- Overrides:
getMaxArgs
in classDefaultInternalAction
-
checkArguments
- Overrides:
checkArguments
in classDefaultInternalAction
- Throws:
JasonException
-
execute
Description copied from interface:InternalAction
Executes 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:
execute
in interfaceInternalAction
- Overrides:
execute
in classDefaultInternalAction
- Throws:
Exception
-