Full Iso-Recursive Types

被引:0
|
作者
Zhou, Litao [1 ]
Wan, Qianyong [1 ]
Oliveira, Bruno C. D. S. [1 ]
机构
[1] Univ Hong Kong, Hong Kong, Peoples R China
来源
关键词
Recursive types; Subtyping; Type system;
D O I
10.1145/3689718
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
There are two well-known formulations of recursive types: iso-recursive and equi-recursive types. Abadi and Fiore [LICS 1996] have shown that iso- and equi-recursive types have the same expressive power. However, their encoding of equi-recursive types in terms of iso-recursive types requires explicit coercions. These coercions come with significant additional computational overhead, and complicate reasoning about the equivalence of the two formulations of recursive types. This paper proposes a generalization of iso-recursive types called full iso-recursive types. Full iso-recursive types allow encoding all programs with equi-recursive types without computational overhead. Instead of explicit term coercions, all type transformations are captured by computationally irrelevant casts, which can be erased at runtime without affecting the semantics of the program. Consequently, reasoning about the equivalence between the two approaches can be greatly simplified. We present a calculus called lambda(mu)(Fi), which extends the simply typed lambda calculus (STLC) with full iso-recursive types. The lambda(mu)(Fi) calculus is proved to be type sound, and shown to have the same expressive power as a calculus with equi-recursive types. We also extend our results to subtyping, and show that equi-recursive subtyping can be expressed in terms of iso-recursive subtyping with cast operators.
引用
收藏
页数:30
相关论文
共 50 条
  • [21] RECURSIVE PROPERTIES OF ISOMORPHISM TYPES
    MOSES, M
    JOURNAL OF THE AUSTRALIAN MATHEMATICAL SOCIETY SERIES A-PURE MATHEMATICS AND STATISTICS, 1983, 34 (APR): : 269 - 286
  • [22] An Algebraic View on Recursive Types
    Michael Marz
    Applied Categorical Structures, 1999, 7 : 147 - 157
  • [23] Decidability properties of recursive types
    Cardone, F
    Coppo, M
    THEORETICAL COMPUTER SCIENCE, PROCEEDINGS, 2003, 2841 : 242 - 255
  • [24] Levy Labels and Recursive Types
    Statman, Rick
    LOGICAL FOUNDATIONS OF COMPUTER SCIENCE (LFCS 2016), 2016, 9537 : 392 - 406
  • [25] RECURSIVE EQUIVALENCE TYPES AND OCTAHEDRA
    DEKKER, JCE
    JOURNAL OF THE AUSTRALIAN MATHEMATICAL SOCIETY SERIES A-PURE MATHEMATICS AND STATISTICS, 1983, 34 (FEB): : 101 - 113
  • [26] Recursive families of inductive types
    Capretta, V
    THEOREM PROVING IN HIGHER ORDER LOGICS, PROCEEDINGS, 2000, 1869 : 73 - 89
  • [27] Syntactic considerations on recursive types
    Abadi, M
    Fiore, MP
    11TH ANNUAL IEEE SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, PROCEEDINGS, 1996, : 242 - 252
  • [28] On the Semantic Expressiveness of Recursive Types
    Patrignani, Marco
    Martin, Eric Mark
    Devriese, Dominique
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2021, 5 (POPL):
  • [29] On resemblance and recursive isomorphism types of bounded partial recursive functions
    N. V. Litvinov
    Siberian Mathematical Journal, 2000, 41 : 327 - 328