Lolliproc: to concurrency from classical linear logic via curry-howard and control

While many type systems based on the intuitionistic fragment of linear logic have been proposed, applications in programming languages of the full power of linear logic - including double-negation elimination - have remained elusive. Meanwhile, linearity has been used in many type systems for concurrent programs - e.g., session types - which suggests applicability to the problems of concurrent programming, but the ways in which linearity has interacted with concurrency primitives in lambda calculi have remained somewhat ad-hoc. In this paper we connect classical linear logic and concurrent functional programming in the language Lolliproc, which provides simple primitives for concurrency that have a direct logical interpretation and that combine to provide the functionality of session types. Lolliproc features a simple process calculus "under the hood" but hides the machinery of processes from programmers. We illustrate Lolliproc by example and prove soundness, strong normalization, and confluence results, which, among other things, guarantees freedom from deadlocks and race conditions.

[1]  Philip Wadler,et al.  Call-by-value is dual to call-by-name , 2003, ACM SIGPLAN International Conference on Functional Programming.

[2]  Andrzej Filinski Linear continuations , 1992, POPL '92.

[3]  Marinus J. Plasmeijer,et al.  Uniqueness Typing Simplified , 2008, IFL.

[4]  Yves Lafont,et al.  The Linear Abstract Machine , 1988, Theor. Comput. Sci..

[5]  Nobuko Yoshida,et al.  Linearity and Bisimulation , 2002, FoSSaCS.

[6]  Gavin M. Bierman,et al.  Program equivalence in a linear functional language , 2000, Journal of Functional Programming.

[7]  Patrick Lincoln,et al.  Linear logic , 1992, SIGA.

[8]  P. Wadler Down with the bureaucracy of syntax ! Pattern matching for classical linear logic , 2004 .

[9]  Steve Zdancewic,et al.  Lightweight linear types in system f° , 2010, TLDI '10.

[10]  Philip Wadler,et al.  Linear Types can Change the World! , 1990, Programming Concepts and Methods.

[11]  Naoki Kobayashi,et al.  Type Systems for Concurrent Programs , 2002, 10th Anniversary Colloquium of UNU/IIST.

[12]  Samson Abramsky,et al.  Computational Interpretations of Linear Logic , 1993, Theor. Comput. Sci..

[13]  Noam Zeilberger On the unity of duality , 2008, Ann. Pure Appl. Log..

[14]  G M Bierman,et al.  A Classical Linear lambda-Calculus , 1999, Theor. Comput. Sci..

[15]  Valeria de Paiva,et al.  A PARIGOT-STYLE LINEAR -CALCULUS FOR FULL INTUITIONISTIC LINEAR LOGIC , 2006 .

[16]  Matthew Fluet,et al.  A Linear Language with Locations , 2007 .

[17]  Joe Armstrong,et al.  Concurrent programming in ERLANG , 1993 .

[18]  Dan Grossman,et al.  Experience with safe manual memory-management in cyclone , 2004, ISMM '04.

[19]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[20]  Andrzej Filinski Declarative Continuations and Categorical Duality , 1989 .

[21]  J. Gregory Morrisett,et al.  L3: A Linear Language with Locations , 2007, Fundam. Informaticae.

[22]  Kohei Honda,et al.  An Interaction-based Language and its Typing System , 1994, PARLE.

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

[24]  Tristan Crolard,et al.  Deriving a Hoare-Floyd logic for non-local jumps from a formulae-as-types notion of control , 2011, ArXiv.

[25]  William A. Howard,et al.  The formulae-as-types notion of construction , 1969 .

[26]  Martin Odersky,et al.  Call-by-name, Call-by-value, Call-by-need and the Linear lambda Calculus , 1999, Theor. Comput. Sci..

[27]  Claudio V. Russo,et al.  Operational Properties of Lily, a Polymorphic Linear Lambda Calculus with Recursion , 2001, HOOTS.

[28]  Arthur Charguéraud,et al.  Functional translation of a calculus of capabilities , 2008 .

[29]  David J. Pym,et al.  Proof-terms for classical and intuitionistic resolution , 2000, J. Log. Comput..

[30]  Joachim Niehren,et al.  A concurrent lambda calculus with futures , 2005, Theor. Comput. Sci..

[31]  Nick Benton,et al.  A Term Calculus for Intuitionistic Linear Logic , 1993, TLCA.

[32]  Robin Milner,et al.  A Calculus of Mobile Processes, II , 1992, Inf. Comput..

[33]  Gianluigi Bellin,et al.  On the pi-Calculus and Linear Logic , 1992, Theor. Comput. Sci..

[34]  Michel Parigot,et al.  Classical Proofs as Programs , 1993, Kurt Gödel Colloquium.

[35]  Benjamin C. Pierce,et al.  Linearity and the pi-calculus , 1999, TOPL.

[36]  James R. Larus,et al.  Language support for fast and reliable message-based communication in singularity OS , 2006, EuroSys.

[37]  Hongwei Xi,et al.  Safe Programming with Pointers Through Stateful Views , 2005, PADL.

[38]  Vasco Thudichum Vasconcelos,et al.  Language Primitives and Type Discipline for Structured Communication-Based Programming Revisited: Two Systems for Higher-Order Session Communication , 1998, SecReT@ICALP.

[39]  C.-H. Luke Ong,et al.  A Curry-Howard foundation for functional computation with control , 1997, POPL '97.

[40]  Robert DeLine,et al.  Adoption and focus: practical linear types for imperative programming , 2002, PLDI '02.

[41]  Philip Wadler,et al.  Operational Interpretations of Linear Logic , 1999, Theor. Comput. Sci..

[42]  Emmanuel Beffara,et al.  A Concurrent Model for Linear Logic , 2006, MFPS.

[43]  António Ravara,et al.  Type checking a multithreaded functional language with session types , 2006, Theor. Comput. Sci..

[44]  Timothy G. Griffin,et al.  A formulae-as-type notion of control , 1989, POPL '90.

[45]  Frank Pfenning,et al.  Session Types as Intuitionistic Linear Propositions , 2010, CONCUR.

[46]  Michel Parigot,et al.  Lambda-Mu-Calculus: An Algorithmic Interpretation of Classical Natural Deduction , 1992, LPAR.

[47]  Peter W. O'Hearn,et al.  Linearly Used Continuations , 2000 .

[48]  J. Roger Hindley,et al.  To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism , 1980 .

[49]  Cédric Fournet,et al.  The reflexive CHAM and the join-calculus , 1996, POPL '96.

[50]  Cédric Fournet,et al.  The Join Calculus: A Language for Distributed Mobile Programming , 2000, APPSEM.