Gradual typing with union and intersection types

被引:28
|
作者
Castagna G. [1 ]
Lanvin V. [2 ]
机构
[1] CNRS, Université Paris Diderot
来源
关键词
Gradual typing; Intersection types; Negation types; Set-theoretic types; Union types;
D O I
10.1145/3110285
中图分类号
学科分类号
摘要
We propose a type system for functional languages with gradual types and set-theoretic type connectives and prove its soundness. In particular, we show how to lift the definition of the domain and result type of an application from non-gradual types to gradual ones and likewise for the subtyping relation. We also show that deciding subtyping for gradual types can be reduced in linear time to deciding subtyping for non-gradual types and that the same holds true for all subtyping-related decision problems that must be solved for type inference. More generally, this work not only enriches gradual type systems with unions and intersections and with the type precision that arise from their use, but also proposes and advocates a new style of gradual types programming where union and intersection types are used by programmers to instruct the system to perform fewer dynamic checks. © 2017 Copyright held by the owner/author(s).
引用
收藏
相关论文
共 50 条
  • [1] Union and intersection types to support both dynamic and static typing
    Ortin, Francisco
    Garcia, Miguel
    INFORMATION PROCESSING LETTERS, 2011, 111 (06) : 278 - 286
  • [2] Gradual Typing Using Union Typing With Records
    Ramirez Pulido, Karla
    Luis Ortega-Arjona, Jorge
    Gonzalez Huesca, Lourdes del Carmen
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2020, 354 (354) : 171 - 186
  • [3] INTERSECTION AND UNION TYPES
    BARBANERA, F
    DEZANICIANCAGLINI, M
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 526 : 651 - 674
  • [4] A Gradual Interpretation of Union Types
    Toro, Matias
    Tanter, Eric
    STATIC ANALYSIS (SAS 2017), 2017, 10422 : 382 - 404
  • [5] Typing Classes and Mixins with Intersection Types
    Bessai, Jan
    Dudder, Boris
    Dudenhefner, Andrej
    Chen, Tzu-Chun
    de'Liguoro, Ugo
    ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2015, (177): : 79 - 93
  • [6] Elaborating Intersection and Union Types
    Dunfield, Joshua
    ACM SIGPLAN NOTICES, 2012, 47 (09) : 17 - 28
  • [7] Elaborating intersection and union types
    Dunfield, Joshua
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2014, 24 (2-3) : 133 - 165
  • [8] Intersection and Union Types for chi
    van Bakel, Steffen
    ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE, 2005, 136 : 203 - 227
  • [9] 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
  • [10] Type Inference for Rank 2 Gradual Intersection Types
    Angelo, Pedro
    Florido, Mario
    TRENDS IN FUNCTIONAL PROGRAMMING, TFP 2019, 2020, 12053 : 84 - 120