Verdi: a framework for implementing and formally verifying distributed systems

James R. Wilcox, Doug Woos, Pavel Panchekha, Zachary Tatlock, Xi Wang, Michael D. Ernst, Thomas E. Anderson

ACM SIGPLAN Notices · 2015 · 57 citations · 25 references

DOIFull text

Open access

Concepts

TL;DR

Distributed systems are difficult to implement correctly because they must handle concurrency and failures, and their complex behavior makes exhaustive testing infeasible, leading to critical data loss and service outages. The authors introduce Verdi, a Coq-based framework for implementing and formally verifying distributed systems, and demonstrate its utility by mechanically proving Raft’s linearizability and providing verified primary‑backup and key‑value store implementations. Verdi formalizes multiple network fault models, allowing developers to verify their systems under an idealized model first and then transfer correctness guarantees to more realistic fault models without extra proofs. The verified Raft, primary‑backup, and key‑value store implementations achieve performance comparable to their unverified counterparts.

Abstract

Distributed systems are difficult to implement correctly because they must handle both concurrency and failures: machines may crash at arbitrary points and networks may reorder, drop, or duplicate packets. Further, their behavior is often too complex to permit exhaustive testing. Bugs in these systems have led to the loss of critical data and unacceptable service outages. We present Verdi, a framework for implementing and formally verifying distributed systems in Coq. Verdi formalizes various network semantics with different faults, and the developer chooses the most appropriate fault model when verifying their implementation. Furthermore, Verdi eases the verification burden by enabling the developer to first verify their system under an idealized fault model, then transfer the resulting correctness guarantees to a more realistic fault model without any additional proof burden. To demonstrate Verdi's utility, we present the first mechanically checked proof of linearizability of the Raft state machine replication algorithm, as well as verified implementations of a primary-backup replication system and a key-value store. These verified systems provide similar performance to unverified equivalents.

References

25