Disjoint intersection types

被引:0
|
作者
Oliveira B.C.D.S. [1 ]
Shi Z. [1 ]
Alpuim J. [1 ]
机构
[1] Oliveira, Bruno C. D. S.
[2] Shi, Zhiyuan
[3] Alpuim, João
来源
| 1600年 / Association for Computing Machinery, 2 Penn Plaza, Suite 701, New York, NY 10121-0701, United States卷 / 51期
关键词
Intersection Types; Type System;
D O I
10.1145/2951913.2951945
中图分类号
学科分类号
摘要
Dunfield showed that a simply typed core calculus with intersection types and a merge operator is able to capture various programming language features. While his calculus is type-safe, it is not coherent: different derivations for the same expression can elaborate to expressions that evaluate to different values. The lack of coherence is an important disadvantage for adoption of his core calculus in implementations of programming languages, as the semantics of the programming language becomes implementation-dependent. This paper presents λ-i: A coherent and type-safe calculus with a form of intersection types and a merge operator. Coherence is achieved by ensuring that intersection types are disjoint and programs are sufficiently annotated to avoid type ambiguity. We propose a definition of disjointness where two types A and B are disjoint only if certain set of types are common supertypes of A and B. We investigate three different variants of λ-i, with three variants of disjointness. In the simplest variant, which does not allow ĝŠ Currency sign types, two types are disjoint if they do not share any common supertypes at all. The other two variants introduce ĝŠ Currency sign types and refine the notion of disjointness to allow two types to be disjoint when the only the set of common supertypes are top-like. The difference between the two variants with ĝŠ Currency sign types is on the definition of top-like types, which has an impact on which types are allowed on intersections. We present a type system that prevents intersection types that are not disjoint, as well as an algorithmic specifications to determine whether two types are disjoint for all three variants. © 2016 ACM.
引用
下载
收藏
页码:364 / 377
页数:13
相关论文
共 50 条
  • [21] Intersection types and domain operators
    Alessi, F
    Dezani-Ciancaglini, M
    Lusin, S
    THEORETICAL COMPUTER SCIENCE, 2004, 316 (1-3) : 25 - 47
  • [22] Elaborating Intersection and Union Types
    Dunfield, Joshua
    ACM SIGPLAN NOTICES, 2012, 47 (09) : 17 - 28
  • [23] Manifest Contracts with Intersection Types
    Nishida, Yuki
    Igarashi, Atsushi
    PROGRAMMING LANGUAGES AND SYSTEMS, APLAS 2019, 2019, 11893 : 33 - 52
  • [24] Intersection and Union Types for chi
    van Bakel, Steffen
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 136 : 203 - 227
  • [25] Intersection types and lambda models
    Alessi, F
    Barbanera, F
    Dezani-Ciancaglini, M
    THEORETICAL COMPUTER SCIENCE, 2006, 355 (02) : 108 - 126
  • [26] Polyadic Approximations and Intersection Types
    Pellissier, Luc
    Vial, Pierre
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2019, (293):
  • [27] THE COHERENCE OF LANGUAGES WITH INTERSECTION TYPES
    REYNOLDS, JC
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 526 : 675 - 700
  • [28] Subtyping and Intersection Types Revisited
    Pfenning, Frank
    ICFP'07 PROCEEDINGS OF THE 2007 ACM SIGPLAN INTERNATIONAL CONFERENCE ON FUNCTIONAL PROGRAMMING, 2007, : 219 - 219
  • [29] Intersection Types and Termination Properties
    Koletsos, George
    FUNDAMENTA INFORMATICAE, 2012, 121 (1-4) : 185 - 202
  • [30] Monadic Intersection Types, Relationally
    Gavazzo, Francesco
    Treglia, Riccardo
    Vanoni, Gabriele
    PROGRAMMING LANGUAGES AND SYSTEMS, PT I, ESOP 2024, 2024, 14576 : 22 - 51