A stackless runtime environment for a Pi-calculus

The Pi-calculus is a formalism to model and reason about highly concurrent and dynamic systems. Most of the expressive power of the language comes from the ability to pass communication channels among concurrent processes, as any other value. We present in this paper the CubeVM, an interpreter architecture for an applied variant of the Pi-calculus, focusing on its operational semantics. The main characteristic of the CubeVM comes from its stackless architecture. We show, in a formal way, that the resource management model inside the VM may be greatly simplified without the need for nested stack frames. This is particularly true for the garbage collection of processes and channels. The proposed GC, based on a reference counting scheme, is highly concurrent and, most interestingly, does automatically detect and reclaim cycles of disabled processes. We also address the main performance issues raised by the fine-grained concurrency model of the Pi-calculus. We introduce the reactive variant of the semantics that allows, when applicable, to increase the performance drastically by bypassing the scheduler. We define the language subset of processes in so called chain-reaction forms for which the sequential semantics can be proved statically. We illustrate the expressive power and performance gains of such chain-reactions with examples of functional, dataflow and object-oriented systems. Encodings for the pure Pi-calculus are also demonstrated.

[1]  Benjamin C. Pierce,et al.  Pict: a programming language based on the Pi-Calculus , 2000, Proof, Language, and Interaction.

[2]  Bradley N. Miller,et al.  The Python Programming Language , 2006 .

[3]  Roger M. Needham,et al.  On the duality of operating system structures , 1979, OPSR.

[4]  Dale Rogerson,et al.  Inside COM , 1997 .

[5]  Harold Abelson,et al.  Revised5 report on the algorithmic language scheme , 1998, SIGP.

[6]  Cosimo Laneve,et al.  Implicit Typing à la ML for the Join-Calculus , 1997, CONCUR.

[7]  Robin Milner,et al.  Communicating and mobile systems - the Pi-calculus , 1999 .

[8]  Raheel Ahmad,et al.  The π-Calculus: A theory of mobile processes , 2008, Scalable Comput. Pract. Exp..

[9]  Frédéric Peschanski Mobile Agents in Interaction Spaces , 2006, Electron. Notes Theor. Comput. Sci..

[10]  Davide Sangiorgi,et al.  Communicating and Mobile Systems: the π-calculus, , 2000 .

[11]  R. Kent Dybvig,et al.  Revised5 Report on the Algorithmic Language Scheme , 1986, SIGP.

[12]  Christian Tismer Continuations and Stackless Python , 1999 .

[13]  Fernando M. A. Silva,et al.  A Virtual Machine for a Process Calculus , 1999, PPDP.

[14]  V. T. Rajan,et al.  Concurrent Cycle Collection in Reference Counted Systems , 2001, ECOOP.

[15]  Vasco T. Vasconcelos,et al.  A Virtual Machine for the TyCO Process Calculus , 1999 .

[16]  Davide Sangiorgi,et al.  The Pi-Calculus - a theory of mobile processes , 2001 .

[17]  Guido van Rossum,et al.  Python Programming Language , 2007, USENIX Annual Technical Conference.

[18]  Rob Pike,et al.  The implementation of Newsqueak , 1990, Softw. Pract. Exp..

[19]  Rob van Glabbeek,et al.  Handbook of Process Algebra , 2001 .

[20]  Gian Pietro Picco,et al.  Understanding code mobility , 1998, Proceedings of the 2000 International Conference on Software Engineering. ICSE 2000 the New Millennium.

[21]  Peter Sewell,et al.  Nomadic pict: correct communication infrastructure for mobile computation , 2001, POPL '01.

[22]  Eric A. Brewer,et al.  USENIX Association Proceedings of HotOS IX : The 9 th Workshop on Hot Topics in Operating Systems , 2003 .

[23]  Gul Agha,et al.  Using passive object garbage collection algorithms for garbage collection of active objects , 2002, ISMM '02.