FO-Complete Program Verification for Heap Logics
Adithya Murali, Hrishikesh Balakrishnan, Aaron Councilman, P. Madhusudan
TL;DR
This work tackles the challenge of complete automatic verification for expressive heap logics by introducing two FO-complete logics: Frame Logic (FL) and a frame-logic-inspired Separation Logic (SL-FL) with implicit heaplets. It develops a verification pipeline that uses a cloud operator to eliminate quantifiers, translates SL-FL into FL, and relies on FO-complete reasoning (via natural proofs) over a one-way fragment of first-order logic, FORD, to discharge verification conditions. The authors implement toolchains, FLV and SLFLV, and demonstrate through a 29-program benchmark suite that these logics can express rich data-structure specifications and verify them efficiently, with SL-FL showing expressiveness at some performance cost. The results establish a practical, theoretically grounded standard of FO-completeness for heap logics, paving the way for more robust, predictable automated verification in memory-managed settings and suggesting avenues for automated lemma synthesis and broader toolchains.
Abstract
We develop the first two heap logics that have implicit heaplets and that admit FO-complete program verification. The notion of FO-completeness is a theoretical guarantee that all theorems that are valid when recursive definitions are interpreted as fixpoint definitions (instead of least fixpoint) are guaranteed to be eventually proven by the system. The logics we develop are a frame logic ($\textit{FL}$) and a separation logic ($\textit{SL-FL}$) that has an alternate semantics inspired by frame logic. We show verification condition generation for FL that is amenable to FO-complete reasoning using quantifier instantiation and SMT solvers. We show $\textit{SL-FL}$ can be translated to FL in order to obtain FO-complete reasoning. We implement tools that realize our technique and show the expressiveness of our logics and the efficacy of the verification technique on a suite of benchmarks that manipulate data structures.
