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:
.current_intention(X)
: X
unifies with the
description of the current intention (i.e. the intention that executed this
internal action).Notes:
Constructor and Description |
---|
current_intention() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
execute(TransitionSystem ts,
Unifier un,
Term[] args)
Executes the internal action.
|
int |
getMaxArgs() |
int |
getMinArgs() |
canBeUsedInContext, checkArguments, destroy, prepareArguments, suspendIntention
public int getMinArgs()
getMinArgs
in class DefaultInternalAction
public int getMaxArgs()
getMaxArgs
in class DefaultInternalAction
public java.lang.Object execute(TransitionSystem ts, Unifier un, Term[] args) throws java.lang.Exception
InternalAction
execute
in interface InternalAction
execute
in class DefaultInternalAction
java.lang.Exception