Bounded verification has proved useful to detect bugs and to increase confidence in the correctness of a program. In contrast to unbounded verification, reasoning about calls via (bounded) inlining and about loops via (bounded) unrolling does not require method specifications and loop invariants and, therefore, reduces the annotation overhead to the bare minimum, namely specifications of the properties to be verified. For verifiers based on traditional program logics, verification is preserved by inlining (and unrolling): successful unbounded verification of a program w.r.t. some annotation implies successful verification of the inlined program. That is, any error detected in the inlined program reveals a true error in the original program. However, this essential property might not hold for automatic separation logic verifiers such as Caper, GRASShopper, RefinedC, Steel, VeriFast, and verifiers based on Viper. In this setting, inlining generally changes the resources owned by method executions, which may affect automatic proof search algorithms and introduce spurious errors. In this paper, we present the first technique for verification-preserving inlining in automatic separation logic verifiers. We identify a semantic condition on programs and prove in Isabelle/HOL that it ensures verification-preserving inlining for state-of-the-art automatic separation logic verifiers. We also prove a dual result: successful verification of the inlined program ensures that there are method and loop annotations that enable the verification of the original program for bounded executions. To check our semantic condition automatically, we present two approximations that can be checked syntactically and with a program verifier, respectively. We implement these checks in Viper and demonstrate that they are effective for non-trivial examples from different verifiers.
翻译:错误的核查被证明有助于检测错误和增强对程序正确性的信心。 与无限制的核查相反, 有关通过( 锁定的) 内衬自动和通过( 锁定的) 滚动循环电话的推理并不要求方法规格和循环变异性, 因此, 将批注管理降低到最起码的值, 即要核查的属性的规格。 对于基于传统程序逻辑的校验者, 以内衬( 和不滚动) 的方式保存核查: 成功无限制地核查一个程序 w.r.t. 一些说明意味着对内嵌程序的成功核查。 也就是说, 在线内嵌的程序中发现的任何错误都揭示了初始程序的正确错误。 然而, 这种基本属性对于自动分离逻辑校正的校验程序可能没有保留住, 例如Caper、 GramSSclipper、 RefindicedC、 Steet、 VeriFast, 以及基于Vifer的校验程序。 在这种设置中, 通常的校验方法可以改变它所拥有的资源, 这可能会影响自动校正搜索算算算算和引入错误。 在这个文件中, 我们的校正的校正的逻辑程序在测试中, 。</s>