Mostly Automated Verification of Liveness Properties for Distributed Protocols with Ranking Functions
Open Access
- 2 January 2024
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Programming Languages
- Vol. 8 (POPL) , 1028-1059
Abstract
Distributed protocols have long been formulated in terms of their safety and liveness properties. Much recent work has focused on automatically verifying the safety properties of distributed protocols, but doing so for liveness properties has remained a challenging, unsolved problem. We present LVR, the first framework that can mostly automatically verify liveness properties for distributed protocols. Our key insight is that most liveness properties for distributed protocols can be reduced to a set of safety properties with the help of ranking functions. Such ranking functions for practical distributed protocols have certain properties that make them straightforward to synthesize, contrary to conventional wisdom. We prove that verifying a liveness property can then be reduced to a simpler problem of verifying a set of safety properties, namely that the ranking function is strictly decreasing and nonnegative for any protocol state transition, and there is no deadlock. LVR automatically synthesizes ranking functions by formulating a parameterized function of integer protocol variables, statically analyzing the lower and upper bounds of the variables as well as how much they can change on each state transition, then feeding the constraints to an SMT solver to determine the coefficients of the ranking function. It then uses an off-the-shelf verification tool to find inductive invariants to verify safety properties for both ranking functions and deadlock freedom. We show that LVR can mostly automatically verify the liveness properties of several distributed protocols, including various versions of Paxos, with limited user guidance.Keywords
Funding Information
- DARPA (66001-21-C-4018)
- NSF (CF-2124080, CCF-2239484, CNS-2052947, CNS-224737, NSF CAREER Award)
- Amazon (Amazon Research Award)
- VMware (VMWare Systems Research Award)
This publication has 32 references indexed in Scilit:
- Verdi: a framework for implementing and formally verifying distributed systems2015
- Synthesis of ranking functions using extremal counterexamples2015
- Ranking Templates for Linear LoopsLogical Methods in Computer Science, 2015
- Detecting Fair Non-termination in Multithreaded Programs2012
- Proving thread terminationACM SIGPLAN Notices, 2007
- A Complete Method for the Synthesis of Linear Ranking Functions2004
- Liveness Checking as Safety CheckingElectronic Notes in Theoretical Computer Science, 2002
- Practical Methods for Proving Program Termination2002
- The part-time parliamentACM Transactions on Computer Systems, 1998
- A tree-based algorithm for distributed mutual exclusionACM Transactions on Computer Systems, 1989