Bounded Quantifier Instantiation for Checking Inductive Invariants

10/24/2017
by   Yotam M. Y. Feldman, et al.
0

We consider the problem of checking whether a proposed invariant ϕ expressed in first-order logic with quantifier alternation is inductive, i.e. preserved by a piece of code. While the problem is undecidable, modern SMT solvers can sometimes solve it automatically. However, they employ powerful quantifier instantiation methods that may diverge, especially when ϕ is not preserved. A notable difficulty arises due to counterexamples of infinite size. This paper studies Bounded-Horizon instantiation, a natural method for guaranteeing the termination of SMT solvers. The method bounds the depth of terms used in the quantifier instantiation process. We show that this method is surprisingly powerful for checking quantified invariants in uninterpreted domains. Furthermore, by producing partial models it can help the user diagnose the case when ϕ is not inductive, especially when the underlying reason is the existence of infinite counterexamples. Our main technical result is that Bounded-Horizon is at least as powerful as instrumentation, which is a manual method to guarantee convergence of the solver by modifying the program so that it admits a purely universal invariant. We show that with a bound of 1 we can simulate a natural class of instrumentations, without the need to modify the code and in a fully automatic way. We also report on a prototype implementation on top of Z3, which we used to verify several examples by Bounded-Horizon of bound 1.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/13/2019

Decidable Inductive Invariants for Verification of Cryptographic Protocols with Unbounded Sessions

We develop a theory of decidable inductive invariants for an infinite-st...
research
07/14/2022

Model Checking for Rectangular Hybrid Systems: A Quantified Encoding Approach

Satisfiability Modulo Theories (SMT) solvers have been successfully appl...
research
05/16/2020

Distributed Bounded Model Checking

Program verification is a resource-hungry task. This paper looks at the ...
research
05/27/2020

Global Guidance for Local Generalization in Model Checking

SMT-based model checkers, especially IC3-style ones, are currently the m...
research
05/06/2022

Regular Model Checking Upside-Down: An Invariant-Based Approach

Regular model checking is a well-established technique for the verificat...
research
04/25/2023

Hyperproperty Verification as CHC Satisfiability

Hyperproperties govern the behavior of a system or systems across multip...
research
05/28/2021

Fair and Adventurous Enumeration of Quantifier Instantiations

SMT solvers generally tackle quantifiers by instantiating their variable...

Please sign up or login with your details

Forgot password? Click here to reset