一句话:提出符号结构与模型发现过程,为演绎验证中仅有无穷模型的量词公式找到有限表示的反模型。
演绎验证常用一阶量词建模无界域,但自动求解器难以处理。许多可满足公式只有无限模型(如自然数、整数、链表等归纳定义的近似),现有工具只能找有限模型,导致发散或返回 unknown,缺乏验证失败反馈。本文提出符号结构来有限表示一类无限模型,并给出高效模型检测和符号模型发现过程,在给定结构族中搜索无限模型;还定义了一个扩展并包含多排序 EPR 的可判定片段,使该过程成为其判定算法。实验在分布式共识协议与堆操作程序上快速找到无限反模型,而 Z3、cvc5、Vampire 发散或未知。
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”.
@article{paperbot2577,
title = {An Infinite Needle in a Finite Haystack: Finding Infinite Counter-Models in Deductive Verification},
author = {Neta Elad and Oded Padon and Sharon Shoham},
journal = {Proceedings of the ACM on Programming Languages},
volume = {8},
number = {POPL},
year = {2024},
doi = {10.1145/3632875}
}