Previous Next Contents

6   Chunks

A fundamental part of PLAN computation is defined by entities known as chunks. These are essentially three-tuples consisting of code (possibly empty), a function name to execute (possibly a service), and a list of values to apply to the given function name. Essentially a PLAN packet, which is created by a call to OnRemote or OnNeighbor, consists of a chunk to be evaluated and location to evaluate it (the other fields in the packet assist in this process).

In PLAN, chunks are first-class, which means they can be manipulated as data (bound to variables, passed to functions, etc.) The syntax for creating a chunk is to surround a function call name with |'s, as in the ping example above. This has the effect of first evaluating the arguments of the function call (since they must be values to be transmitted over the wire), grabbing the necessary code, and finally packaging both results with the function name into a single entity. Conceptually, the function name is not resolved locally, and this is indicated syntactically by surrounding it with |'s. More details about chunks can be found in [5].


Previous Next Contents