MLstruct: principal type inference in a Boolean algebra of structural types
Lionel Parreaux, Chun Yin Chau
摘要
Intersection and union types are becoming more popular by the day, entering the mainstream in programming languages like TypeScript and Scala 3. Yet, no language so far has managed to combine these powerful types with principal polymorphic type inference. We present a solution to this problem in MLstruct, a language with subtyped records, equirecursive types, first-class unions and intersections, class-based instance matching, and ML-style principal type inference. While MLstruct is mostly structurally typed, it contains a healthy sprinkle of nominality for classes, which gives it desirable semantics, enabling the expression of a powerful form of extensible variants that does not need row variables. Technically, we define the constructs of our language using conjunction, disjunction, and negation connectives, making sure they form a Boolean algebra, and we show that the addition of a few nonstandard but sound subtyping rules gives us enough structure to derive a sound and complete type inference algorithm. With this work, we hope to foster the development of better type inference for present and future programming languages with expressive subtyping systems.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
引用它的顶会 Paper16
- When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 被引用 13 次
- Polymorphic Type Inference for Dynamic LanguagesGiuseppe Castagna, Mickaël Laurent, Kim NguyenPOPL 2024 · 被引用 12 次
- Getting into the Flow: Towards Better Type Error Messages for Constraint-Based Type InferenceIshan Bhanuka, Lionel Parreaux, David Binder, Jonathan Immanuel BrachthäuserOOPSLA 2023 · 被引用 12 次
- Greedy Implicit Bounded QuantificationChen Cui, Shengyi Jiang, Bruno C. d. S. OliveiraOOPSLA 2023 · 被引用 9 次
- A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype InferenceCunyuan Gao, Lionel ParreauxOOPSLA 2025 · 被引用 4 次
相关 Paper
- The Simple Essence of Boolean-Algebraic Subtyping: Semantic Soundness for Algebraic Union, Intersection, Negation, and Equi-recursive TypesChun Yin Chau, Lionel ParreauxPOPL 2026 · 被引用 4 次
- Bidirectional Higher-Rank Polymorphism with Intersection and Union TypesShengyi Jiang, Chen Cui, Bruno C. d. S. OliveiraPOPL 2025 · 被引用 2 次
- Resolution as intersection subtyping via Modus PonensKoar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios KarachaliasOOPSLA 2020 · 被引用 5 次
- Revisiting Row Polymorphism for Set-Theoretic TypesMickaël Laurent, Pierre Donat-Bouillud, Filip Křikava, Jan VitekOOPSLA 2026
- First-Class Refinement Types for ScalaMatt Bovel, Viktor Kunčak, Martin OderskyOOPSLA 2026
