Towards a verified compiler for Distributed PlusCal (extended)
To appear in: Journal of Logical and Algebraic Methods in Programming (2026)
Abstract
Formal verification techniques are frequently used to ensure correctness properties of distributed systems and algorithms. However, languages used for formal modeling and verification are often substantially different from languages used in software development, and verifying an abstract representation of an algorithm does not ensure that its handwritten implementation will be correct. This paper presents work in progress on a verified compiler for an extension of Lamport's PlusCal with threads and communication channels. Its syntax and semantics are formalized in the Lean 4 proof assistant and the passes compiling PlusCal algorithms into Go code are implemented in the underlying Lean 4 programming language. This paper gives formal semantics for the first pass of the compiler and outlines its mechanically verified correctness proof.