Reference. Formally verified asymptotic consensus in robust networks
Distributed architectures are used to improve performance and reliability of various systems. Examples include drone swarms and load-balancing servers. An important capability of a distributed architecture is the ability to reach consensus among all its nodes. Several consensus algorithms have been proposed, and many of these algorithms come with intricate proofs of correctness, that are not mechanically checked. In the controls community, algorithms often achieve consensus asymptotically , e.g., for problems such as the design of human control systems, or the analysis of natural systems like bird flocking. This is in contrast to exact consensus algorithm such as Paxos, which have received much more recent attention in the formal methods community. This paper presents the first formal proof of an asymptotic consensus algorithm, and addresses various challenges in its formalization. Using the Coq proof assistant, we verify the correctness of a widely used consensus algorithm in the distributed controls community, the Weighted-Mean Subsequence Reduced (W-MSR) algorithm . We formalize the necessary and sufficient conditions required to achieve resilient asymptotic consensus under the assumed attacker model. During the formalization, we clarify several imprecisions in the paper proof, including an imprecision on quantifiers in the main theorem.
Cite
Cites 48 works (5 here)
With notes (5)
On Symmetry and Quantification: A New Approach to Verify Distributed Protocols goelSymmetryQuantificationNew2021
Proving that an unbounded distributed protocol satisfies a given safety property amounts to finding a quantified inductive invariant that implies the property for all possible instance sizes of the protocol. Existing methods for solving this problem can be described as search procedures for an invariant whose quantification prefix fits a particular template. We propose an alternative constructive approach that does not prescribe, a priori, a specific quantifier prefix. Instead, the required prefix is automatically inferred without any search by carefully analyzing the structural symmetries of the protocol. The key insight underlying this approach is that symmetry and quantification are closely related concepts that express protocol invariance under different re-arrangements of its components. We propose symmetric incremental induction, an extension of the finite-domain IC3/PDR algorithm, that automatically derives the required quantified inductive invariant by exploiting the connection between symmetry and quantification. While various attempts have been made to exploit symmetry in verification applications, to our knowledge, this is the first demonstration of a direct link between symmetry and quantification in the context of clause learning during incremental induction. We also describe a procedure to automatically find a minimal finite size, the cutoff, that yields a quantified invariant proving safety for any size. Our approach is implemented in IC3PO, a new verifier for distributed protocols that significantly outperforms the state-of-the-art, scales orders of magnitude faster, and robustly derives compact inductive invariants fully automatically.
Finding Invariants of Distributed Systems: It’s a Small (Enough) World After All hanceFindingInvariantsDistributed
Today’s distributed systems are increasingly complex, leading to subtle bugs that are difficult to detect with standard testing methods. Formal verification can provably rule out such bugs, but historically it has been excessively labor intensive. For distributed systems, recent work shows that, given a correct inductive invariant, nearly all other proof work can be automated; however, the construction of such invariants is still a difficult manual task. In this paper, we demonstrate a new methodology for automating the construction of inductive invariants, given as input a (formal) description of the distributed system and a desired safety condition. Our system performs an exhaustive search within a given space of candidate invariants in order to find and verify inductive invariants which suffice to prove the safety condition. Central to our ability to search efficiently is our algorithm’s ability to learn from counterexamples whenever a candidate fails to be invariant, allowing us to check the remaining candidates more efficiently. We hypothesize that many distributed systems, even complex ones, may have concise invariants that make this approach practical, and in support of this, we show that our system is able to identify and verify inductive invariants for the Paxos protocol, which proved too complex for previous work.
DistAI: Data-Driven Automated Invariant Learning for Distributed Protocols yaoDistAIDataDrivenAutomated
Distributed systems are notoriously hard to implement correctly due to non-determinism. Finding the inductive invariant of the distributed protocol is a critical step in verifying the correctness of distributed systems, but takes a long time to do even for simple protocols. We present DistAI, a data-driven automated system for learning inductive invariants for distributed protocols. DistAI generates data by simulating the distributed protocol at different instance sizes and recording states as samples. Based on the observation that invariants are often concise in practice, DistAI starts with small invariant formulas and enumerates all strongest possible invariants that hold for all samples. It then feeds those invariants and the desired safety properties to an SMT solver to check if the conjunction of the invariants and the safety properties is inductive. Starting with small invariant formulas and strongest possible invariants avoids large SMT queries, improving SMT solver performance. Because DistAI starts with the strongest possible invariants, if the SMT solver fails, DistAI does not need to discard failed invariants, but knows to monotonically weaken them and try again with the solver, repeating the process until it eventually succeeds. We prove that DistAI is guaranteed to find the ∃-free inductive invariant that proves the desired safety properties in finite time, if one exists. Our evaluation shows that DistAI successfully verifies 13 common distributed protocols automatically and outperforms alternative methods both in the number of protocols it verifies and the speed at which it does so, in some cases by more than two orders of magnitude.
I4: Incremental inference of inductive invariants for verification of distributed protocols maI4IncrementalInference2019
Designing and implementing distributed systems correctly is a very challenging task. Recently, formal verification has been successfully used to prove the correctness of distributed systems. At the heart of formal verification lies a computerchecked proof with an inductive invariant. Finding this inductive invariant, however, is the most difficult part of the proof. Alas, current proof techniques require inductive invariants to be found manually—and painstakingly—by the developer. In this paper, we present a new approach, Incremental Inference of Inductive Invariants (I4), to automatically generate inductive invariants for distributed protocols. The essence of our idea is simple: the inductive invariant of a finite instance of the protocol can be used to infer a general inductive invariant for the infinite distributed protocol. In I4, we create a finite instance of the protocol; use a model checking tool to automatically derive the inductive invariant for this finite instance; and generalize this invariant to an inductive invariant for the infinite protocol. Our experiments show that I4 can prove the correctness of several distributed protocols like Chord, 2PC and Transaction Chains with little to no human effort.
IronFleet: proving practical distributed systems correct hawblitzel-2015-ironfleet
External (43)
- Towards Formal Verification of HotStuff-Based Byzantine Fault Tolerant Consensus in Agda (2022)
- Tight Bounds for Asymptotic and Approximate Consensus (2021)
- Formal Verification of Consensus in the Taurus Distributed Database (2021)
- Graph Theory in Coq: Minors, Treewidth, and Isomorphisms (2020)
- Sparse Polynomial Zonotopes: A Novel Set Representation for Reachability Analysis (2020)
- On the formal verification of the stellar consensus protocol (2020)
- A Coq Formalization of Digital Filters (2018)
- A formal proof in Coq of a control function for the inverted pendulum (2018)
- Finite-Time Resilient Formation Control with Bounded Inputs (2018)
- A Formal Proof in Coq of LaSalle’s Invariance Principle (2017)
- Towards formal proofs of feedback control theory (2017)
- Formalization of Transform Methods Using HOL Light (2017)
- Resilient consensus for time-varying networks of dynamic agents (2017)
- Resilient Flocking for Mobile Robot Teams (2017)
- Formal foundations of 3D geometry to model robot manipulators (2016)
- Formal verification of stability properties of cyber-physical systems (2016)
- Robust Model Predictive Control for Signal Temporal Logic Synthesis (2015)
- Robust temporal logic model predictive control (2015)
- Paxos Made Moderately Complex (2015)
- Verdi: a framework for implementing and formally verifying distributed systems (2015)
- Formal verification of control systems' properties with theorem proving (2014)
- In search of an understandable consensus algorithm (2014)
- Why3 — Where Programs Meet Provers (2013)
- Formal Analysis of Steady State Errors in Feedback Control Systems Using HOL-Light (2013)
- Resilient Asymptotic Consensus in Robust Networks (2013)
- Robustness of information diffusion algorithms to locally bounded adversaries (2012)
- Zonotope bundles for the efficient computation of reachable sets (2011)
- Graph Theoretic Methods in Multiagent Networks (2010)
- Formal verification of a consensus algorithm in the heard-of model (2009)
- Zonotope/Hyperplane Intersection for Hybrid Systems Reachability Analysis (2008)
- Model checking of robotic control systems (2005)
- Paxos made simple (2001)
- Verification of Hybrid Systems with Linear Differential Inclusions Using Ellipsoidal Approximations (2000)
- Model checking JAVA programs using JAVA PathFinder (2000)
- Stabilization of the inverted pendulum around its homoclinic orbit (2000)
- Verification of Polyhedral-Invariant Hybrid Automata Using Polygonal Flow Pipe Approximations (1999)
- Practical byzantine fault tolerance (1999)
- Formal Verification of a Railway Interlocking System using Model Checking (1998)
- HOL Light: A tutorial introduction (1996)
- Reaching approximate agreement with mixed-mode faults (1994)
- Isabelle: A Generic Theorem Prover (1994)
- Automatic verification of sequential control systems using temporal logic (1992)
- Implementing fault-tolerant services using the state machine approach: a tutorial (1990)