paperbot · PL 论文追踪

全部论文 待读 收藏

P2 QuickChecking Convergence of Rewriting Systems (Functional Pearl)

快速检验重写系统的收敛性(函数式珍珠)
ICFP 10(ICFP)2026匹配度 3/10 · 该论文属于形式方法与程序测试领域,研究项重写系统收敛性的QuickCheck测试,与用户关注的PL/AI交叉、浮点程序分析、贝叶斯程序分析等核心方向无直接关联。虽然涉及形式化推理与测试,但未使用LLM/Agent,也未讨论静态分析或程序分析技术。引用 0 inbox
Koen Claessen
crossref: 2026-09-10

AI 速览

一句话:提出基于随机执行迹生成与收缩的 QuickCheck 方法,测试项重写系统的收敛性并高效发现反例。

项重写系统广泛用于自动推理与编程语言语义,许多应用要求系统收敛(合流且终止)。现有工具与理论可判定收敛性,但本文关注一种实用的测试方法,以快速发现有用的反例。标准基于性质的测试在此面临困难:穷举计算所有范式本质上有缺陷且过慢;随机生成范式则因依赖先前生成的数据,使反例收缩变得脆弱。作者提出基于随机执行迹的生成与收缩的 QuickCheck 方法:检查迹的首项与末项是否共享同一确定性范式,从而消除生成器间的数据依赖,得到高效发现反例、并支持快速稳健收缩的性质。作者在群论方程到分布式进程演算等多个例子上展示了方法有效性。

问题
如何实用地测试项重写系统的收敛性(合流性与终止性),并快速找到有意义的反例;穷举范式太慢,随机生成范式又使收缩因数据依赖而脆弱。
方法
基于随机执行迹的 QuickCheck 测试:生成并收缩执行迹,检查一条迹的首项与末项是否具有相同的确定性范式,以此消除生成器之间的数据依赖。
评估
在多个示例上演示方法效果,包括群论方程与分布式进程演算,展示其发现反例的效率与收缩的稳健性。
原文摘要(Abstract)

Term rewriting systems are a common tool in automated reasoning and semantics of programming languages, and many practical applications require these systems to be convergent. While automated tools and theory exist to establish convergence, this paper is concerned with a practical method for testing it to quickly find useful counterexamples. Standard property-based testing approaches struggle here: exhaustively computing all normal forms is fundamentally flawed and too slow, while generating random normal forms makes counterexample minimization (shrinking) fragile due to dependencies on earlier generated test data. To solve this, we introduce a QuickCheck testing method based on generating and shrinking random execution traces. By checking if the first and last terms of a generated trace share the same deterministic normal form, we remove the data dependency between generators. This approach yields a property that efficiently finds counterexamples and enables fast, robust shrinking. We demonstrate the effectiveness of this method on various examples, ranging from group theory equations to distributed process calculus.

链接与引用

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

BibTeX
@article{Claessen26,
  title = {QuickChecking Convergence of Rewriting Systems (Functional Pearl)},
  author = {Koen Claessen},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {ICFP},
  year = {2026},
  doi = {10.1145/3828678}
}