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

📅 2026-07-13
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the formal verification of time complexity in parallel programs, which requires simultaneous reasoning about total computational cost (work) and critical-path length (span). To this end, we propose Parcas, a concurrent separation logic that introduces replicable, task-annotated span credits and work credits. This novel mechanism precisely captures the max-based semantics of span in fork-join parallelism and enables modular specifications for higher-order parallel primitives. Built on the Iris framework and mechanized in Coq/Rocq, our approach successfully verifies representative benchmarks, including parallel prefix sum, merge sort, and a hybrid concurrent/parallel Treiber stack.
📝 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.
Problem

Research questions and friction points this paper is trying to address.

parallel time complexity
work
span
separation logic
fork-join programs
Innovation

Methods, ideas, or system contributions that make the work stand out.

separation logic
parallel time complexity
work and span
credits
formal verification
🔎 Similar Papers
No similar papers found.