paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Simple Essence of Overloading: Making Ad-Hoc Polymorphism More Algebraic with Flow-Based Variational Type-Checking

重载的简单本质:通过基于流的变分类型检查使特设多态更具代数性
OOPSLA 9(OOPSLA2)2025匹配度 2/10 · 该论文属于类型系统与重载消解的纯PL理论研究,未涉及LLM/Agent、机器学习系统静态分析、浮点程序分析或贝叶斯程序分析,与用户研究方向的核心交叉点无关。引用 0 inbox
Jiří Beneš, Jonathan Immanuel Brachthäuser
crossref: 2026-09-10

AI 速览

一句话:提出基于流的变分类型检查框架,将重载视为选择,统一约束收集、求解与重载消解。

重载消解依靠类型导向,让程序员复用同名标识符并把歧义交给类型检查器。但许多语言在类型检查中回溯以处理重载,这使其常被视为与 Hindley-Milner 风格类型系统不兼容。本文结合变分类型检查与代数子类型,提出基于流的变分框架,将重载本质地表示为选择(choice),从而清晰分离约束收集、约束求解与重载消解。作者形式化并讨论了该框架,认为它可带来更模块化、更高效的类型检查器实现,同时提供更简单的心智模型,并为改进错误信息铺路。

问题
重载消解通常需要类型检查器回溯,因此常被认为与 Hindley-Milner 风格类型系统不兼容;本文关注如何以代数化和模块化方式统一处理重载。
方法
结合变分类型检查与代数子类型,形式化基于流的变分框架,将重载建模为选择,并分离约束收集、约束求解与重载消解。
评估
论文主要进行形式化与讨论,未报告实验评估;作者论证该框架有助于更模块化高效的类型检查器实现、更简单心智模型及更好的错误信息。
原文摘要(Abstract)

Type-directed overload resolution allows programmers to reuse the same name, offloading disambiguation to the type checker. Since many programming languages implement overload resolution by performing backtracking in the type checker, it is commonly believed to be incompatible with Hindley-Milner-style type systems. In this paper, we present an approach to overload resolution that combines insights from variational type checking and algebraic subtyping. We formalize and discuss our flow-based variational framework that captures the essence of overloads by representing them as choices . This cleanly separates constraint collection, constraint solving, and overload resolution. We believe our framework not only gives rise to more modular and efficient implementations of type checkers, but also serves as a simpler mental model and paves the way for improved error messages.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot2907,
  title = {The Simple Essence of Overloading: Making Ad-Hoc Polymorphism More Algebraic with Flow-Based Variational Type-Checking},
  author = {Jiří Beneš and Jonathan Immanuel Brachthäuser},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {OOPSLA2},
  year = {2025},
  doi = {10.1145/3763168}
}