Greedy Implicit Bounded Quantification
Chen Cui, Shengyi Jiang, Bruno C. d. S. Oliveira
摘要
Mainstream object-oriented programming languages such as Java, Scala, C#, or TypeScript have polymorphic type systems with subtyping and bounded quantification. Bounded quantification, despite being a pervasive and widely used feature, has attracted little research work on type-inference algorithms to support it. A notable exception is local type inference, which is the basis of most current implementations of type inference for mainstream languages. However, support for bounded quantification in local type inference has important restrictions, and its non-algorithmic specification is complex.
In this paper, we present a variant of kernel 𝐹 ≤ , which is the canonical calculus with bounded quantification, with implicit polymorphism. Our variant, called 𝐹 𝑏 ≤ , comes with a declarative and an algorithmic formulation of the type system. The declarative type system is based on previous work on bidirectional typing for predicative higher-rank polymorphism and a greedy approach to implicit instantiation. This allows for a clear declarative specification where programs require few type annotations and enables implicit polymorphism where applications omit type parameters. Just as local type inference, explicit type applications are also available in 𝐹 𝑏 ≤ if desired. This is useful to deal with impredicative instantiations, which would not be allowed otherwise in 𝐹 𝑏 ≤ . Due to the support for impredicative instantiations, we can obtain a completeness result with respect to kernel 𝐹 ≤ , showing that all the well-typed kernel 𝐹 ≤ programs can type-check in 𝐹 𝑏 ≤ . The corresponding algorithmic version of the type system is shown to be sound, complete, and decidable. All the results have been mechanically formalized in the Abella theorem prover.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype Inference 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
- A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype Inference 引用了 When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism
- 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 引用了 When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types 引用了 A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype Inference
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability Types 引用了 Recursive Subtyping for All
- When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class Polymorphism 引用了 MLstruct: principal type inference in a Boolean algebra of structural types
引用它的顶会 Paper6
- When Subtyping Constraints Liberate: A Novel Type Inference Approach for First-Class PolymorphismLionel Parreaux, Aleksander Boruch-Gruszecki, Andong Fan, Chun Yin ChauPOPL 2024 · 13 次引用
- A Lightweight Type-and-Effect System for Invalidation Safety: Tracking Permanent and Temporary Invalidation with Constraint-Based Subtype InferenceCunyuan Gao, Lionel ParreauxOOPSLA 2025 · 4 次引用
- Modal Effect TypesWenhao Tang, Leo White, Stephen Dolan, Daniel Hillerström 等OOPSLA 2025 · 4 次引用
- Bidirectional Higher-Rank Polymorphism with Intersection and Union TypesShengyi Jiang, Chen Cui, Bruno C. d. S. OliveiraPOPL 2025 · 2 次引用
- Escape with Your Self: Sound and Expressive Bidirectional Typing with Avoidance for Reachability TypesSonglin Jia, Guannan Wei, Siyuan He, Yuyan Bao 等PLDI 2026 · 1 次引用
它引用的 Paper2
相关 Paper
- Local Contextual Type InferenceXu Xue, Chen Cui, Shengyi Jiang, Bruno C. d. S. OliveiraPOPL 2026
- FreezeML: complete and easy type inference for first-class polymorphismFrank Emrich, Sam Lindley, Jan Stolarek, James Cheney 等PLDI 2020 · 13 次引用
- Resolution as intersection subtyping via Modus PonensKoar Marntirosian, Tom Schrijvers, Bruno C. d. S. Oliveira, Georgios KarachaliasOOPSLA 2020 · 5 次引用
- 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 次引用
- First-Class Refinement Types for ScalaMatt Bovel, Viktor Kunčak, Martin OderskyOOPSLA 2026
