Abstracting gradual typing moving forward: precise and space-efficient
Felipe Bañados Schwerter, Alison M. Clark, Khurram A. Jafery, Ronald Garcia
Abstract
Abstracting Gradual Typing (AGT) is a systematic approach to designing gradually-typed languages. Languages developed using AGT automatically satisfy the formal semantic criteria for gradual languages identified by Siek et al. [2015]. Nonetheless, vanilla AGT semantics can still have important shortcomings. First, a gradual language's runtime checks should preserve the space-efficiency guarantees inherent to the underlying static and dynamic languages. To the contrary, the default operational semantics of AGT break proper tail calls. Second, a gradual language's runtime checks should enforce basic modular type-based invariants expected from the static type discipline. To the contrary, the default operational semantics of AGT may fail to enforce some invariants in surprising ways. We demonstrate this in the GTFL language of Garcia et al. [2016].
This paper addresses both problems at once by refining the theory underlying AGT's dynamic checks. Garcia et al. [2016] observe that AGT involves two abstractions of static types: one for the static semantics and one for the dynamic semantics. We recast the latter as an abstract interpretation of subtyping itself, while gradual types still abstract static types. Then we show how forward-completeness [Giacobazzi and Quintarelli 2001] is key to supporting both space-efficient execution and reliable runtime type enforcement.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext dabd230d-2f61-47c6-8397-2c7422b1ca9bCited by top-tier papers5
- Gradually structured dataStefan Malewski, Michael Greenberg, Éric TanterOOPSLA 2021 · 4 citations
- Merging Gradual TypingWenjia Ye, Bruno C. d. S. Oliveira, Matías ToroOOPSLA 2024 · 2 citations
- Space-Efficient Polymorphic Gradual Typing, Mostly ParametricAtsushi Igarashi, Shota Ozaki, Taro Sekiyama, Yudai TanabePLDI 2024 · 2 citations
- Gradually Typed Languages Should Be Vigilant!Olek Gierczak, Lucy Menon, Christos Dimoulas, Amal AhmedOOPSLA 2024 · 1 citation
- Flexible and Expressive Typed Path Patterns for GQLWenjia Ye, Matías Toro, Tomás Díaz, Bruno C. d. S. Oliveira et al.OOPSLA 2025 · 1 citation
Builds on1
Related papers
- Fully abstract from static to gradualKoen Jacobs, Amin Timany, Dominique DevriesePOPL 2021 · 14 citations
- Reconciling noninterference and gradual typingArthur Azevedo de Amorim, Matt Fredrikson, Limin JiaLICS 2020 · 12 citations
- Denotational Semantics of Gradual Typing using Synthetic Guarded Domain TheoryEric Giovannini, Tingting Ding, Max S. NewPOPL 2025 · 2 citations
- Gradual Typing for Effect HandlersMax S. New, Eric Giovannini, Daniel R. LicataOOPSLA 2023 · 3 citations
- Corpse reviver: sound and efficient gradual typing via contract verificationCameron Moy, Phuc C. Nguyen, Sam Tobin-Hochstadt, David Van HornPOPL 2021 · 16 citations
