An Infinite Needle in a Finite Haystack: Finding Infinite Counter-Models in Deductive Verification
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) , 970-1000
Abstract
First-order logic, and quantifiers in particular, are widely used in deductive verification of programs and systems. Quantifiers are essential for describing systems with unbounded domains, but prove difficult for automated solvers. Significant effort has been dedicated to finding quantifier instantiations that establish unsatisfiability of quantified formulas, thus ensuring validity of a system’s verification conditions. However, in many cases the formulas are satisfiable—this is often the case in intermediate steps of the verification process, e.g., when an invariant is not yet inductive. For such cases, existing tools are limited to finding finite models as counterexamples. Yet, some quantified formulas are satisfiable but only have infinite models, which current solvers are unable to find. Such infinite counter-models are especially typical when first-order logic is used to approximate the natural numbers, the integers, or other inductive definitions such as linked lists, which is common in deductive verification. The inability of solvers to find infinite models makes them diverge in these cases, providing little feedback to the user as they try to make progress in their verification attempts. In this paper, we tackle the problem of finding such infinite models, specifically, finite representations thereof that can be presented to the user of a deductive verification tool. These models give insight into the verification failure, and allow the user to identify and fix bugs in the modeling of the system and its properties. Our approach consists of three parts. First, we introduce symbolic structures as a way to represent certain infinite models, and show they admit an efficient model checking procedure. Second, we describe an effective model finding procedure that symbolically explores a given (possibly infinite) family of symbolic structures in search of an infinite model for a given formula. Finally, we identify a new decidable fragment of first-order logic that extends and subsumes the many-sorted variant of EPR, where satisfiable formulas always have a model representable by a symbolic structure within a known family, making our model finding procedure a decision procedure for that fragment. We evaluate our approach on examples from the domains of distributed consensus protocols and of heapmanipulating programs (specifically, linked lists). Our implementation quickly finds infinite counter-models that demonstrate the source of verification failures in a simple way, while state-of-the-art SMT solvers and theorem provers such as Z3, cvc5, and Vampire diverge or return “unknown”.Keywords
All Related Versions
Funding Information
- European Research Council (759102-SVIS)
- Israel Science Foundation (2117/23)
This publication has 74 references indexed in Scilit:
- Automata-based presentations of infinite structures2011
- LTL satisfiability checkingInternational Journal on Software Tools for Technology Transfer, 2010
- Simplify: a theorem prover for program checkingJournal of the ACM, 2005
- Parametric shape analysis via 3-valued logicACM Transactions on Programming Languages and Systems, 2002
- The part-time parliamentACM Transactions on Computer Systems, 1998
- An industrial strength theorem prover for a logic based on Common LispIEEE Transactions on Software Engineering, 1997
- Complexity results for classes of quantificational formulasJournal of Computer and System Sciences, 1980
- An improved algorithm for decentralized extrema-finding in circular configurations of processesCommunications of the ACM, 1979
- Definability in the monadic second-order theory of successorThe Journal of Symbolic Logic, 1969
- Decidability of Second-Order Theories and Automata on Infinite TreesTransactions of the American Mathematical Society, 1969