Lune

POPL2025顶会

Bidirectional Higher-Rank Polymorphism with Intersection and Union Types

Shengyi Jiang, Chen Cui, Bruno C. d. S. Oliveira

摘要

Modern mainstream programming languages, such as TypeScript, Flow, and Scala, have polymorphic type systems enriched with intersection and union types. These languages implement variants of bidirectional higher-rank polymorphic type inference, which was previously studied mostly in the context of functional programming. However, existing type inference implementations lack solid theoretical foundations when dealing with non-structural subtyping and intersection and union types, which were not studied before.

In this paper, we study bidirectional higher-rank polymorphic type inference with explicit type applications, and intersection and union types and demonstrate that these features have non-trivial interactions. We first present a type system, described by a bidirectional specification, with good theoretical properties and a sound, complete, and decidable algorithm. This is helpful to identify a class of types that can always be inferred. We also explore variants incorporating practical features, such as handling records and inferring a larger class of types, which align better with real-world implementations. Though some variants no longer have a complete algorithm, they still enhance the expressiveness of the type system. To ensure rigor, all results are formalized in the Coq proof assistant.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Polymorphic Type Inference for Dynamic Languages 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
  • Polymorphic Type Inference for Dynamic Languages 引用了 A Bowtie for a Beast: Overloading, Eta Expansion, and Extensible Data Types in F⋈
  • Local Contextual Type Inference 引用了 When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism
  • Local Contextual Type Inference 引用了 FreezeML: complete and easy type inference for first-class polymorphism
  • When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
  • When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism 引用了 FreezeML: complete and easy type inference for first-class polymorphism
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper1

  1. Local Contextual Type InferenceXu Xue, Chen Cui, Shengyi Jiang, Bruno C. d. S. OliveiraPOPL 2026

它引用的 Paper6

  1. MLstruct: principal type inference in a Boolean algebra of structural typesLionel Parreaux, Chun Yin ChauOOPSLA 2022 · 31 次引用
  2. When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 13 次引用
  3. FreezeML: complete and easy type inference for first-class polymorphismFrank Emrich, Sam Lindley, Jan Stolarek, James Cheney 等PLDI 2020 · 13 次引用
  4. Polymorphic Type Inference for Dynamic LanguagesGiuseppe Castagna, Mickaël Laurent, Kim NguyenPOPL 2024 · 12 次引用
  5. 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

  1. Greedy Implicit Bounded QuantificationChen Cui, Shengyi Jiang, Bruno C. d. S. OliveiraOOPSLA 2023 · 9 次引用
  2. The Simple Essence of Boolean-Algebraic Subtyping: Semantic Soundness for Algebraic Union, Intersection, Negation, and Equi-recursive TypesChun Yin Chau, Lionel ParreauxPOPL 2026 · 4 次引用
  3. Resolution as intersection subtyping via Modus PonensKoar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios KarachaliasOOPSLA 2020 · 5 次引用
  4. A case for DOT: theoretical foundations for objects with pattern matching and GADT-style reasoningAleksander Boruch-Gruszecki, Radoslaw Wasko, Yichen Xu, Lionel ParreauxOOPSLA 2022 · 4 次引用
  5. Merging Gradual TypingWenjia Ye, Bruno C. d. S. Oliveira, Matías ToroOOPSLA 2024 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖