Lune

POPL2026顶会

Local Contextual Type Inference

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

摘要

Type inference is essential for programming languages, yet complete and global inference quickly becomes undecidable in the presence of rich type systems like System F. Pierce and Turner proposed local type inference (LTI) as a scalable, partially annotated alternative by relying on information local to applications. While LTI has been widely adopted in practice, there are significant gaps between theory and practice, with its theory being underdeveloped and specifications for LTI being complex and restrictive. We propose Local Contextual Type Inference , a principled redesign of LTI grounded in contextual typing—a recent formalism which captures type information flow. We present Contextual System F ( F c ), a variant of System F with implicit and first-class polymorphism. We formalize F c using a declarative type system, prove soundness, completeness, and decidability, and introduce matching subtyping as a bridge between declarative and algorithmic inference. This work offers the first mechanized treatment of LTI, while at the same time removing important practical restrictions and also demonstrating the power of contextual typing in designing robust, extensible and simple to implement type inference algorithms.

问 Lune

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

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

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Bidirectional Higher-Rank Polymorphism with Intersection and Union Types 引用了 Greedy Implicit Bounded Quantification
  • Bidirectional Higher-Rank Polymorphism with Intersection and Union Types 引用了 When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism
  • Bidirectional Higher-Rank Polymorphism with Intersection and Union Types 引用了 FreezeML: complete and easy type inference for first-class polymorphism
  • When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism 引用了 Greedy Implicit Bounded Quantification
  • When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism 引用了 FreezeML: complete and easy type inference for first-class polymorphism
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper4

  1. When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 13 次引用
  2. FreezeML: complete and easy type inference for first-class polymorphismFrank Emrich, Sam Lindley, Jan Stolarek, James Cheney 等PLDI 2020 · 13 次引用
  3. Greedy Implicit Bounded QuantificationChen Cui, Shengyi Jiang, Bruno C. d. S. OliveiraOOPSLA 2023 · 9 次引用
  4. Bidirectional Higher-Rank Polymorphism with Intersection and Union TypesShengyi Jiang, Chen Cui, Bruno C. d. S. OliveiraPOPL 2025 · 2 次引用

相关 Paper

  1. Data flow refinement type inferenceZvonimir Pavlinovic, Yusen Su, Thomas WiesPOPL 2021 · 15 次引用
  2. Type-level programming with match typesOlivier Blanvillain, Jonathan Immanuel Brachthäuser, Maxime Kjaer, Martin OderskyPOPL 2022 · 10 次引用
  3. The Undecidability of System F Typability and Type Checking for ReductionistsAndrej DudenhefnerLICS 2021 · 1 次引用
  4. Polymorphic types and effects with Boolean unificationMagnus Madsen, Jaco van de PolOOPSLA 2020 · 18 次引用
  5. Polymorphic Type Inference for Dynamic LanguagesGiuseppe Castagna, Mickaël Laurent, Kim NguyenPOPL 2024 · 12 次引用
黄昏的海面,两侧是细线勾勒的悬崖