Type Inference for Functional and Imperative Dynamic Languages
Mickaël Laurent, Jan Vitek
Abstract
In this paper, we formalize a type system based on set-theoretic types for dynamic languages that support both functional and imperative programming paradigms. We adapt prior work in the typing of overloaded and generic functions to support an impure λ -calculus, focusing on imperative features commonly found in dynamic languages such as JavaScript, Python, and Julia. We introduce a general notion of parametric opaque data types using set-theoretic types, enabling precise modeling of mutable data structures while promoting modularity, clarity, and readability. Finally, we compare our approach to existing work and evaluate our prototype implementation on a range of examples.
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 36c0d02f-9a98-4367-9e83-0fcb5f163938Cited by top-tier papers1
Ask how each one uses itBuilds on3
- MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 31 citations
- When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 13 citations
- Polymorphic Type Inference for Dynamic LanguagesGiuseppe Castagna, Mickaël Laurent, Kim NguyenPOPL 2024 · 12 citations
Related papers
- Gradually structured dataStefan Malewski, Michael Greenberg, Éric TanterOOPSLA 2021 · 4 citations
- Polymorphic Records for Dynamic LanguagesGiuseppe Castagna, Loïc PeyrotOOPSLA 2025 · 2 citations
- Taype: A Policy-Agnostic Language for Oblivious ComputationQianchuan Ye, Benjamin DelawarePLDI 2023 · 3 citations
- Transitioning from structural to nominal code with efficient gradual typingFabian Muehlboeck, Ross TateOOPSLA 2021 · 8 citations
- Graduality and parametricity: together again for the first timeMax S. New, Dustin Jamner, Amal AhmedPOPL 2020 · 36 citations
