Counterexample Driven Quantifier Instantiations with Applications to Distributed Protocols
Open Access
- 16 October 2023
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Programming Languages
- Vol. 7 (OOPSLA2) , 1878-1904
Abstract
Formally verifying infinite-state systems can be a daunting task, especially when it comes to reasoning about quantifiers. In particular, quantifier alternations in conjunction with function symbols can create function cycles that result in infinitely many ground terms, making it difficult for solvers to instantiate quantifiers and causing them to diverge. This can leave users with no useful information on how to proceed. To address this issue, we propose an interactive verification methodology that uses a relational abstraction technique to mitigate solver divergence in the presence of quantifiers. This technique abstracts functions in the verification conditions (VCs) as one-to-one relations, which avoids the creation of function cycles and the resulting proliferation of ground terms. Relational abstraction is sound and guarantees correctness if the solver cannot find counter-models. However, it may also lead to false counterexamples, which can be addressed by refining the abstraction and requiring the existence of corresponding elements. In the domain of distributed protocols, we can refine the abstraction by diagnosing counterexamples and manually instantiating elements in the range of the original function. If the verification conditions are correct, there always exist finitely many refinement steps that eliminate all spurious counter-models, making the approach complete. We applied this approach in Ivy to verify the safety properties of consensus protocols and found that: (1) most verification goals can be automatically verified using relational abstraction, while SMT solvers often diverge when given the original VC, (2) only a few manual instantiations were needed, and the counterexamples provided valuable guidance for the user compared to timeouts produced by the traditional approach, and (3) the technique can be used to derive efficient low-level implementations of tricky algorithms.Keywords
Funding Information
- European Union's Horizon 2020 research and innovation programme (759102-SVIS,)
- Israeli Science Foundation (1810/18)
This publication has 19 references indexed in Scilit:
- EventML: Specification, verification, and implementation of crash-tolerant state machine replication systemsScience of Computer Programming, 2017
- IronFleetCommunications of the ACM, 2017
- A short counterexample property for safety and liveness verification of fault-tolerant distributed algorithms2017
- Ivy: safety verification by interactive generalization2016
- On natural deduction in classical first-order logic: Curry–Howard correspondence, strong normalization and Herbrand's theoremTheoretical Computer Science, 2016
- Verdi: a framework for implementing and formally verifying distributed systems2015
- Z3: An Efficient SMT Solver2008
- Abstractions from proofs2004
- Practical byzantine fault tolerance and proactive recoveryACM Transactions on Computer Systems, 2002
- Counterexample-Guided Abstraction Refinement2000