DafnyMPI: A Dafny Library for Verifying Message-Passing Concurrent Programs
Aleksandr Fedchin, Antero Mejr, Hari Sundar, Jeffrey S. Foster

TL;DR
DafnyMPI is a library that enables formal verification of MPI-based parallel programs, ensuring deadlock freedom, termination, and functional correctness without custom concurrency logic.
Contribution
It introduces DafnyMPI, a scalable, verification-friendly library for MPI programs that extends Dafny with concurrent reasoning capabilities and formal guarantees.
Findings
Proves deadlock freedom using formal methods.
Verifies termination and absence of runtime errors.
Demonstrates applicability on PDE numerical solutions.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsDistributed systems and fault tolerance · Formal Methods in Verification · Parallel Computing and Optimization Techniques
