Package jason.stdlib
Class suspended
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.suspended
- All Implemented Interfaces:
InternalAction
,java.io.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.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description suspended()
-
Method Summary
Modifier and Type Method Description protected void
checkArguments(Term[] args)
java.lang.Object
execute(TransitionSystem ts, Unifier un, Term[] args)
Executes the internal action.int
getMaxArgs()
int
getMinArgs()
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, prepareArguments, suspendIntention
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
aAct
-
-
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
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.ExceptionDescription 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:
java.lang.Exception
-