paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A Separation Logic for Parallel Time Complexity with Work and Span Credits

一种带 work 与 span credit 的并行时间复杂度分离逻辑
ICFP 10(ICFP)2026匹配度 3/10 · 论文属于并发分离逻辑与并行时间复杂度验证,是形式化验证/程序逻辑方向的理论与工程工作,但未涉及 LLM/Agent 改进静态分析或形式化验证,也不涉及浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉;与画像核心的 PL↔AI 交叉方向仅有较弱的间接关联。引用 0 inbox
Alexandre Moine, Sam Westrick, Joseph Tassarotti
crossref: 2026-09-10

AI 速览

一句话:提出 Parcas,用 work credit 与 span credit 在并发分离逻辑中模块化验证 fork-join 程序的并行时间上界,并在 Rocq/Iris 中机器化。

本文关注 fork-join 并行程序的时间复杂度验证。并行时间通常由 work(总操作数)与 span(最长顺序依赖链)两个指标刻画,二者共同决定任意处理器数量下的运行时间。作者提出 Parcas,一个并发分离逻辑,用于证明这两个指标的上界。其核心是两类逻辑资源:work credit 直接沿用顺序程序时间信用(time credit)的思路,可在并行任务间可加地拆分;而 span credit 由于并行组合的 span 取二者最大值,需根本不同的处理——在 fork 点复制 span credit,并为每份副本附加逻辑任务标识,限制其只能由对应任务消费,同时通过转移规则把未使用的 span credit 沿顺序组合传递给后续任务。该逻辑足以为并行 for 循环、tabulate 等常见并行原语给出模块化、高阶的规约。作者在并行前缀和、并行归并排序以及混合并发与并行的一种 Treiber 无锁栈变体等案例上验证了方法,所有结果均在 Rocq 证明助手中基于 Iris 分离逻辑框架机器化。

问题
如何以模块化、可组合的方式证明 fork-join 并行程序的时间复杂度上界,其中复杂度需同时刻画 work(总操作数)与 span(最长依赖链)。
方法
在并发分离逻辑中引入 work credit 与 span credit 作为表示产生开销权限的逻辑资源:work credit 可加拆分,span credit 在 fork 点复制并用逻辑任务标识限制消费范围,另设转移规则允许未用 span credit 跨顺序组合传递;以此支持并行原语的高阶模块化规约。
评估
在 Rocq 证明助手中基于 Iris 框架机器化全部结果,并对并行前缀和、并行归并排序以及混合并发与并行的 Treiber 无锁栈变体等案例进行了验证。
原文摘要(Abstract)

We present Parcas, a concurrent separation logic for verifying the parallel time complexity of fork-join programs. In order to abstract from the specifics of the machine, time complexity for parallel programs is given in terms of two metrics: the work, measuring the total number of operations, and the span, measuring the longest chain of sequential dependencies. Together, these two metrics determine the running time on any number of processors. For proving bounds on the work and span, Parcas is equipped with work credits and span credits, logical devices that represent permissions to incur costs. Work credits are a straightforward adaptation of time credits, a standard tool for bounding time complexity of sequential programs, and can be split additively between parallel tasks. Span credits, however, require a fundamentally different treatment. Indeed, the span of the parallel composition of two tasks is the maximum of the span of the two tasks. To account for this, we propose a rule for duplicating span credits at fork points, with each copy tagged by a logical task identifier that restricts which task may spend them. A transfer rule allows unused span credits to be forwarded across sequential compositions to subsequent tasks. The logic is expressive enough to give modular, higher-order specifications for common parallel primitives such as a parallel for loop and a tabulate function. We demonstrate Parcas on several case studies, including parallel prefix sums, parallel merge sort, and a variant of Treiber's lock-free stack that mixes concurrency with parallelism. All the presented results are mechanized in the Rocq prover using the Iris separation logic framework.

链接与引用

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

BibTeX
@article{abs-2607-11582,
  title = {A Separation Logic for Parallel Time Complexity with Work and Span Credits},
  author = {Alexandre Moine and Sam Westrick and Joseph Tassarotti},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {ICFP},
  year = {2026},
  doi = {10.1145/3828679}
}