jason.stdlib
Class current_intention

Package class diagram package current_intention
java.lang.Object
  extended by jason.asSemantics.DefaultInternalAction
      extended by jason.stdlib.current_intention
All Implemented Interfaces:
InternalAction, java.io.Serializable

public class current_intention
extends DefaultInternalAction

Internal action: .current_intention.

Description: returns a description of the current intention. It is useful for plans that need to inspect the current intention. The description of the intention has the following form:

intention(id,stack of intended means)

where each intended means has the form:

im(plan label,plan body term, unification function (a list of maps))

For example:

intention(1,
[
im(l__6[source(self)],{ .current_intention(I); .print(end) }, [map(I, ....)]),
im(l__5[source(self)],{ .fail }, []),
im(l__4[source(self)],{ !g5(X); .print(endg4) }, [map(X, test)]),
...
])

Parameters:

Example:

Notes:

See Also:
intend, desire, drop_all_desires, drop_all_events, drop_all_intentions, drop_intention, drop_desire, succeed_goal, fail_goal, suspend, suspended, resume, Serialized Form

Constructor Summary
current_intention()
           
 
Method Summary
 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, checkArguments, prepareArguments, suspendIntention
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

current_intention

public current_intention()
Method Detail

getMinArgs

public int getMinArgs()
Overrides:
getMinArgs in class DefaultInternalAction

getMaxArgs

public int getMaxArgs()
Overrides:
getMaxArgs in class DefaultInternalAction

execute

public java.lang.Object execute(TransitionSystem ts,
                                Unifier un,
                                Term[] args)
                         throws java.lang.Exception
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 interface InternalAction
Overrides:
execute in class DefaultInternalAction
Throws:
java.lang.Exception