Abstract
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.
Supplemental Material
- }}Samson Abramsky. Computational interpretations of linear logic. Theoretical Computer Science, 111:3--57, 1993. Google Scholar
Digital Library
- }}Amal Ahmed, Matthew Fluet, and Greg Morrisett. L3: A linear language with locations. Fundam. Inf., 77(4):397--449, 2007. Google Scholar
Digital Library
- }}Joe Armstrong, Robert Virding, Claes Wikström, and Mike Williams. Concurrent Programming in Erlang. Prentice-Hall, 1996. Google Scholar
Digital Library
- }}Emmanuel Beffara. A concurrent model for linear logic. Electronic Notes in Theoretical Computer Science, 155:147--168, 2006. Google Scholar
Digital Library
- }}G. Bellin and P. J. Scott. On the π-calculus and linear logic. Theoretical Computer Science, 135(1):11--65, 1994. Google Scholar
Digital Library
- }}Nick Benton, G. M. Bierman, J. Martin E. Hyland, and Valeria de Paiva. A term calculus for intuitionistic linear logic. In Proceedings of the International Conference on Typed Lambda Calculi and Applications, pages 75--90. Springer-Verlag LNCS 664, 1993. Google Scholar
Digital Library
- }}Josh Berdine. Linear and Affine Typing of Continuation-Passing Style. PhD thesis, Queen Mary, University of London, 2004.Google Scholar
- }}Josh Berdine, Peter W. O'Hearn, Uday S. Reddy, and Hayo Thielecke. Linearly used continuations. In Proceedings of the Continuations Workshop, 2001.Google Scholar
- }}G. M. Bierman, A. M. Pitts, and C. V. Russo. Operational properties of Lily, a polymorphic linear lambda calculus with recursion. In Fourth International Workshop on Higher Order Operational Techniques in Semantics, Montral, volume 41 of Electronic Notes in Theoretical Computer Science. Elsevier, 2000.Google Scholar
- }}Gavin Bierman. A classical linear lambda calculus. Theoretical Computer Science, 227(1-2):43--78, 1999. Google Scholar
Digital Library
- }}Gavin M. Bierman. Program equivalence in a linear functional language. Journal of Functional Programming, 10(2), 2000. Google Scholar
Digital Library
- }}Luís Caires and Frank Pfenning. Session types as intuitionistic linear propositions. In Proceedings of the 21st International Conference on Concurrency Theory (CONCUR 2010), Paris, France, August 2010. Springer LNCS. Google Scholar
Digital Library
- }}Arthur Charguéraud and François Pottier. Functional translation of a calculus of capabilities. In ICFP '08: Proceeding of the 13th ACM SIGPLAN international conference on Functional programming, pages 213--224, New York, NY, USA, 2008. ACM. Google Scholar
Digital Library
- }}Valeria de Paiva and Eike Ritter. A parigot-style linear lambda-calculus for full intuitionistic linear logic. Theory and Applications of Categories, 17(3), 2006.Google Scholar
- }}Manuel Fähndrich, Mark Aiken, Chris Hawblitzel, Orion Hodson, Galen Hunt, James R. Larus, and Steven Levi. Language support for fast and reliable message-based communication in singularity os. SIGOPS Oper. Syst. Rev., 40(4):177--190, 2006. Google Scholar
Digital Library
- }}Manuel Fähndrich and Robert DeLine. Adoption and focus: Practical linear types for imperative programming. In Proc. of the SIGPLAN Conference on Programming Language Design, pages 13--24, Berlin, Germany, June 2002. Google Scholar
Digital Library
- }}M. Felleisen and R. Hieb. A revised report on the syntactic theories of sequential control and state. Theoretical Computer Science, 103(2):235--271, 1992. Google Scholar
Digital Library
- }}Andrzej Filinski. Declarative continuations and categorical duality. Master's thesis, University of Copenhagen, August 1989.Google Scholar
- }}Andrzej Filinski. Linear continuations. In Proc. 19th ACM Symp. on Principles of Programming Languages (POPL), pages 27--38, 1992. Google Scholar
Digital Library
- }}C. Fournet and G. Gonthier. The Reflexive CHAM and the Join-Calculus. In Proc. ACM Symp. on Principles of Programming Languages (POPL), pages 372--385, 1996. Google Scholar
Digital Library
- }}Cédric Fournet. The Join-Calculus: a Calculus for Distributed Mobile Programming. PhD thesis, École Polytechnique, nov 1998.Google Scholar
- }}Jean-Yves Girard. Linear logic. Theoretical Computer Science, 50:1--102, 1987. Google Scholar
Digital Library
- }}Timothy G. Griffin. A formulae-as-types notion of control. In Conference Record of the Seventeenth Annual ACM Symposium on Principles of Programming Languages, pages 47--58. ACM Press, 1990. Google Scholar
Digital Library
- }}Michael Hicks, Greg Morrisett, Dan Grossman, and Trevor Jim. Experience with safe manual memory-management in Cyclone. In ISMM '04: Proceedings of the 4th international symposium on Memory management, pages 73--84, New York, NY, USA, 2004. ACM. Google Scholar
Digital Library
- }}Kohei Honda, Vasco T. Vasconcelos, and Makoto Kubo. Language primitives and type discipline for structured communication-based programming. In ESOP98, volume 1381 of LNCS, pages 122--138. Springer-Verlag, 1998. Google Scholar
Digital Library
- }}W. A. Howard. The formulae-as-types notion of contstruction. In To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism. Academic Press, 1980.Google Scholar
- }}Naoki Kobayashi. Type systems for concurrent programs. In Proceedings of UNU/IIST 10th Anniversary Cooloquium, March 2002.Google Scholar
- }}Naoki Kobayashi, Benjamin C. Pierce, and David N. Turner. Linearity and the Pi-Calculus. Transactions on Programming Languages and Systems, 21(5):914--947, 1999. Google Scholar
Digital Library
- }}Yves Lafont. The linear abstract machine. Theoretical Computer Science, 59:157--180, 1988. Corrections in vol. 62, pp. 327--328. Google Scholar
Digital Library
- }}John Maraist, Martin Odersky, David N. Turner, and Philip Wadler. Call-by-name, call-by-value, call-by-need, and the linear lambda calculus. In 11'th International Conference on the Mathematical Foundations of Programming Semantics, New Orleans, Lousiana, - 1995.Google Scholar
- }}Karl Mazurak, Jianzhou Zhao, and Steve Zdancewic. Lightweight linear types in System F0. In TLDI '10: Proceedings of the 5th ACM SIGPLAN workshop on Types in language design and implementation, pages 77--88, New York, NY, USA, 2010. ACM. Google Scholar
Digital Library
- }}R. Milner, J. Parrow, and D. Walker. A calculus of mobile processes. Information and Computation, 100(1):1--77, 1992. Google Scholar
Digital Library
- }}J. Niehren, J. Schwinghammer, and G. Smolka. A concurrent lambda calculus with futures. Theor. Comput. Sci., 364(3):338--356, 2006. Google Scholar
Digital Library
- }}C.-H. L. Ong and C. A. Stewart. A curry-howard foundation for functional computation with control. In Proc. 24th ACM Symp. on Principles of Programming Languages (POPL), pages 215--227, Paris, France, 1997. Google Scholar
Digital Library
- }}Michel Parigot. λµ-calculus: An algorithmic interpretation of classical natural deduction. In Proceedings of the International Conference on Logic Programming and Automated Reasoning, volume 624 of Lecture Notes in Computer Science, pages 190--201. Springer, 1992. Google Scholar
Digital Library
- }}Michel Parigot. Classical proofs as programs. In Proceedings of the 3rd Kurt Gödel Colloquium, volume 713 of Lecture Notes in Computer Science, pages 263--276. Springer-Verlag, 1993. Google Scholar
Digital Library
- }}Eike Ritter, David J. Pym, and Lincoln A. Wallen. Proof-terms for classical and intuitionistic resolution. Journal of Logic and Computation, 10(2):173--207, 2000.Google Scholar
Cross Ref
- }}Kaku Takeuchi, Kohei Honda, and Makoto Kubo. An interaction-based language and its typing system. In Proceedings of PARLE'94, pages 398--413. Springer-Verlag, 1994. Lecture Notes in Computer Science number 817. Google Scholar
Digital Library
- }}David N. Turner and Philip Wadler. Operational interpretations of linear logic. Theoretical Computer Science, 227(1--2):231--248, September 1999. Google Scholar
Digital Library
- }}Vasco T. Vasconcelos, Simon J. Gay, and António Ravara. Type checking a multithreaded functional language with session types. Theoretical Computer Science, 368(1-2):64--87, 2006. Google Scholar
Digital Library
- }}Edsko Vries, Rinus Plasmeijer, and David M. Abrahamson. Uniqueness typing simplified. In Implementation and Application of Functional Languages: 19th International Workshop, IFL 2007, Freiburg, Germany, September 27-29, 2007. Revised Selected Papers, pages 201--218, Berlin, Heidelberg, 2008. Springer-Verlag. Google Scholar
Digital Library
- }}Philip Wadler. Linear types can change the world! In M. Broy and C. Jones, editors, Progarmming Concepts and Methods, Sea of Galilee, Israel, April 1990. North Holland. IFIP TC 2 Working Conference.Google Scholar
- }}Philip Wadler. Call-by-value is dual to call-by-name. In ICFP '03: Proceedings of the eighth ACM SIGPLAN international conference on Functional programming, pages 189--201, New York, NY, USA, 2003. ACM. Google Scholar
Digital Library
- }}Philip Wadler. Down with the bureaucracy of syntax! Pattern matching for classical linear logic. unpublished manuscript, 2004.Google Scholar
- }}Nobuko Yoshida, Kohei Honda, and Martin Berger. Linearity and bisimulation. J. Log. Algebr. Program., 72(2):207--238, 2007.Google Scholar
Cross Ref
- }}Noam Zeilberger. On the unity of duality. Annals of Pure and Applied Logic, 153(1-3):66--96, 2006.Google Scholar
Cross Ref
- }}Dengping Zhu and Hongwei Xi. Safe Programming with Pointers through Stateful Views. In Proceedings of the 7th International Symposium on Practical Aspects of Declarative Languages, pages 83--97, Long Beach, CA, January 2005. Springer-Verlag LNCS vol. 3350. Google Scholar
Digital Library
Index Terms
Lolliproc: to concurrency from classical linear logic via curry-howard and control
Recommendations
Lolliproc: to concurrency from classical linear logic via curry-howard and control
ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programmingWhile 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, ...
The decidability of the intensional fragment of classical linear logic
Intensional classical linear logic (MELL) is proved decidable.Intensional interlinear logic (RLL) is proved decidable.We adapt Kripke's method used to prove decidability for some relevance logics.The semi-relevant RLL emerges as a logic superior to MELL ...
Lightweight linear types in system f°
TLDI '10: Proceedings of the 5th ACM SIGPLAN workshop on Types in language design and implementationWe present System F°, an extension of System F that uses kinds to distinguish between linear and unrestricted types, simplifying the use of linearity for general-purpose programming. We demonstrate through examples how System F° can elegantly express ...







Comments