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 条
  • [41] Isomorphism of intersection and union types
    Coppo, Mario
    Dezani-Ciancaglini, Mariangiola
    Margaria, Ines
    Zacchi, Maddalena
    MATHEMATICAL STRUCTURES IN COMPUTER SCIENCE, 2017, 27 (05) : 603 - 625
  • [42] EMBEDDINGS EXTENDING VARIOUS TYPES OF DISJOINT SETS
    AULL, CE
    ROCKY MOUNTAIN JOURNAL OF MATHEMATICS, 1984, 14 (02) : 319 - 330
  • [43] Judgmental subtyping systems with intersection types and modal types
    Seo, Jeongbong
    Park, Sungwoo
    ACTA INFORMATICA, 2013, 50 (7-8) : 359 - 380
  • [44] Judgmental subtyping systems with intersection types and modal types
    Jeongbong Seo
    Sungwoo Park
    Acta Informatica, 2013, 50 : 359 - 380
  • [45] The triangle intersection numbers of a pair of disjoint S(2, 4, ν)s
    Chang, Yanxun
    Feng, Tao
    Lo Faro, Giovanni
    Tripodi, Antoinette
    DISCRETE MATHEMATICS, 2010, 310 (21) : 3007 - 3017
  • [46] RECOGNITION ALGORITHM FOR INTERSECTION GRAPHS OF EDGE-DISJOINT PATHS IN A TREE
    PANDA, BS
    MOHANTY, SP
    INFORMATION PROCESSING LETTERS, 1994, 49 (03) : 139 - 143
  • [47] The intersection problem for disjoint 2-flowers in Steiner triple systems
    McCourt, Thomas
    Journal of Combinatorial Mathematics and Combinatorial Computing, 2010, 75 : 41 - 63
  • [48] Intersection, Universally Quantified, and Reference Types
    Dezani-Ciancaglini, Mariangiola
    Giannini, Paola
    Della Rocca, Simona Ronchi
    COMPUTER SCIENCE LOGIC, PROCEEDINGS, 2009, 5771 : 209 - +
  • [49] On Intersection Types and Probabilistic Lambda Calculi
    Breuvart, Flavien
    Dal Lago, Ugo
    PPDP'18: PROCEEDINGS OF THE 20TH INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING, 2018,
  • [50] INTERSECTION TYPES FOR lambda(Gtz)-CALCULUS
    Ghilezan, Silvia
    Ivetic, Jelena
    PUBLICATIONS DE L INSTITUT MATHEMATIQUE-BEOGRAD, 2007, 82 (96): : 85 - 91