Package jason.stdlib

Class intend

All Implemented Interfaces:
InternalAction, Serializable
Direct Known Subclasses:
desire

@Manual(literal=".intend(goal[,intention])", hint="checks if the referred goal is intended, optionally unify with the intention that contains the goal", argsHint={"the goal to be checked","the intention that contains the goal [optional]"}, argsType={"literal","term"}, examples={".intend(go(1,3)): is true if a plan with triggering event +!go(1,3) appears in an intention of the agent",".intend(go(1,3),I): same, but I unifies with the intention that contains the goal"}, seeAlso={"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 intend extends DefaultInternalAction

Internal action: .intend(G, [ I ] ).

Description: checks if goal G is intended: G is intended if there is a triggering event +!G in any plan within an intention I; just note that intentions can appear in E (list of events), PA (intentions with pending actions), and PI (intentions waiting for something) as well. This internal action backtracks all values for G.

Example:

  • .intend(go(1,3)): is true if a plan with triggering event +!go(1,3) appears in an intention of the agent.
  • .intend(go(1,3),I): as above and I unifies with the intention that contains the goal. I is the identification of the intention. The internal action .intention can be used to further inspect the state of the intention.
See Also: