arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.01512cs.PLcs.LO
收藏

程序验证算法的原始-对偶视角(扩展版)

A Primal-Dual Perspective on Program Verification Algorithms (Extended Version)

Takeshi Tsukada, Hiroshi Unno, Oded Padon, Sharon Shoham

AI总结:

本文提出统一的原始-对偶框架,通过推广拉格朗日函数到离散验证域,统一解释并推导程序验证与自动推理算法,并基于该框架开发了带量化线性算术的不动点逻辑有效性检查算法。

摘要:

验证与自动推理中的许多算法都利用了证明与反驳或反例之间的某种对偶性。在大多数情况下,对偶性仅作为一种有助于理解算法的直觉,并未被形式化。在其他情况下,对偶性被显式使用,但采用的方式经过专门定制,无法推广到其他问题。本文提出一个统一的原始-对偶框架,用于设计利用对偶性的验证算法。为此,我们推广了线性规划与优化中常用的拉格朗日函数概念,以刻画验证问题中通常离散的域,例如状态幂集、谓词、秩函数等。拉格朗日函数随后诱导出一个原始问题和一个对偶问题。我们设计了一个抽象的原始-对偶过程,同时搜索原始解和对偶解,其中两个搜索相互引导。我们给出了充分条件,确保在拉格朗日函数满足一定单调性假设下该过程能够取得进展。我们表明,程序分析、验证和自动推理中的许多现有算法都可以通过适当选择拉格朗日函数从我们的算法框架中推导出来。基于拉格朗日函数的表述为这些算法的各种特性提供了新的见解,例如它们用于确保单调性和保证进展的组成部分。我们进一步利用该框架为带量化线性算术的不动点逻辑开发了一种新的有效性检查算法。我们的原型取得了有前景的结果,并在某些情况下解决了最先进技术无法解决的实例。

英文摘要:

Many algorithms in verification and automated reasoning leverage some form of duality between proofs and refutations or counterexamples. In most cases, duality is only used as an intuition that helps in understanding the algorithms and is not formalized. In other cases, duality is used explicitly, but in a specially tailored way that does not generalize to other problems. In this paper we propose a unified primal-dual framework for designing verification algorithms that leverage duality. To that end, we generalize the concept of a Lagrangian that is commonly used in linear programming and optimization to capture the domains considered in verification problems, which are usually discrete, e.g., powersets of states, predicates, ranking functions, etc. A Lagrangian then induces a primal problem and a dual problem. We devise an abstract primal-dual procedure that simultaneously searches for a primal solution and a dual solution, where the two searches guide each other. We provide sufficient conditions that ensure that the procedure makes progress under certain monotonicity assumptions on the Lagrangian. We show that many existing algorithms in program analysis, verification, and automated reasoning can be derived from our algorithmic framework with a suitable choice of Lagrangian. The Lagrangian-based formulation sheds new light on various characteristics of these algorithms, such as the ingredients they use to ensure monotonicity and guarantee progress. We further use our framework to develop a new validity checking algorithm for fixpoint logic over quantified linear arithmetic. Our prototype achieves promising results and in some cases solves instances that are not solved by state-of-the-art techniques.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑