The polymorphic Pi-calculus : theory and implementation

We investigate whether the 7r-calculus is able to serve as a good foundation for the design and implementation of a strongly-typed concurrent programming language. The first half of the dissertation examines whether the 7r-calculus supports a simple type system which is flexible enough to provide a suitable foundation for the type system of a concurrent programming language. The second half of the dissertation considers how to implement the ir-calculus efficiently, starting with an abstract machine for ir-calculus and finally presenting a compilation of 7r-calculus to C. We start the dissertation by presenting a simple, structural type system for 7r-calculus, and then, after proving the soundness of our type system, show how to infer principal types for r-terms. This simple type system can be extended to include useful type-theoretic constructions such as recursive types and higherorder polymorphism. Higher-order polymorphism is important, since it gives us the ability to implement abstract datatypes in a type-safe manner, thereby providing a greater degree of modularity for 7r-calculus programs. The functional computational paradigm plays an important part in many programming languages. It is well-known that the ir-calculus can encode functional computation. We go further and show that the type structure of )-terms is preserved by such encodings, in the sense that we can relate the type of a )-term to the type of its encoding in the 7r-calculus. This means that a ir-calculus programming language can genuinely support typed functional programming as a special case. An efficient implementation of 7r-calculus is necessary if we wish to consider rcalculus as an operational foundation for concurrent programming. We first give a simple abstract machine for ir-calculus and prove it correct. We then show how this abstract machine inspires a simple, but efficient, compilation of 7r-calculus to C (which now forms the basis of the Pict programming language implementation).

[1]  A. Tarski A LATTICE-THEORETICAL FIXPOINT THEOREM AND ITS APPLICATIONS , 1955 .

[2]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[3]  J. Y. Girard,et al.  Interpretation fonctionelle et elimination des coupures dans l'aritmetique d'ordre superieur , 1972 .

[4]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[5]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[6]  Robin Milner,et al.  A Calculus of Communicating Systems , 1980, Lecture Notes in Computer Science.

[7]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[8]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[9]  Bruno Courcelle,et al.  Fundamental Properties of Infinite Trees , 1983, Theor. Comput. Sci..

[10]  Gordon D. Plotkin,et al.  An ideal model for recursive polymorphic types , 1984, Inf. Control..

[11]  Luca Cardelli The Amber Machine , 1985, Combinators and Functional Programming Languages.

[12]  Andrew W. Appel,et al.  A Standard ML compiler , 1987, FPCA.

[13]  M. Tofte Operational Semantics and Polymorphic Type Inference , 1988 .

[14]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[15]  Robin Milner,et al.  Communication and concurrency , 1989, PHI Series in computer science.

[16]  D. Walker,et al.  A Calculus of Mobile Processes, Part I , 1989 .

[17]  Robin Milner,et al.  Definition of standard ML , 1990 .

[18]  Mario Coppo,et al.  Type Inference with Recursive Types: Syntax and Semantics , 1991, Inf. Comput..

[19]  Luca Cardelli,et al.  Subtyping recursive types , 1991, POPL '91.

[20]  Robin Milner,et al.  Functions as processes , 1990, Mathematical Structures in Computer Science.

[21]  Simon L. Peyton Jones,et al.  Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine , 1992, Journal of Functional Programming.

[22]  Simon L. Peyton Jones,et al.  Report on the programming language Haskell: a non-strict, purely functional language version 1.2 , 1992, SIGP.

[23]  ROBIN MILNER,et al.  Edinburgh Research Explorer A Calculus of Mobile Processes, I , 2003 .

[24]  Peter Lee,et al.  No assembly required: compiling standard ML to C , 1992, LOPL.

[25]  Davide Sangiorgi,et al.  Expressing mobility in process algebras : first-order and higher-order paradigms , 1993 .

[26]  Mark Lillibridge,et al.  Explicit polymorphism and CPS conversion , 1993, POPL '93.

[27]  John H. Reppy Concurrent ML: Design, Application and Semantics , 1993, Functional Programming, Concurrency, Simulation and Automated Reasoning.

[28]  Robin Milner,et al.  The Polyadic π-Calculus: a Tutorial , 1993 .

[29]  Davide Sangiorgi,et al.  From pi-Calculus to Higher-Order pi-Calculus - and Back , 1993, TAPSOFT.

[30]  Vasco Thudichum Vasconcelos,et al.  Principal Typing Schemes in a Polyadic pi-Calculus , 1993, CONCUR.

[31]  Xavier Leroy,et al.  Polymorphism by name for references and continuations , 1993, POPL '93.

[32]  Davide Sangiorgi,et al.  Typing and subtyping for mobile processes , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[33]  Simon J. Gay,et al.  A sort inference algorithm for the polyadic π-calculus , 1993, POPL '93.

[34]  Antony J. T. Davie,et al.  p-Calculus Characterizations of some Practical ?-Calculus Reduction Strategies , 1993 .

[35]  Benjamin C. Pierce,et al.  Concurrent Objects in a Process Calculus , 1994, Theory and Practice of Parallel Programming.

[36]  Flemming Nielson,et al.  Higher-order concurrent programs with finite communication topology (extended abstract) , 1994, POPL '94.

[37]  T. Vasco,et al.  Predicative Polymorphism in-Calculus , 1994 .

[38]  Akinori Yonezawa,et al.  Static Analysis of Communication for Asynchronous Concurrent Programming Languages , 1995, SAS.

[39]  Simon Brock,et al.  Process Semantics of Graph Reduction , 1995, CONCUR.

[40]  R. Amadio Translating Core Facile , 1995 .