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 条
  • [21] Empowering Union and Intersection Types with Integrated Subtyping
    Muehlboeck, Fabian
    Tate, Ross
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [22] Strong Normalization in the π-calculus with Intersection and Union Types
    Piccolo, Mauro
    FUNDAMENTA INFORMATICAE, 2012, 121 (1-4) : 227 - 252
  • [23] A Decidable Subtyping Logic for Intersection and Union Types
    Liquori, Luigi
    Stolze, Claude
    TOPICS IN THEORETICAL COMPUTER SCIENCE, TTCS 2017, 2017, 10608 : 74 - 90
  • [24] Towards a Logical Framework with Intersection and Union Types
    Stolze, Claude
    Liquori, Luigi
    Honsell, Furio
    Scagnetto, Ivan
    PROCEEDINGS OF THE WORKSHOP ON LOGICAL FRAMEWORKS AND META-LANGUAGES: THEORY AND PRACTICE (LFMTP), 2017, : 1 - 9
  • [25] Empowering Union and Intersection Types with Integrated Subtyping
    Muehlboeck, Fabian
    Tate, Ross
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
  • [26] SINGLETON, UNION AND INTERSECTION TYPES FOR PROGRAM EXTRACTION
    HAYASHI, S
    LECTURE NOTES IN COMPUTER SCIENCE, 1991, 526 : 701 - 730
  • [27] Logic and Computation in a Lambda Calculus with Intersection and Union Types
    Dougherty, Daniel J.
    Liquori, Luigi
    LOGIC FOR PROGRAMMING, ARTIFICIAL INTELLIGENCE, AND REASONING (LPAR-16), 2010, 6355 : 173 - 191
  • [28] From polyvariant flow information to intersection and union types
    Palsberg, J
    Pavlopoulou, C
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2001, 11 : 263 - 317
  • [29] Rewriting for Sound and Complete Union, Intersection and Negation Types
    Pearce, David J.
    PROCEEDINGS OF THE 16TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON GENERATIVE PROGRAMMING: CONCEPTS AND EXPERIENCES (GPCE'17), 2017, : 117 - 130
  • [30] The Root Cause of Blame: Contracts for Intersection and Union Types
    Williams, Jack
    Morris, J. Garrett
    Wadler, Philip
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2