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 条
  • [1] Disjoint Intersection Types
    Oliveira, Bruno C. d. S.
    Shi, Zhiyuan
    Alpuim, Joao
    [J]. ACM SIGPLAN NOTICES, 2016, 51 (09) : 364 - 377
  • [2] INTERSECTION GRAPHS OF VERTEX DISJOINT PATHS IN A TREE
    PANDA, BS
    MOHANTY, SP
    [J]. DISCRETE MATHEMATICS, 1995, 146 (1-3) : 179 - 209
  • [3] Disjoint pairs in set systems with restricted intersection
    Girao, Antonio
    Snyder, Richard
    [J]. EUROPEAN JOURNAL OF COMBINATORICS, 2020, 83
  • [4] Intersection reporting on two collections of disjoint sets
    Gaibisso, C
    Nardelli, E
    Proietti, G
    [J]. INFORMATION SCIENCES, 1999, 114 (1-4) : 41 - 52
  • [5] Session Types = Intersection Types
    Padovani, Luca
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2011, (45): : 71 - 89
  • [6] Disjoint, partition and intersection constraints for set and multiset variables
    Bessiere, C
    Hebrard, E
    Hnich, B
    Walsh, T
    [J]. PRINCIPLES AND PRACTICE OF CONSTRAINT PROGRAMMING - CP 2004, PROCEEDINGS, 2004, 3258 : 138 - 152
  • [7] Vertex Disjoint Cycles in Intersection Graphs of Bases of Matroids
    ZHANG Yinghao
    CHI Hongmei
    [J]. Wuhan University Journal of Natural Sciences, 2017, 22 (06) : 461 - 464
  • [8] INTERSECTION AND UNION TYPES
    BARBANERA, F
    DEZANICIANCAGLINI, M
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1991, 526 : 651 - 674
  • [9] Intersection Types and Counting
    Parys, Pawel
    [J]. ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2017, (242): : 48 - 63
  • [10] On Isomorphisms of Intersection Types
    Dezani-Ciancaglini, Mariangiola
    Di Cosmo, Roberto
    Giovannetti, Elio
    Tatsuta, Makoto
    [J]. ACM TRANSACTIONS ON COMPUTATIONAL LOGIC, 2010, 11 (04) : 1 - 24