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 条
  • [31] Rewriting for Sound and Complete Union, Intersection and Negation Types
    Pearce, David J.
    ACM SIGPLAN NOTICES, 2017, 52 (12) : 117 - 130
  • [32] Merging Gradual Typing
    Ye, Wenjia
    Oliveira, Bruno C.D.S.
    Toro, Matías
    Proceedings of the ACM on Programming Languages, 2024, 8 (OOPSLA2)
  • [33] Confined Gradual Typing
    Allende, Esteban
    Fabry, Johan
    Garcia, Ronald
    Tanter, Eric
    ACM SIGPLAN NOTICES, 2014, 49 (10) : 251 - 270
  • [34] Abstracting Gradual Typing
    Garcia, Ronald
    Clark, Alison M.
    Tanter, Eric
    ACM SIGPLAN NOTICES, 2016, 51 (01) : 429 - 442
  • [35] Gradual typing for generics
    Graduate School of Informatics, Kyoto University, Japan
    ACM SIGPLAN Not., 10 (609-624):
  • [36] Gradual Typing for Generics
    Ina, Lintaro
    Igarashi, Atsushi
    OOPSLA 11: PROCEEDINGS OF THE 2011 ACM INTERNATIONAL CONFERENCE ON OBJECT ORIENTED PROGRAMMING SYSTEMS LANGUAGES AND APPLICATIONS, 2011, : 609 - 624
  • [37] Gradual typing for Smalltalk
    Allende, Esteban
    Callau, Oscar
    Fabry, Johan
    Tanter, Eric
    Denker, Marcus
    SCIENCE OF COMPUTER PROGRAMMING, 2014, 96 : 52 - 69
  • [38] Confined gradual typing
    Allende, Esteban
    Fabry, Johan
    Garcia, Ronald
    Tanter, Éric
    1600, Association for Computing Machinery, 2 Penn Plaza, Suite 701, New York, NY 10121-0701, United States (49): : 251 - 270
  • [39] Gradual Typing for Generics
    Ina, Lintaro
    Igarashi, Atsushi
    ACM SIGPLAN NOTICES, 2011, 46 (10) : 609 - 624
  • [40] Gradual typing for objects
    Siek, Jeremy
    Taha, Walid
    ECOOP 2007 - OBJECT-ORIENTED PROGRAMMING, PROCEEDINGS, 2007, 4609 : 2 - +