paperbot · PL 论文追踪

全部论文 待读 收藏

P2 DafnyMPI: A Dafny Library for Verifying Message-Passing Concurrent Programs

DafnyMPI:一个用于验证消息传递并发程序的 Dafny 库
POPL 10(POPL)2026匹配度 3/10 · 该论文属于形式化验证与并发/并行程序分析,具备理论形式化和工程实现,但与用户核心方向(LLM/Agent 与静态分析、浮点程序分析、贝叶斯程序分析、Agentic 程序)无直接交集,且未涉及 AI/LLM 改进验证。引用 2 inbox
Aleksandr Fedchin, Antero Mejr, Hari Sundar, Jeffrey S. Foster
crossref: 2026-09-10

AI 速览

一句话:提出 DafnyMPI 库,使 Dafny 能验证 MPI 程序的无死锁、终止与功能等价。

MPI 广泛用于并行高性能编程,但编写无 bug 的 MPI 软件仍很困难。本文提出 DafnyMPI,一种可扩展的 MPI 软件形式化验证方法。与依赖定制并发逻辑的已有框架不同,DafnyMPI 复用面向顺序程序的验证语言 Dafny,并扩展其并发推理能力。该库要求用户预先指定通信拓扑,并验证 MPI_ISEND、MPI_WAIT 等通信原语调用满足前置条件。作者用核心演算形式化 DafnyMPI,证明这些前置条件足以保证无死锁;功能等价通过消息载荷上的 rely-guarantee 推理和读写缓冲区安全使用系统证明;终止与无运行时错误则由标准 Dafny 技术证明。最后,作者验证了三个经典偏微分方程数值求解程序,展示了方法的适用性。

问题
MPI 并行程序难以保证正确,尤其是死锁、终止以及与更简单顺序实现的功能等价问题;现有专用验证框架常需定制并发逻辑。
方法
实现为 Dafny 库,要求用户预先声明通信拓扑并验证 MPI 通信原语调用的前置条件;用核心演算证明前置条件可保证无死锁,并用 rely-guarantee 与缓冲区安全推理证明功能等价。
评估
在三个经典偏微分方程的数值求解程序上验证了 DafnyMPI 的适用性,展示其可用于实际 MPI 软件的形式化验证。
原文摘要(Abstract)

The Message Passing Interface (MPI) is widely used in parallel, high-performance programming, yet writing bug-free software that uses MPI remains difficult. We introduce DafnyMPI, a novel, scalable approach to formally verifying MPI software. DafnyMPI allows proving deadlock freedom, termination, and functional equivalence with simpler sequential implementations. In contrast to existing specialized frameworks, DafnyMPI avoids custom concurrency logics and instead relies on Dafny, a verification-ready programming language used for sequential programs, extending it with concurrent reasoning abilities. DafnyMPI is implemented as a library that enables safe MPI programming by requiring users to specify the communication topology upfront and to verify that calls to communication primitives such as MPI_ISEND and MPI_WAIT meet their preconditions. We formalize DafnyMPI using a core calculus and prove that the preconditions suffice to guarantee deadlock freedom. Functional equivalence is proved via rely-guarantee reasoning over message payloads and a system that guarantees safe use of read and write buffers. Termination and the absence of runtime errors are proved using standard Dafny techniques. To further demonstrate the applicability of DafnyMPI, we verify numerical solutions to three canonical partial differential equations. We believe DafnyMPI demonstrates how to make formal verification viable for a broader class of programs and provides proof engineers with additional tools for software verification of parallel and concurrent systems.

链接与引用

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

BibTeX
@article{FedchinMSF26,
  title = {DafnyMPI: A Dafny Library for Verifying Message-Passing Concurrent Programs},
  author = {Aleksandr Fedchin and Antero Mejr and Hari Sundar and Jeffrey S. Foster},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {POPL},
  year = {2026},
  doi = {10.1145/3776705}
}