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 条
  • [41] AN IDEAL MODEL FOR RECURSIVE POLYMORPHIC TYPES
    MACQUEEN, D
    PLOTKIN, G
    SETHI, R
    INFORMATION AND CONTROL, 1986, 71 (1-2): : 95 - 130
  • [42] Contractive Signatures with Recursive Types, Type Parameters, and Abstract Types
    Im, Hyeonseung
    Nakata, Keiko
    Park, Sungwoo
    AUTOMATA, LANGUAGES, AND PROGRAMMING, PT II, 2013, 7966 : 299 - 311
  • [43] Unified Syntax with Iso-types
    Yang, Yanpeng
    Bi, Xuan
    Oliveira, Bruno C. D. S.
    PROGRAMMING LANGUAGES AND SYSTEMS, APLAS 2016, 2016, 10017 : 251 - 270
  • [44] FULL SATISFACTION CLASSES AND RECURSIVE-SATURATION
    LACHLAN, AH
    CANADIAN MATHEMATICAL BULLETIN-BULLETIN CANADIEN DE MATHEMATIQUES, 1981, 24 (03): : 295 - 297
  • [45] Embedding full ternary trees into recursive circulants
    Kim, C
    Choi, J
    Lim, HS
    EURASIA-ICT 2002: INFORMATION AND COMMUNICATION TECHNOLOGY, PROCEEDINGS, 2002, 2510 : 874 - 882
  • [46] INTERFACE DEFINITION LANGUAGE CONVERSIONS - RECURSIVE TYPES
    GAY, DE
    SIGPLAN NOTICES, 1994, 29 (08): : 101 - 110
  • [47] Syntactic Logical Relations for Polymorphic and Recursive Types
    Crary, Karl
    Harper, Robert
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2007, 172 : 259 - 299
  • [48] Bisimulation as Path Type for Guarded Recursive Types
    Mogelberg, Rasmus Ejlers
    Veltri, Niccolo
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL):
  • [49] TYPE INFERENCE WITH RECURSIVE TYPES - SYNTAX AND SEMANTICS
    CARDONE, F
    COPPO, M
    INFORMATION AND COMPUTATION, 1991, 92 (01) : 48 - 80
  • [50] Logical Equivalence for Subtyping Object and Recursive Types
    Steffen van Bakel
    Ugo de’Liguoro
    Theory of Computing Systems, 2008, 42 : 306 - 348