Package jason.stdlib
Class fail_goal
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.succeed_goal
jason.stdlib.fail_goal
- All Implemented Interfaces:
InternalAction
,Serializable
@Manual(literal=".fail_goal(goal)",
hint="aborts referred goals in the agent circumstance as if a plan for such goal had failed",
argsHint="the goals which the achieving attempts will be aborted",
argsType="literal",
examples=".fail_goal(go(1,3)): aborts an attempt to achieve goals such as !go(1,3) as if a plan for it had failed, generating event -!go(1,3)",
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.resume","jason.stdlib.suspend","jason.stdlib.suspended"})
public class fail_goal
extends succeed_goal
Internal action:
.fail_goal(G)
.
Description: aborts goals G in the agent circumstance as if a plan
for such goal had failed. An event -!G
is generated.
A literal G
is a goal if there is a triggering event +!G
in any plan within
any intention; also note that intentions can be suspended hence appearing
in sets E, PA, or PI of the agent's circumstance as well.
The meta-event ^!G[state(failed)]
is produced.
Parameters:
- - goal (literal): the goals to be aborted.
Example:
-
.fail_goal(go(1,3))
: aborts an attempt to achieve goals such as!go(1,3)
as if a plan for it had failed, the generated event is-!go(1,3)
.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAnnotsToFailEvent
(Event failEvent) int
dropIntention
(Intention i, IMCondition c, TransitionSystem ts, Unifier un) execute
(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.Methods inherited from class jason.stdlib.succeed_goal
checkArguments, drop, drop, getMaxArgs, getMinArgs
Methods inherited from class jason.asSemantics.DefaultInternalAction
canBeUsedInContext, destroy, prepareArguments, suspendIntention
-
Constructor Details
-
fail_goal
public fail_goal()
-
-
Method Details
-
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 classsucceed_goal
- Throws:
Exception
-
dropIntention
public int dropIntention(Intention i, IMCondition c, TransitionSystem ts, Unifier un) throws JasonException - Overrides:
dropIntention
in classsucceed_goal
- Throws:
JasonException
-
addAnnotsToFailEvent
-