Abstracting Gradual Typing

被引:0
|
作者
Garcia R. [1 ]
Clark A.M. [1 ]
Tanter E. [2 ]
机构
[1] Software Practices Lab., Department of Computer Science, University of British Columbia
[2] PLEIAD Laboratory, Computer Science Department (DCC), University of Chile
来源
ACM SIGPLAN Notices | 2016年 / 51卷 / 01期
基金
加拿大自然科学与工程研究理事会;
关键词
Abstract interpretation; Gradual typing; Subtyping;
D O I
10.1145/2837614.2837670
中图分类号
学科分类号
摘要
Language researchers and designers have extended a wide variety of type systems to support gradual typing, which enables languages to seamlessly combine dynamic and static checking. These efforts consistently demonstrate that designing a satisfactory gradual counterpart to a static type system is challenging, and this challenge only increases with the sophistication of the type system. Gradual type system designers need more formal tools to help them conceptualize, structure, and evaluate their designs. In this paper, we propose a new formal foundation for gradual typing, drawing on principles from abstract interpretation to give gradual types a semantics in terms of pre-existing static types. Abstracting Gradual Typing (AGT for short) yields a formal account of consistency-one of the cornerstones of the gradual typing approach-that subsumes existing notions of consistency, which were developed through intuition and ad hoc reasoning. Given a syntax-directed static typing judgment, the AGT approach induces a corresponding gradual typing judgment. Then the type safety proof for the underlying static discipline induces a dynamic semantics for gradual programs defined over sourcelanguage typing derivations. The AGT approach does not resort to an externally justified cast calculus: instead, run-time checks naturally arise by deducing evidence for consistent judgments during proof reduction. To illustrate the approach, we develop a novel gradually-typed counterpart for a language with record subtyping. Gradual languages designed with the AGT approach satisfy by construction the refined criteria for gradual typing set forth by Siek and colleagues. © 2016 ACM.
引用
收藏
页码:429 / 442
页数:13
相关论文
共 50 条
  • [1] Abstracting Gradual Typing
    Garcia, Ronald
    Clark, Alison M.
    Tanter, Eric
    ACM SIGPLAN NOTICES, 2016, 51 (01) : 429 - 442
  • [2] Abstracting Gradual Typing Moving Forward: Precise and Space-Efficient
    Schwerter, Felipe Banados
    Clark, Alison M.
    Jafery, Khurram A.
    Garcia, Ronald
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2021, 5 (POPL):
  • [3] Abstracting gradual references
    Toro, Matias
    Tanter, Eric
    SCIENCE OF COMPUTER PROGRAMMING, 2020, 197
  • [4] Merging Gradual Typing
    Ye, Wenjia
    Oliveira, Bruno C.D.S.
    Toro, Matías
    Proceedings of the ACM on Programming Languages, 2024, 8 (OOPSLA2)
  • [5] Confined Gradual Typing
    Allende, Esteban
    Fabry, Johan
    Garcia, Ronald
    Tanter, Eric
    ACM SIGPLAN NOTICES, 2014, 49 (10) : 251 - 270
  • [6] Gradual typing for generics
    Graduate School of Informatics, Kyoto University, Japan
    ACM SIGPLAN Not., 10 (609-624):
  • [7] 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
  • [8] Gradual typing for Smalltalk
    Allende, Esteban
    Callau, Oscar
    Fabry, Johan
    Tanter, Eric
    Denker, Marcus
    SCIENCE OF COMPUTER PROGRAMMING, 2014, 96 : 52 - 69
  • [9] 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
  • [10] Gradual Typing for Generics
    Ina, Lintaro
    Igarashi, Atsushi
    ACM SIGPLAN NOTICES, 2011, 46 (10) : 609 - 624