Programmers have come to embrace dynamically typed languages for prototyping and delivering large and complex systems. When it comes to maintaining and evolving these systems, the lack of explicit static typing becomes a bottleneck. In response, researchers have explored the idea of gradually typed programming languages which allow the post-hoc addition of type annotations to software written in one of these “untyped” languages. Some of these new hybrid languages insert run-time checks at the boundary between typed and untyped code to establish type soundness for the overall system. With sound gradual typing programmers can rely on the language implementation to provide meaningful error messages when “untyped” code misbehaves.
While most research on sound gradual typing has remained theoretical, the few emerging implementations incur performance overheads due to these checks. Indeed, none of the publications on this topic come with a comprehensive performance evaluation; a few report disastrous numbers on toy benchmarks. In response, this paper proposes a methodology for evaluating the performance of gradually typed programming languages. The key is to explore the performance impact of adding type annotations to different parts of a software system. The methodology takes takes the idea of a gradual conversion from untyped to typed seriously and calls for measuring the performance of all possible conversions of a given untyped benchmark. Finally the paper validates the proposed methodology using Typed Racket, a mature implementation of sound gradual typing, and a suite of real-world programs of various sizes and complexities. Based on the results obtained in this study, the paper concludes that, given the state of current implementation technologies, sound gradual typing is dead. Conversely, it raises the question of how implementations could reduce the overheads associated with ensuring soundness and how tools could be used to steer programmers clear from pathological cases.
Poster: Performance Evaluation for Gradual Typing (gtposter.pdf) | 1.29MiB |
Thu 21 JanDisplayed time zone: Guadalajara, Mexico City, Monterrey change
14:20 - 16:00 | Track 2: Types, Generally or GraduallyResearch Papers at Grand Bay South Chair(s): Tiark Rompf Purdue & Oracle Labs | ||
14:20 25mTalk | Principal Type Inference for GADTs Research Papers Media Attached | ||
14:45 25mTalk | Abstracting Gradual Typing Research Papers Ronald Garcia University of British Columbia, Alison M. Clark , Éric Tanter University of Chile, Chile Link to publication Media Attached | ||
15:10 25mTalk | The Gradualizer: a methodology and algorithm for generating gradual type systems Research Papers Media Attached | ||
15:35 25mTalk | Is Sound Gradual Typing Dead? Research Papers Asumu Takikawa Northeastern University, Daniel Feltey Northeastern University, Ben Greenman Northeastern University, Max S. New , Jan Vitek Northeastern University, Matthias Felleisen Northeastern University Pre-print Media Attached File Attached |