jason.stdlib
Class add_nested_source
java.lang.Object
jason.asSemantics.DefaultInternalAction
jason.stdlib.add_nested_source
- All Implemented Interfaces:
- InternalAction, java.io.Serializable
public class add_nested_source
- extends DefaultInternalAction
Internal action: .add_nested_source
.
Description: adds a source annotation to a literal (used in communication).
Parameters:
- + belief(s) (literal or list): the literal where the source annotation
is to be added. If this parameter is a list, all literals in the list
will have the source added.
- + source (atom): the source.
- +/- annotated beliefs(s) (literal or list): this argument
unifies with the result of the source addition.
Examples:
-
.add_nested_source(a,jomi,B)
: B
unifies with a[source(jomi)]
.
-
.add_nested_source([a1,a2], jomi, B)
: B
unifies with [a1[source(jomi)], a2[source(jomi)]]
.
-
.add_nested_source(a[source(bob)],jomi,B)
:
B
unifies with a[source(jomi)[source(bob)]]
,
which means `I believe in a
and the source for that is
agent jomi, the source for jomi was bob'; bob sent a tell to jomi that
sent a tell to me.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
add_nested_source
public add_nested_source()
create
public static InternalAction create()
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
addAnnotToList
public Term addAnnotToList(Unifier unif,
Term l,
Term source)