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 primitivesThe join-calculus provides three core primitives to control migration
and failures. The semantics of these primitives depends on the
location where they appear.
go is a synchronous primitive that takes a location as an
argument, migrates the current location inside of this destination
location, then returns an empty result to signal the success of the
- halt is an asynchronous primitive that causes the current
location to halt (every process in it becomes inert).
- fail is a synchronous primitive that takes a location as an
argument and returns an empty result to signal that this locations is
3.3.2 external primitivesExternal 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.