Explicit Fusions: Theory and Implementation

This work describes a concurrent, distributed abstract machine for the pi calculus. Its primary audience are researchers in the field of concurrency. The secondary audience are working programmers looking for a better way to write interactive programs. This audience need only read Chapters 1 (an overview) and 5 (the implementation). I hope that these chapters might prove appealing to students wishing to implement the pi calculus, perhaps as a course project. The pi calculus of Milner, Parrow and Walker [47] is a widely studied formalism for describing interactive and concurrent systems. Its basic mechanism is synchronous message-passing over a channel: (1) One program signals its readiness to transmit some data over a channel; (2) Another program signals its readiness to receive over that channel; (3) When it has been established that two programs are ready to communicate, they do. I introduce a new model for synchronous rendezvous—using explicit fusions. ‘Fusion’ means that, during communication, the data is temporarily shared between the two participating programs. ‘Explicit’ means that this fusion can persist in the program, allowing us to delay and control the effect of the communication. In this sense, explicit fusions do for the pi calculus what the explicit substitutions of Abadi, Cardelli, Curien and Levy [1] do for the lambda calculus. The dissertation has two halves: theory and implementation. The theory introduces the explicit fusion calculus—a variant of the pi calculus that includes explicit fusions. I study its bisimulation, and relate it to the fusion calculus of Victor and Parrow [52], the chi calculus of Fu [21] and Sangiorgi’s open bisimulation for the pi calculus [59]. Fusions, although not explicit ones, were initially and independently discovered by Victor and Parrow and by Fu. A picalculus term called an equator, introduced by Honda and Yoshida [31], behaves like an explicit fusion up to weak bisimulation. Merro [40] has studied the connection between equators and the fusion calculus; I study their connection with explicit fusions. Some of the work here has already been published by Gardner and Wischik [25]. The implementation involves a distributed abstract machine for both the pi calculus and the explicit fusion calculus. I introduce a technique called fragmentation which leads to more efficient operation of the machine, and show how fragmentation can be encoded in the explicit fusion calculus. This fragmentation is similar to the solos calculus of Laneve, Victor and Parrow [34], in that it does not use syntactic guards. Now there have been implementations of the pi calculus before: PICT by Pierce is the best known; Squeak [11] based on a paper by Cardelli [9]; Facile [26]; and the Join Calculus [17] by Fournet, Levy and others. What distinguishes my work is that it is an distributed virtual machine for the pi calculus which implements synchronous rendezvous without handshaking. The others implementations are either not distributed (PICT, Squeak), or use handshaking (Facile), or do not implement the pi calculus (Join). I discuss optimisations for when various agents share the same address space. In the limiting case when the entire program occupies just a single address space, my implementation becomes essentially the same as PICT and Squeak. Parts of Chapters 3 and 4 restate existing work [25], done in collaboration with my supervisor Philippa Gardner. She has also contributed thorough proofreading. The machine calculus in Chapter 6 has been improved through the help of her and Cosimo Laneve.