Previous Contents Next

3.3   Primitives

This section describes the kinds of primitives that are used in join-calculus programs. As port names, primitives accept arguments, they can be either synchronous or asynchronous (in the former case, they return some results); they use the same syntax. Notice however that primitives are not first class values: they must be applied to their arguments. As a consequence, they cannot be sent in messages.

Primitives can be of two sorts: either part of the join-calculus or externally defined.

3.3.1   core primitives

The join-calculus provides three core primitives to control migration and failures. The semantics of these primitives depends on the location where they appear.

3.3.2   external primitives

External primitives are function calls lifted from Objective Caml and linked to the join-calculus runtime system. Most of the standard libraries consist of external primitives; programmers can also extend the join-calculus with their own Ocaml-defined primitives.

NB 1 : The join-calculus does not support the concurrent evaluation of external primitives; as a result, the execution deadlocks if the external call does not return.

NB 2 : The join-calculus provides only partial distributed support for externals primitives: executing a primitive always calls the definition that has been linked to the current runtime, if it exists, or otherwise causes a runtime error.


Previous Contents Next