Package jason.stdlib
Class intention
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.intention
- All Implemented Interfaces:
- InternalAction,- Serializable
Internal action: .intention( ID, STATE, STACK, [current]) .
  
Description: returns a description of an intention. It is useful
  for plans that need to inspect some intention. The description of each item of the
  intention stack (i.e., an intended means) has the following form:
  im(plan label,trigger event,plan body term, unification function (a list of maps))
  For example:
  
  
  [
  im(l__6[code_line(10),code_src("karlos.asl"),source(self)], {+!g3},     { .intention(I); .print(end) }, [map(I, ....)]),
  im(l__5[code_line(15),code_src("karlos.asl"),source(self)], {+!g5(10)}, { !g3; .fail }                , []),
  im(l__4[code_line(18),code_src("karlos.asl"),source(self)], {+!start},  { !g5(X); .print(endg4) }     , [map(X, test)]),
  ...
  ]
  Parameters:
- +/- intention id (number): the unique identifier of the intention.
- +/- intention state (atom): the state of the intention, suspended, running, ...
- - intention stack (list, optional): all the intended means of the intention.
- + current intention (atom, optional): selects only the current intention.
Example:
-  .intention(I,_):Iunifies with all intention identifiers.
-  .intention(I,running):Iunifies with identifiers of running intentions.
-  .intention(I,_,S):Sunifies with intended means stack all intentions.
-  .intention(I,_,_,current):Iunifies with the id of the current intention.
Notes:
- For possible states, see https://github.com/jason-lang/jason/blob/master/doc/tech/intention-states.pdf. Some states can be annotated with further details, for instance: waiting[reason(wait(5)[time(400)])]].
- In case this internal action is used in the body of a plan, the intention that
      are executing the plan is used as current.
- In case this internal action is used in the context of a plan, the intention that
      produced the event is used current.
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionexecute(TransitionSystem ts, Unifier un, Term[] args) Executes the internal action.intintMethods inherited from class jason.asSemantics.DefaultInternalActioncanBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
- 
Constructor Details- 
intentionpublic intention()
 
- 
- 
Method Details- 
getMinArgspublic int getMinArgs()- Overrides:
- getMinArgsin class- DefaultInternalAction
 
- 
getMaxArgspublic int getMaxArgs()- Overrides:
- getMaxArgsin class- DefaultInternalAction
 
- 
executeDescription 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 interface- InternalAction
- Overrides:
- executein class- DefaultInternalAction
- Throws:
- Exception
 
 
-