Compiling Gradual Types with Evidence
Jos\'e Luis Romero, Crist\'obal Isla, Mat\'ias Toro, \'Eric Tanter

TL;DR
This paper introduces GrEv, an evidence-based compiler for gradual typing that is competitive with coercion-based approaches, demonstrating improved stability and efficiency in supporting sound gradual typing with structural types.
Contribution
It presents the design, implementation, and evaluation of GrEv, an evidence-based gradual typing compiler, bridging formal semantics with practical performance and exploring novel monotonic semantics.
Findings
GrEv performs competitively with coercion-based compilers.
Evidence-based approach shows more stability across configurations.
GrEv can be faster than existing coercion-based implementations.
Abstract
Efficiently supporting sound gradual typing in a language with structural types is challenging. To date, the Grift compiler is the only close-to-the-metal implementation of gradual typing in this setting, exploiting coercions for runtime checks, and further extended with monotonic references for efficient access to statically-typed data structures. On the language design and semantics side, the Abstracting Gradual Typing (AGT) methodology has proven fruitful to elucidate existing designs and to innovate by deriving gradualizations of a wide variety of typing disciplines and language features. Grounded in abstract interpretation, the Curry-Howard inspired runtime semantics of AGT is based on the notion of evidence for consistent judgments that evolve during reduction, monitoring the plausibility of well-typedness. While expressive and versatile, it is unclear whether such evidence-based…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Model-Driven Software Engineering Techniques · Embedded Systems Design Techniques
