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或更短的输入阵列时, 程序是正确的。 第二, 我们使用一种挤压函数函数, 将一个程序以 范围 > B 转换成一个阵列的阵列, 包含一个阵列的阵列的阵列, 包含一个阵列的阵列的阵列, 其执行速度是按比例的。 我们证明, 当程序满足某些自然条件时, 如果程序违背其光度, 也会在 g( sigrial) 。 程序在感化后以任意长度的阵列内保存一个输入阵列的阵列的阵列的阵列的阵列的准确性 。 我们用技术自动自动程序,, 使用其执行过程的阵列的阵列的阵列的阵列的阵列的阵列,, 以比的阵列的阵列的阵列的阵列的阵列的阵列的阵列, 执行过程是按比例的阵列, 执行过程的阵列的阵列,, 执行过程是按比例的阵列的阵列程序,,,, 执行过程是用来的阵列的阵列的阵列的阵列, 。