Recursive Subtyping for All

被引:3
|
作者
Zhou, Litao [1 ]
Zhou, Yaoda [1 ]
Oliveira, Bruno C. D. S. [1 ]
机构
[1] Univ Hong Kong, Dept Comp Sci, Hong Kong, Peoples R China
关键词
Iso-Recursive Subtyping; Bounded Polymorphism; Object EncodingsIso-Recursive Subtyping; Object Encodings; INTERSECTION; SOUNDNESS; SYSTEM; UNION;
D O I
10.1145/3571241
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Recursive types and bounded quantification are prominent features in many modern programming languages, such as Java, C#, Scala or TypeScript. Unfortunately, the interaction between recursive types, bounded quantification and subtyping has shown to be problematic in the past. Consequently, defining a simple foundational calculus that combines those features and has desirable properties, such as decidability, transitivity of subtyping, conservativity and a sound and complete algorithmic formulation has been a long time challenge. This paper presents an extension of kernel F-<= =, called F-<=(mu) , with iso-recursive types. F-<= is a well-known polymorphic calculus with bounded quantification. In F-<=(mu) we add iso-recursive types, and correspondingly extend the subtyping relation with iso-recursive subtyping using the recently proposed nominal unfolding rules. We also add two smaller extensions to F-<=. The first one is a generalization of the kernel F-<= rule for bounded quantification that accepts equivalent rather than equal bounds. The second extension is the use of so-called structural folding/unfolding rules, inspired by the structural unfolding rule proposed by Abadi, Cardelli, and Viswanathan [1996]. The structural rules add expressive power to the more conventional folding/unfolding rules in the literature, and they enable additional applications. We present several results, including: type soundness; transitivity and decidability of subtyping; the conservativity of F-<=(mu) over F-<= and a sound and complete algorithmic formulation of F-<=(mu). Moreover, we study an extension of F-<=(mu), called F-<=>=(mu) which includes lower bounded quantification in addition to the conventional (upper) bounded quantification of F-<=. All the results in this paper have been formalized in the Coq theorem prover.
引用
收藏
页码:1396 / 1425
页数:30
相关论文
共 50 条
  • [21] Endomorphisms of the group of all recursive permutations
    Morozov A.S.
    Algebra and Logic, 1997, 36 (1) : 33 - 45
  • [22] The Merits of Subtyping Obesity One Size Does Not Fit All
    Field, Alison E.
    Camargo, Carlos A., Jr.
    Ogino, Shuji
    JAMA-JOURNAL OF THE AMERICAN MEDICAL ASSOCIATION, 2013, 310 (20): : 2147 - 2148
  • [23] Simultaneously subtyping of all influenza A viruses using DNA microarrays
    Han Xueqing
    Lin Xiangmei
    Liu Bohua
    Hou Yihong
    Huang Jinhai
    Wu Shaoqiang
    Liu Jian
    Mei Lin
    Jia Guangle
    Zhu Qingyu
    JOURNAL OF VIROLOGICAL METHODS, 2008, 152 (1-2) : 117 - 121
  • [24] Molecular subtyping of adult pre-B ALL.
    Gleissner, B
    Rieder, H
    Schwartz, S
    Bartram, CR
    Goekbuget, N
    Hoelzer, D
    Thiel, E
    BLOOD, 2001, 98 (11) : 313A - 313A
  • [25] RECURSIVE GENERATION OF ALL PARTITIONS OF A FINITE QUANTITY
    LUNEBURG, H
    ABHANDLUNGEN AUS DEM MATHEMATISCHEN SEMINAR DER UNIVERSITAT HAMBURG, 1983, 53 : 134 - 145
  • [27] CPO-MODELS FOR 2ND-ORDER LAMBDA-CALCULUS WITH RECURSIVE TYPES AND SUBTYPING
    POLL, E
    HEMERIK, C
    TENEIKELDER, HMM
    RAIRO-INFORMATIQUE THEORIQUE ET APPLICATIONS-THEORETICAL INFORMATICS AND APPLICATIONS, 1993, 27 (03): : 221 - 260
  • [28] Recursive Online Enumeration of All Minimal Unsatisfiable Subsets
    Bendik, Jaroslav
    Cerna, Ivana
    Benes, Nikola
    AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS (ATVA 2018), 2018, 11138 : 143 - 159
  • [29] Recursive diagonalization of quantum Hamiltonians to all orders in h
    Gosselin, Pierre
    Hanssen, Jocelyn
    Mohrbach, Herve
    PHYSICAL REVIEW D, 2008, 77 (08):
  • [30] New Recursive Circular Algorithm for Listing All Permutations
    Karim, Sharmila
    Omar, Zurni
    Ibrahim, Haslinda
    Othman, Khairil Iskandar
    Suleiman, Mohamed
    PERTANIKA JOURNAL OF SCIENCE AND TECHNOLOGY, 2014, 22 (01): : 25 - 33