skip to main content
research-article
Open Access

Mixed linear and non-linear recursive types

Published:26 July 2019Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

a111-zamdzhiev.webm

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. Samson Abramsky. 1993. Computational Interpretations of Linear Logic. Theor. Comput. Sci. 111, 1&2 (1993), 3–57. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. Jiří Adámek. 1974. Free algebras and automata realizations in the language of categories. Commentationes Mathematicae Universitatis Carolinae 15, 4 (1974), 589–602.Google ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarCross RefCross Ref
  6. Andrew Barber. 1996. Dual Intuitionistic Linear Logic. Technical Report, University of Edinburgh.Google ScholarGoogle Scholar
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. N. Benton and P. Wadler. 1996. Linear Logic, Monads and the Lambda Calculus. In LICS 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarCross RefCross Ref
  11. F. Borceux. 1994. Handbook of Categorical Algebra 2: Categories and Structures. Cambridge University Press.Google ScholarGoogle Scholar
  12. T. Braüner. 1997. A general adequacy result for a linear funcitonal language. Theoretical Computer Science 177 (1997), 27–58. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarCross RefCross Ref
  14. B. Day. 1974. On closed categories of functors II. In Category Seminar: Proceedings Sydney Category Theory Seminar 1972/1973. 20–54.Google ScholarGoogle Scholar
  15. 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 ScholarGoogle Scholar
  16. Marcelo Fiore and Gordon Plotkin. 1994. An Axiomatization of Computationally Adequate Domain Theoretic Models of FPC. In LICS. IEEE Computer Society, 92–102.Google ScholarGoogle Scholar
  17. M. P. Fiore. 1994. Axiomatic domain theory in categories of partial maps. Ph.D. Dissertation. University of Edinburgh, UK.Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. J.-Y. Girard. 1987. Linear Logic. Theoretical Computer Science 50 (1987), 1 – 101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Daniel J Lehmann and Michael B Smyth. 1981. Algebraic specification of data types: A synthetic approach. Mathematical Systems Theory (1981).Google ScholarGoogle Scholar
  20. Paul Blain Levy. 2004. Call-By-Push-Value: A Functional/Imperative Synthesis. Springer.Google ScholarGoogle Scholar
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. Octavio Malherbe, Philip Scott, and Peter Selinger. 2013. Presheaf Models of Quantum Computation: An Outline. Springer Berlin Heidelberg, Berlin, Heidelberg, 178–194.Google ScholarGoogle Scholar
  23. 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 ScholarGoogle ScholarCross RefCross Ref
  24. J. Garrett Morris. 2016. The Best of Both Worlds: Linear Functional Programming Without Compromise. SIGPLAN Not. 51, 9 (Sept. 2016), 448–461. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. Andrew M. Pitts. 1996. Relational Properties of Domains. Inf. Comput. 127, 2 (1996), 66–90.Google ScholarGoogle ScholarCross RefCross Ref
  27. G. D. Plotkin. 1985. Lectures on predomains and partial functions. Notes for a course given at CSLI Stanford University.Google ScholarGoogle Scholar
  28. M. Rennela and S. Staton. 2017. Classical control and quantum circuits in enriched category theory. To appear in MFPS XXXIII.Google ScholarGoogle Scholar
  29. 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 ScholarGoogle Scholar
  30. Giuseppe Rosolini and Alex Simpson. 2004. Using synthetic domain theory to prove operational properties of a polymorphic programming language based on strictness. Manuscript.Google ScholarGoogle Scholar
  31. M.B. Smyth and G.D. Plotkin. 1982. The Category-theoretic Solution of Recursive Domain Equations. Siam J. Comput. (1982).Google ScholarGoogle Scholar
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. Philip Wadler. 1990. Linear Types Can Change the World!. In PROGRAMMING CONCEPTS AND METHODS. North.Google ScholarGoogle Scholar

Index Terms

  1. Mixed linear and non-linear recursive types

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!