paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Backwards-Compatible Row-Based Exceptions in ML

ML 中向后兼容的基于 row 的异常追踪
PLDI 10(PLDI)2026匹配度 2/10 · 该论文是纯 PL 类型系统与机械化形式化验证工作,研究 ML 风格语言的异常追踪,未涉及 LLM/Agent、机器学习系统、浮点程序分析或贝叶斯程序分析,与研究画像的核心交叉方向基本无关。引用 0 inbox
Simcha van Collem, Paulo Emílio de Vilhena, Robbert Krebbers
crossref: 2026-09-10

AI 速览

一句话:提出基于 row 多态与子类型的异常追踪类型系统,保持 ML 向后兼容,并在 Rocq 中用关系分离逻辑机械化验证。

本文针对 ML 风格语言中异常缺乏强静态追踪、而既有异常追踪方案又破坏向后兼容的问题,提出一种基于 row 多态与子类型的类型系统。该系统允许不带异常追踪的既有代码继续工作,并可优雅地泛化以支持异常追踪,同时覆盖可扩展变体类型、局部异常与并发等现实特性。为刻画类型系统的安全性与抽象保证(尤其是局部异常对数据抽象的作用),作者提出一种用于异常的新型关系分离逻辑,并以二元逻辑关系表述上述性质,这本身也是独立贡献。评估涵盖来自 OCaml 标准库、Jane Street 的 OCaml 库以及 Filinski 博士论文中的多个挑战性例子,所有结果均在 Rocq 证明助手中基于 Iris 机械化验证。

问题
ML 风格语言中异常缺乏强类型追踪,而现有异常追踪方案往往破坏向后兼容,使既有代码无法继续使用。
方法
设计基于 row 多态与子类型的异常追踪类型系统,并提出用于异常的关系分离逻辑,以二元逻辑关系证明安全性与抽象保证;全部在 Rocq/Iris 中机械化。
评估
在来自 OCaml 标准库、Jane Street 的 OCaml 库和 Filinski 博士论文的多个挑战性例子上检验类型系统与逻辑,并在 Rocq 中机械化验证所有结果。
原文摘要(Abstract)

We introduce a type system that provides strong types for exception tracking in ML-style languages. Our type system employs a rich notion of row polymorphism and subtyping to ensure backwards compatibility, making sure that code without exception tracking continues to work and can be generalized gracefully to support exception tracking. We study the safety and abstraction guarantees of our type system, in particular the role of local exceptions for data abstraction. We formulate these claims using binary logical relations in a novel relational separation logic for exceptions, an independent contribution of this paper. We support a realistic subset of features from ML-style languages, such as extensible variant types, local exceptions, and concurrency. We exercise our type system and logic on a number of challenging examples taken from the OCaml standard library, from one of Jane Street's OCaml libraries, and from Filinski's PhD thesis. All our results are mechanized in the Rocq prover using Iris.

链接与引用

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

BibTeX
@article{CollemVK26,
  title = {Backwards-Compatible Row-Based Exceptions in ML},
  author = {Simcha van Collem and Paulo Emílio de Vilhena and Robbert Krebbers},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {PLDI},
  year = {2026},
  doi = {10.1145/3808303}
}