当前位置: X-MOL 学术arXiv.cs.CC › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Putting the Squeeze on Array Programs: Loop Verification via Inductive Rank Reduction
arXiv - CS - Computational Complexity Pub Date : 2021-06-02 , DOI: arxiv-2106.00937
Oren Ish Shalom, Shachar Itzhaky, Noam Rinetzky, Sharon Shoham

Automatic verification of array manipulating programs is a challenging problem because it often amounts to the inference of in ductive quantified loop invariants which, in some cases, may not even be firstorder expressible. In this paper, we suggest a novel verification tech nique that is based on induction on userdefined rank of program states as an alternative to loopinvariants. Our technique, dubbed inductive rank reduction, works in two steps. Firstly, we simplify the verification problem and prove that the program is correct when the input state con tains an input array of length B or less, using the length of the array as the rank of the state. Secondly, we employ a squeezing function g which converts a program state sigma with an array of length > B to a state g(sigma) containing an array of length minus 1 or less. We prove that when g satisfies certain natural conditions then if the program violates its specification on sigma then it does so also on g(sigma). The correctness of the program on inputs with arrays of arbitrary lengths follows by induction. We make our technique automatic for array programs whose length of execution is proportional to the length of the input arrays by (i) perform ing the first step using symbolic execution, (ii) verifying the conditions required of g using Z3, and (iii) providing a heuristic procedure for syn thesizing g. We implemented our technique and applied it successfully to several interesting arraymanipulating programs, including a bidirec tional summation program whose loop invariant cannot be expressed in firstorder logic while its specification is quantifier free.

中文翻译:

对阵列程序施加压力:通过归纳秩减少进行循环验证

数组操作程序的自动验证是一个具有挑战性的问题,因为它通常相当于归纳量化循环不变量的推断,在某些情况下,甚至可能无法一阶表达。在本文中,我们提出了一种新颖的验证技术,该技术基于对用户定义的程序状态等级的归纳,作为循环不变量的替代方案。我们的技术被称为归纳降阶,分两步工作。首先,我们简化验证问题,并以数组的长度作为状态的秩,证明当输入状态包含长度为 B 或更小的输入数组时程序是正确的。其次,我们使用了一个压缩函数 g,它将长度大于 B 的数组的程序状态 sigma 转换为包含长度为负 1 或更小的数组的状态 g(sigma)。我们证明,当 g 满足某些自然条件时,如果程序违反了它在 sigma 上的规范,那么它也会在 g(sigma) 上违反它的规范。程序对具有任意长度数组的输入的正确性遵循归纳法。对于执行长度与输入数组长度成正比的数组程序,我们使我们的技术自动化,方法是(i)使用符号执行执行第一步,(ii)使用 Z3 验证 g 所需的条件,以及(iii)提供用于合成 g 的启发式程序。我们实现了我们的技术并将其成功应用于几个有趣的数组操作程序,包括一个双向求和程序,其循环不变量不能用一阶逻辑表示,而其规范是无量词的。
更新日期:2021-06-03
down
wechat
bug