arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2311.02673cs.PL
收藏

交换性简化参数化程序的证明

Commutativity Simplifies Proofs of Parameterized Programs

Azadeh Farzan, Dominik Klumpp, Andreas Podelski

AI总结:

本文针对线程数无界的参数化程序证明难题,提出一类基于交换性的有效参数化归约族,通过源到源转换生成仍为参数化的归约程序,可复用现有验证技术,初步实验结果验证了其实用性。

摘要:

交换性已被证明是推理并发程序的有力工具。近期研究表明,基于交换性的程序归约可能比程序本身更易于证明。学界已引入字典序程序归约框架,以形式化一大类归约方法。然而,基于该框架的方法仅适用于线程数量固定的程序模型。\n本文证明,我们可以定义一类有效的参数化程序归约族,用于为参数化程序(即线程数量无界的程序)找到简化的证明。我们证实,归约确实有助于简化参数化程序的证明,这一点可以被精确化:参数化程序的归约版本所需的证明可以使用更少或更简单的幽灵变量。因此,即便原始参数化程序无法通过自动化验证技术验证,其归约版本也可能被验证。\n我们提出了一种参数化程序的归约概念,使得参数化程序$\u27e8P\u27e9$的归约$\u27e8R\u27e9$仍是一个参数化程序($\u27e8R\u27e9$的线程模板通过对$\u27e8P\u27e9$的线程模板进行源到源转换得到)。因此,现有的参数化程序验证技术可以直接应用于$\u27e8R\u27e9$而非$\u27e8P\u27e9$。我们定义了一类合适的两两偏好序,可用于生成不同的字典序归约。\n为验证这一理论基础在实践中是否为可用的解决方案,我们基于近期提出的参数化程序验证框架实现了该方法。我们在一组有代表性的示例上开展的初步实验结果令人鼓舞。

英文摘要:

Commutativity has proven to be a powerful tool in reasoning about concurrent programs. Recent work has shown that a commutativity-based reduction of a program may admit simpler proofs than the program itself. The framework of lexicographical program reductions was introduced to formalize a broad class of reductions. Approaches based on this framework, however, were limited to program models with a fixed number of threads. In this paper, we show that it is possible to define an effective parametric family of program reductions that can be used to find simple proofs for parameterized programs, i.e., programs with an unbounded number of threads. We show that reductions are indeed useful for the simplification of proofs of parameterized programs, in a sense that can be made precise: A reduction of a parameterized program may admit a proof which uses fewer or less sophisticated ghost variables. The reduction may therefore be within reach of an automated verification technique, even when the original parameterized program is not. We introduce a notion of reductions for parameterized programs such that the reduction $\mathcal{R}$ of a parameterized program $\mathcal{P}$ is again a parameterized program (the thread template of $\mathcal{R}$ is obtained by source-to-source transformation of the thread template of $\mathcal{P}$). Consequently, existing techniques for the verification of parameterized programs can be directly applied to $\mathcal{R}$ instead of $\mathcal{P}$. We define an appropriate family of pairwise preference orders which can be used to produce different lexicographical reductions. To determine whether this theoretical foundation amounts to a usable solution in practice, we have implemented the approach, based on a recently proposed framework for parameterized program verification. The results of our preliminary experiments on a representative set of examples are encouraging.

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

↑