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 条
  • [31] Recursive all-lag reference-code correlators
    Ng, TS
    Yip, KW
    Cheng, CL
    IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS II-EXPRESS BRIEFS, 2000, 47 (12) : 1542 - 1547
  • [32] A Non-recursive Algorithm for Solving All Attribute Reductions
    Qian, Aizeng
    INTERNATIONAL JOINT CONFERENCE ON COMPUTATIONAL SCIENCES AND OPTIMIZATION, VOL 1, PROCEEDINGS, 2009, : 560 - 563
  • [33] Exact, approximate, and recursive blocking in all-optical networks
    Leith, C
    Takahara, G
    Mansourati, Z
    GLOBECOM'99: SEAMLESS INTERCONNECTION FOR UNIVERSAL SERVICES, VOL 1-5, 1999, : 1460 - 1465
  • [34] Subtyping Social Determinants of Health in the "All of Us" Program: Network Analysis and Visualization Study
    Bhavnani, Suresh K.
    Zhang, Weibin
    Bao, Daniel
    Raji, Mukaila
    Ajewole, Veronica
    Hunter, Rodney
    Kuo, Yong-Fang
    Schmidt, Susanne
    Pappadis, Monique R.
    Smith, Elise
    Bokov, Alex
    Reistetter, Timothy
    Visweswaran, Shyam
    Downer, Brian
    JOURNAL OF MEDICAL INTERNET RESEARCH, 2025, 27
  • [35] Diagnostic subtyping of obsessive-compulsive disorder: Have we got it all wrong?
    Brakoulias, Vlasios
    AUSTRALIAN AND NEW ZEALAND JOURNAL OF PSYCHIATRY, 2013, 47 (01): : 23 - 25
  • [36] All-Terminal Network Reliability Using Recursive Truncation Algorithm
    Sharafat, Ahmad R.
    Ma'rouzi, Omid R.
    IEEE TRANSACTIONS ON RELIABILITY, 2009, 58 (02) : 338 - 347
  • [37] Mastrovito Form of Non-Recursive Karatsuba Multiplier for All Trinomials
    Li, Yin
    Ma, Xingpo
    Zhang, Yu
    Qi, Chuanda
    IEEE TRANSACTIONS ON COMPUTERS, 2017, 66 (09) : 1573 - 1584
  • [38] Study of the Subtyping Machine of Nominal Subtyping with Variance
    Roth, Ori
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2021, 5 (OOPSLA):
  • [39] All-Pole Recursive Digital Filters Design Based on Ultraspherical Polynomials
    Stojanovic, Nikola
    Stamenkovic, Negovan
    Stojanovic, Vidosav
    RADIOENGINEERING, 2014, 23 (03) : 949 - 953
  • [40] Constructor subtyping
    Barthe, G
    Frade, MJ
    PROGRAMMING LANGUAGES AND SYSTEMS, 1999, 1576 : 109 - 127