Abstract
We describe a type system with mixed linear and non-linear recursive types called LNL-FPC (the linear/non-linear fixpoint calculus). The type system supports linear typing which enhances the safety properties of programs, but also supports non-linear typing as well which makes the type system more convenient for programming. Just like in FPC, we show that LNL-FPC supports type-level recursion which in turn induces term-level recursion. We also provide sound and computationally adequate categorical models for LNL-FPC which describe the categorical structure of the substructural operations of Intuitionistic Linear Logic at all non-linear types, including the recursive ones. In order to do so, we describe a new technique for solving recursive domain equations within the category CPO by constructing the solutions over pre-embeddings. The type system also enjoys implicit weakening and contraction rules which we are able to model by identifying the canonical comonoid structure of all non-linear types. We also show that the requirements of our abstract model are reasonable by constructing a large class of concrete models that have found applications not only in classical functional programming, but also in emerging programming paradigms that incorporate linear types, such as quantum programming and circuit description programming languages.
Supplemental Material
Available for Download
The paper together with some appendices.
- M. Abadi and M. P. Fiore. 1996. Syntactic Considerations on Recursive Types. In Proceedings 11th Annual IEEE Symposium on Logic in Computer Science. 242–252. Google Scholar
Digital Library
- Samson Abramsky. 1993. Computational Interpretations of Linear Logic. Theor. Comput. Sci. 111, 1&2 (1993), 3–57. Google Scholar
Digital Library
- S. Abramsky and A. Jung. 1994. Handbook of Logic in Computer Science (Vol. 3). Oxford University Press, Oxford, UK, Chapter Domain Theory, 1–168. http://dl.acm.org/citation.cfm?id=218742.218744 Google Scholar
Digital Library
- Jiří Adámek. 1974. Free algebras and automata realizations in the language of categories. Commentationes Mathematicae Universitatis Carolinae 15, 4 (1974), 589–602.Google Scholar
- Jiří Adámek, Stefan Milius, and Lawrence S Moss. 2018. Fixed points of functors. Journal of Logical and Algebraic Methods in Programming 95 (2018), 41–81.Google Scholar
Cross Ref
- Andrew Barber. 1996. Dual Intuitionistic Linear Logic. Technical Report, University of Edinburgh.Google Scholar
- P.N. Benton. 1995. A mixed linear and non-linear logic: Proofs, terms and models. In Computer Science Logic: 8th Workshop, CSL ’94, Selected Papaers, Leszek Pacholski and Jerzy Tiuryn (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 121–135. Google Scholar
Digital Library
- P. N. Benton and P. Wadler. 1996. Linear Logic, Monads and the Lambda Calculus. In LICS 1996. Google Scholar
Digital Library
- Jean-Philippe Bernardy, Mathieu Boespflug, Ryan R. Newton, Simon Peyton Jones, and Arnaud Spiwack. 2017. Linear Haskell: Practical Linearity in a Higher-order Polymorphic Language. Proc. ACM Program. Lang. 2, POPL, Article 5 (Dec. 2017), 29 pages. Google Scholar
Digital Library
- Gavin M. Bierman, Andrew M. Pitts, and Claudio V. Russo. 2000. Operational Properties of Lily, a Polymorphic Linear Lambda Calculus with Recursion. Electr. Notes Theor. Comput. Sci. 41, 3 (2000), 70–88.Google Scholar
Cross Ref
- F. Borceux. 1994. Handbook of Categorical Algebra 2: Categories and Structures. Cambridge University Press.Google Scholar
- T. Braüner. 1997. A general adequacy result for a linear funcitonal language. Theoretical Computer Science 177 (1997), 27–58. Google Scholar
Digital Library
- L. Caires, F. Pfenning, and B. Toninho. 2016. Linear logic propositions as session types. Mathematical Structures in Computer Science 26, 3 (2016), 367–423.Google Scholar
Cross Ref
- B. Day. 1974. On closed categories of functors II. In Category Seminar: Proceedings Sydney Category Theory Seminar 1972/1973. 20–54.Google Scholar
- Adam Eppendahl. 2003. Categories and types for axiomatic domain theory. Ph.D. Dissertation. Queen Mary University of London, UK. http://ethos.bl.uk/OrderDetails.do?uin=uk.bl.ethos.408375Google Scholar
- Marcelo Fiore and Gordon Plotkin. 1994. An Axiomatization of Computationally Adequate Domain Theoretic Models of FPC. In LICS. IEEE Computer Society, 92–102.Google Scholar
- M. P. Fiore. 1994. Axiomatic domain theory in categories of partial maps. Ph.D. Dissertation. University of Edinburgh, UK.Google Scholar
Digital Library
- J.-Y. Girard. 1987. Linear Logic. Theoretical Computer Science 50 (1987), 1 – 101. Google Scholar
Digital Library
- Daniel J Lehmann and Michael B Smyth. 1981. Algebraic specification of data types: A synthetic approach. Mathematical Systems Theory (1981).Google Scholar
- Paul Blain Levy. 2004. Call-By-Push-Value: A Functional/Imperative Synthesis. Springer.Google Scholar
- Bert Lindenhovius, Michael Mislove, and Vladimir Zamdzhiev. 2018. Enriching a Linear/Non-linear Lambda Calculus: A Programming Language for String Diagrams. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018, Anuj Dawar and Erich Grädel (Eds.). ACM, 659–668. Google Scholar
Digital Library
- Octavio Malherbe, Philip Scott, and Peter Selinger. 2013. Presheaf Models of Quantum Computation: An Outline. Springer Berlin Heidelberg, Berlin, Heidelberg, 178–194.Google Scholar
- Rasmus Ejlers Møgelberg, Lars Birkedal, and Giuseppe Rosolini. 2008. Synthetic domain theory and models of linear Abadi & Plotkin logic. Ann. Pure Appl. Logic 155, 2 (2008), 115–133.Google Scholar
Cross Ref
- J. Garrett Morris. 2016. The Best of Both Worlds: Linear Functional Programming Without Compromise. SIGPLAN Not. 51, 9 (Sept. 2016), 448–461. Google Scholar
Digital Library
- Michele Pagani, Peter Selinger, and Benoît Valiron. 2014. Applying quantitative semantics to higher-order quantum computing. In The 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’14, San Diego, CA, USA, January 20-21, 2014, Suresh Jagannathan and Peter Sewell (Eds.). ACM, 647–658. Google Scholar
Digital Library
- Andrew M. Pitts. 1996. Relational Properties of Domains. Inf. Comput. 127, 2 (1996), 66–90.Google Scholar
Cross Ref
- G. D. Plotkin. 1985. Lectures on predomains and partial functions. Notes for a course given at CSLI Stanford University.Google Scholar
- M. Rennela and S. Staton. 2017. Classical control and quantum circuits in enriched category theory. To appear in MFPS XXXIII.Google Scholar
- Francisco Rios and Peter Selinger. 2017. A categorical model for a quantum circuit description language. In Proceedings 14th International Conference on Quantum Physics and Logic, QPL 2017, Nijmegen, The Netherlands, 3-7 July 2017. (EPTCS), Bob Coecke and Aleks Kissinger (Eds.), Vol. 266. 164–178.Google Scholar
- Giuseppe Rosolini and Alex Simpson. 2004. Using synthetic domain theory to prove operational properties of a polymorphic programming language based on strictness. Manuscript.Google Scholar
- M.B. Smyth and G.D. Plotkin. 1982. The Category-theoretic Solution of Recursive Domain Equations. Siam J. Comput. (1982).Google Scholar
- Jesse A. Tov and Riccardo Pucella. 2011. Practical Affine Types. In Proceedings of the 38th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’11). ACM, New York, NY, USA, 447–458. Google Scholar
Digital Library
- Philip Wadler. 1990. Linear Types Can Change the World!. In PROGRAMMING CONCEPTS AND METHODS. North.Google Scholar
Index Terms
Mixed linear and non-linear recursive types
Recommendations
Subtyping recursive types
We investigate the interactions of subtyping and recursive types, in a simply typed λ-calculus. The two fundamental questions here are whether two (recursive)types are in the subtype relation and whether a term has a type. To address the first question, ...
Recursive type generativity
Proceedings of the tenth ACM SIGPLAN international conference on Functional programmingExistential types provide a simple and elegant foundation for understanding generative abstract data types, of the kind supported by the Standard ML module system. However, in attempting to extend ML with support for recursive modules, we have found ...
Denotational semantics of recursive types in synthetic guarded domain theory
LICS '16: Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer ScienceGuarded recursion is a form of recursion where recursive calls are guarded by delay modalities. Previous work has shown how guarded recursion is useful for reasoning operationally about programming languages with advanced features including general ...






Comments