paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Fulls Seldom Differ

Fulls 鲜有不同
ICFP 9(ICFP)2025匹配度 2/10 · 论文属于程序验证/定理证明中的列表长度推理与长度检查算法,与静态分析/形式化验证有邻近性,但未涉及用户核心关注的 LLM/Agent 与静态分析结合、浮点程序分析或贝叶斯程序分析。引用 0 inbox
Mark Koch, Alan Lawrence, Conor McBride, Craig Roy
crossref: 2026-09-10

AI 速览

一句话:提出描述列表长度的子语言,支持倍增与指数增长,并给出在可预测域上完备的长度检查算法,经范畴论拉回证明终止。

许多程序以各种顺序或分治递归模式处理列表,其正确性与完备性推理需要推理列表长度,而通用长度推理通常不可判定,甚至 NP 完全。本文引入一个相对简单、并非完全通用但能覆盖大量此类模式的列表长度表达式子语言,支持倍增以及指数(迭代倍增)。作者为该子语言设计了简单的长度检查算法,并在一个可预测的问题域上证明其完备性。终止性证明通过范畴论拉回给出,并在 Agda 中形式化;同时提供 Rocq 实现,以及带 Haskell 解释器的玩具语言 Fulbourn。

问题
对以顺序或分治递归处理列表的程序进行正确性与完备性推理时,需要推理列表长度;而通用长度推理通常不可判定或 NP 完全。
方法
引入描述列表长度的简单子语言,支持倍增与指数(迭代倍增),并设计在该可预测域上完备的长度检查算法;通过范畴论拉回证明终止性,并在 Agda 中形式化,另给出 Rocq 实现和 Haskell 解释器实现的 Fulbourn 玩具语言。
评估
通过 Agda 中的机器化证明验证算法终止性,并用 Rocq 实现和 Haskell 的 Fulbourn 解释器展示可实现性;评估聚焦于子语言覆盖的模式与长度检查的完备性,而非传统基准测试。
原文摘要(Abstract)

Many programs process lists by recursing in a wide variety of sequential and/or divide-and-conquer patterns. Reasoning about the correctness and completeness of these programs requires reasoning about the lengths of the lists, techniques for which are typically undecidable or at least NP-complete. In this paper we show how introducing a relatively simple (sub-)language for expressions describing list lengths, whilst not completely general, covers a great number of these patterns. It includes not only doubling but also exponentiation (iterated doubling), and moreover admits a simple length-checking algorithm that is complete over a predictable problem domain. We prove termination of the algorithm via category-theoretic pullbacks, formalized in Agda, as well as providing a more realistic implementation in Rocq, and a toy language Fulbourn with interpreter in Haskell.

链接与引用

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

BibTeX
@article{paperbot3032,
  title = {Fulls Seldom Differ},
  author = {Mark Koch and Alan Lawrence and Conor McBride and Craig Roy},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {9},
  number = {ICFP},
  year = {2025},
  doi = {10.1145/3747526}
}