Compiling the $π$-calculus into a Multithreaded Typed Assembly Language - Cogumbreiro, Tiago (2009)
Current trends in hardware made available multi-core CPU systems to ordinary users, challenging researchers to devise new techniques to bring software into the multi-core world. However, shaping software for multi-cores is more envolving than simply balancing workload among cores. In a near future (in less than a decade) Intel prepares to manufacture and ship 80-core processors; programmers must perform a paradigm shift from sequential to concurrent programming and produce software adapted for multi-core platforms. In the last decade, proposals have been made to compile formal concurrent and functional languages, notably the $π$-calculus, typed concurrent objects, and the $λ$-calculus, into assembly languages. The last work goes a step further and presents a series of type-preserving compilation steps leading from System F to a typed assembly language. Nevertheless, all theses works are targeted at sequential architectures. This paper proposes a type-preserving translation from the $π$-calculus into MIL, a multithreaded typed assembly language for multi-core/multi-processor architectures. We start from a simple asynchronous typed version of the $π$-calculus and translate it into MIL code that is then linked to a run-time library (written in MIL) that provides support for implementation of the $π$-calculus primitives (e.g., queuing messages and processes). In short, we implement a message-passing paradigm in a shared memory architecture