We present a novel verification technique to prove interesting properties of a class of array programs with a symbolic parameter N denoting the size of the array. The technique relies on constructing two slightly different versions of the program. It infers difference relations between the corresponding variables at key control points of the joint control-flow graph of the two program versions. The inferred difference invaraints are agnostic of the post-condition to be proved and are typically much simpler than the inductive invariants needed for proving the post-condition directly. We formulate a new technique to prove the desired post-condition by inducting on the program parameter N, in which the difference invariants are crucially used in the key inductive step. This contrasts with classical techniques that rely on finding potentially complex loop invaraints for each loop in the program. Our synergistic combination of inductive reasoning and finding simple difference invariants helps prove properties of programs that cannot be proved even by the winner of Arrays sub-category from SV-COMP 2021. We have implemented a prototype tool called diffy to demonstrate these ideas. We show the results on a set of benchmarks and compare its performance vis-a-vis state-of-the-art tools for verifying array programs.
翻译:我们展示了一种新型的核查技术, 以证明一组阵列程序有趣的属性, 带有象征性参数 N, 标明阵列的大小。 该技术依赖于构建两个略有不同的程序版本。 它推算出两个程序版本联合控制流程图关键控制点的对应变量之间的关系。 推断出的空心差异是有待验证的后条件的不可知性, 通常比直接证明后条件所需的感应变量简单得多。 我们开发了一种新的技术, 通过引入程序参数 N 来证明理想的后条件, 程序参数 N, 其中差异是关键缩写步骤中的关键应用。 这与传统技术不同, 它依赖于为每个程序循环寻找潜在的复杂的循环空洞。 我们的感应推理和简单变力差异的协同结合有助于证明程序的性质, 即使SV- COMP 2021 的Arrays子类的赢家也无法证明这一点。 我们应用了一种名为“ diffect” 的原型工具来演示这些想法。 我们展示了一套测试工具的阵列结果, 我们对比了一套测试工具。