In some sense, the network primitives are the most interesting aspect of PLAN, as they enable mobile computation via generating and sending new active packets.
The meaning of this primitive is: evaluate E on host H. Furthermore, use
the function to determine how to get to H. Finally,
the current packet donates
of its resource bound to the child
packet.
More specific restrictions follow:
On success, the call to OnRemote will create a PLAN packet which is
sent to . The invocation part of the PLAN program consists of
and the code part consists of the subset of the code of
the invoking program that is required to properly evaluate the invocation.
The remainder of the packet is defined by the remaining three arguments to
OnRemote. Within the currently executing program OnRemote
returns unit.
In the event of an error, one of the following exceptions will be raised (and the creation of the packet aborted):
Here, we want E to be evaluated on H (a neighbor of the current node),
and of the current packet's resource bound will be
transferred to the child packet. More specifically:
On success, the call to OnNeighbor will return unit. In the event of an error, one of the following exceptions will be raised: