Abstract
Recursive types extend the simply-typed lambda calculus (STLC) with the additional expressive power to enable diverging computation and to encode recursive data-types (e.g., lists). Two formulations of recursive types exist: iso-recursive and equi-recursive. The relative advantages of iso- and equi-recursion are well- studied when it comes to their impact on type-inference. However, the relative semantic expressiveness of the two formulations remains unclear so far. This paper studies the semantic expressiveness of STLC with iso- and equi-recursive types, proving that these formulations are equally expressive. In fact, we prove that they are both as expressive as STLC with only term-level recursion. We phrase these equi-expressiveness results in terms of full abstraction of three canonical compilers between these three languages (STLC with iso-, with equi-recursive types and with term-level recursion). Our choice of languages allows us to study expressiveness when interacting over both a simply-typed and a recursively-typed interface. The three proofs all rely on a typed version of a proof technique called approximate backtranslation. Together, our results show that there is no difference in semantic expressiveness between STLCs with iso- and equi-recursive types. In this paper, we focus on a simply-typed setting but we believe our results scale to more powerful type systems like System F.
- Amal Ahmed and Matthias Blume. 2008. Typed Closure Conversion Preserves Observational Equivalence. In International Conference on Functional Programming. ACM, 157-168.Google Scholar
- Amal Ahmed and Matthias Blume. 2011. An Equivalence-Preserving CPS Translation via Multi-Language Semantics. In Proceedings of the 16th ACM SIGPLAN International Conference on Functional Programming (Tokyo, Japan) ( ICFP '11). ACM, 431-444.Google Scholar
Digital Library
- Andrew W. Appel and David McAllester. 2001. An Indexed Model of Recursive Types for Foundational Proof-carrying Code. ACM Trans. Program. Lang. Syst. 23, 5 (Sept. 2001 ), 657-683.Google Scholar
Digital Library
- Nick Benton and Chung-Kil Hur. 2009. Biorthogonality, step-indexing and compiler correctness. SIGPLAN Not. 44, 97-108.Google Scholar
Digital Library
- William J. Bowman and Amal Ahmed. 2015. Noninterference for free. In ICFP. ACM.Google Scholar
- Yufei Cai, Paolo G. Giarrusso, and Klaus Ostermann. 2016. System F-omega with Equirecursive Types for Datatype-generic Programming. SIGPLAN Not. 51, 1 (Jan. 2016 ), 30-43.Google Scholar
Digital Library
- Dominique Devriese, Marco Patrignani, and Frank Piessens. 2016. Fully-abstract Compilation by Approximate Backtranslation. In Principles of Programming Languages. 164-177.Google Scholar
- Dominique Devriese, Marco Patrignani, Frank Piessens, and Steven Keuchel. 2017. Modular, Fully-abstract Compilation by Approximate Back-translation. Logical Methods in Computer Science Volume 13, Issue 4 (Oct. 2017 ).Google Scholar
- Matthias Felleisen. 1991. On the Expressive Power of Programming Languages. In Selected Papers from the Symposium on 3rd European Symposium on Programming (ESOP '90). Elsevier North-Holland, Inc., New York, NY, USA, 35-75.Google Scholar
- Cedric Fournet, Nikhil Swamy, Juan Chen, Pierre-Evariste Dagand, Pierre-Yves Strub, and Benjamin Livshits. 2013. Fully Abstract Compilation to JavaScript. In Principles of Programming Languages. ACM, 371-384.Google Scholar
- M. Gordon, R. Milner, and C. P. Wadsworth. 1979. Edinburgh LCF: A Mechanized Logic of Computation. Springer-Verlag, Berlin Heidelberg. https://doi.org/10.1007/3-540-09724-4 Google Scholar
Cross Ref
- Daniele Gorla and Uwe Nestmann. 2016. Full abstraction for expressiveness: history, myths and facts. Mathematical Structures in Computer Science 26, 4 ( 2016 ), 639-654.Google Scholar
- Robert Harper and John C. Mitchell. 1993. On the Type Structure of Standard ML. ACM Transactions on Programming Languages and Systems 15, 2 (April 1993 ), 211-252. https://doi.org/10.1145/169701.169696 Google Scholar
Digital Library
- Chung-Kil Hur and Derek Dreyer. 2011. A Kripke Logical Relation Between ML and Assembly. In Principles of Programming Languages. 133-146.Google Scholar
- Hyeonseung Im, Keiko Nakata, and Sungwoo Park. 2013. Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types. In Automata, Languages, and Programming, Fedor V. Fomin, Ru¯sin¸š Freivalds, Marta Kwiatkowska, and David Peleg (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 299-311.Google Scholar
- Andrew Kennedy. 2006. Securing the. NET Programming Model. Theoretical Computer Science 364 ( 2006 ), 311-317.Google Scholar
- David MacQueen, Gordon Plotkin, and Ravi Sethi. 1984. An Ideal Model for Recursive Polymorphic Types. In Proceedings of the 11th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (Salt Lake City, Utah, USA) ( POPL '84). Association for Computing Machinery, New York, NY, USA, 165-174. https://doi.org/10.1145/800017.800528 Google Scholar
Digital Library
- David MacQueen, Gordon Plotkin, and Ravi Sethi. 1986. An ideal model for recursive polymorphic types. Information and Control 71, 1 ( 1986 ), 95-130.Google Scholar
- Robin Milner. 1977. Fully abstract models of typed λ-calculi. Theoretical Computer Science 4, 1 ( 1977 ), 1-22.Google Scholar
- John C. Mitchell. 1993. On abstraction and the expressive power of programming languages. Science of Computer Programming 21, 2 ( 1993 ), 141-163.Google Scholar
- James H. Morris. 1968. Lambda-Calculus Models of Programming Languages. Ph.D. Dissertation. Massachusetts Institute of Technology.Google Scholar
- Max S. New, William J. Bowman, and Amal Ahmed. 2016. Fully Abstract Compilation via Universal Embedding. In International Conference on Functional Programming. ACM, 103-116.Google Scholar
Digital Library
- Joachim Parrow. 2008. Expressiveness of Process Algebras. Elec. Not. Theo. Comp. Sci. 209, 0 ( 2008 ), 173-186.Google Scholar
- Marco Patrignani. 2020. Why Should Anyone use Colours? or, Syntax Highlighting Beyond Code Snippets. CoRR abs/ 2001.11334.Google Scholar
- Marco Patrignani, Pieter Agten, Raoul Strackx, Bart Jacobs, Dave Clarke, and Frank Piessens. 2015. Secure Compilation to Protected Module Architectures. ACM Trans. Program. Lang. Syst. 37, Article 6 ( April 2015 ), 6 : 1-6 :50 pages.Google Scholar
- Marco Patrignani, Amal Ahmed, and Dave Clarke. 2019. Formal Approaches to Secure Compilation A Survey of Fully Abstract Compilation and Related Work. ACM Comput. Surv. 51, 6, Article 125 ( Jan. 2019 ), 36 pages.Google Scholar
- Marco Patrignani, Eric Mark Martin, and Dominique Devriese. 2020. On the Semantic Expressiveness of Recursive Types. arXiv: 2010. 10859 [cs.PL]Google Scholar
- Benjamin Pierce. 2002. Types and Programming Languages. MIT Press.Google Scholar
Digital Library
- Gordon D. Plotkin. 1977. LCF Considered as a Programming Language. Theoretical Computer Science 5 ( 1977 ), 223-255.Google Scholar
- Dipanwita Sarkar, Oscar Waddell, and R. Kent Dybvig. 2004. A Nanopass Infrastructure for Compiler Education. ACM SIGPLAN Notices 39, 9 (Sept. 2004 ), 201-212. https://doi.org/10.1145/1016848.1016878 Google Scholar
Digital Library
- Manfred Schmidt-Schauß, David Sabel, Joachim Niehren, and Jan Schwinghammer. 2015. Observational program calculi and the correctness of translations. Theoretical Computer Science 577 ( 2015 ), 98-124.Google Scholar
- Lau Skorstengaard, Dominique Devriese, and Lars Birkedal. 2019. StkTokens: Enforcing Well-Bracketed Control Flow and Stack Encapsulation Using Linear Capabilities. Proc. ACM Program. Lang. 3, POPL (Jan. 2019 ), 19 : 1-19 : 28.Google Scholar
Digital Library
- Pawel Urzyczyn. 1995. Positive Recursive Type Assignment. In Proceedings of the 20th International Symposium on Mathematical Foundations of Computer Science (MFCS '95). Springer-Verlag, Berlin, Heidelberg, 382-391.Google Scholar
Digital Library
- Thomas Van Strydonck, Frank Piessens, and Dominique Devriese. 2019. Linear Capabilities for Fully Abstract Compilation of Separation-Logic-Verified Code. Proc. ACM Program. Lang. ICFP ( 2019 ).Google Scholar
Digital Library
Index Terms
On the semantic expressiveness of 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, ...
Subtyping Recursive Types in Kernel Fun - Abstract
LICS '99: Proceedings of the 14th Annual IEEE Symposium on Logic in Computer ScienceThe problem of defining and checking a subtype relation between recursive types was studied by Amadio and Cardelli (ACM TOPLAS'93) for a first order type system, but for second order systems, which combine subtyping and parametric polymorphism, only ...
Relational parametricity for references and recursive types
TLDI '09: Proceedings of the 4th international workshop on Types in language design and implementationWe present a possible world semantics for a call-by-value higher-order programming language with impredicative polymorphism, general references, and recursive types. The model is one of the first relationally parametric models of a programming language ...






Comments