Polymorphic Type Inference for Dynamic Languages
Giuseppe Castagna, Mickaël Laurent, Kim Nguyen
摘要
We present a type system that combines, in a controlled way, first-order polymorphism with intersection types, union types, and subtyping, and prove its safety. We then define a type reconstruction algorithm that is sound and terminating. This yields a system in which unannotated functions are given polymorphic types (thanks to Hindley-Milner) that can express the overloaded behavior of the functions they type (thanks to the intersection introduction rule) and that are deduced by applying advanced techniques of type narrowing (thanks to the union elimination rule). This makes the system a prime candidate to type dynamic languages.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Implementing Set-Theoretic Types 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
- Implementing Set-Theoretic Types 引用了 Type Inference for Functional and Imperative Dynamic Languages
- Implementing Set-Theoretic Types 引用了 Polymorphic Records for Dynamic Languages
- Bidirectional Higher-Rank Polymorphism with Intersection and Union Types 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
- Bidirectional Higher-Rank Polymorphism with Intersection and Union Types 引用了 A Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F⋈
- Type Inference for Functional and Imperative Dynamic Languages 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
- A Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F⋈ 引用了 On type-cases, union elimination, and occurrence typing
- Polymorphic Records for Dynamic Languages 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
引用它的顶会 Paper4
- Bidirectional Higher-Rank Polymorphism with Intersection and Union TypesShengyi Jiang, Chen Cui, Bruno C. d. S. OliveiraPOPL 2025 · 2 次引用
- Polymorphic Records for Dynamic LanguagesGiuseppe Castagna, Loïc PeyrotOOPSLA 2025 · 2 次引用
- Implementing Set-Theoretic TypesMickaël Laurent, Kim NguyễnOOPSLA 2026 · 1 次引用
- Type Inference for Functional and Imperative Dynamic LanguagesMickaël Laurent, Jan VitekOOPSLA 2026 · 1 次引用
它引用的 Paper3
- MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 31 次引用
- On type-cases, union elimination, and occurrence typingGiuseppe Castagna, Mickaël Laurent, Kim Nguyen, Matthew LutzePOPL 2022 · 13 次引用
- A Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F⋈Nick Rioux, Xuejing Huang, Bruno C. d. S. Oliveira, Steve ZdancewicPOPL 2023 · 10 次引用
相关 Paper
- Resolution as intersection subtyping via Modus PonensKoar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios KarachaliasOOPSLA 2020 · 5 次引用
- The Logic of Intersection SubtypingOlivier LaurentLICS 2026
- Intensional datatype refinement: with application to scalable verification of pattern-match safetyEddie Jones, Steven J. RamsayPOPL 2021 · 3 次引用
- FreezeML: complete and easy type inference for first-class polymorphismFrank Emrich, Sam Lindley, Jan Stolarek, James Cheney 等PLDI 2020 · 13 次引用
- When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 13 次引用
