一句话:提出 LIV 工具,将循环不变式验证拆分为无循环直线程序上的验证任务,从而更实用地检查不变式是否足以构成归纳安全证明。
软件验证中,循环不变式的验证相对构造更易自动化,但判断验证器给出的不变式是否足以建立归纳安全证明仍具挑战。LIV 采用程序级分治:把原程序拆分为多个更小的无循环直线程序,形成更简单的验证任务;关键是不把验证条件编码为 SMT 等逻辑公式,而是生成为原语言程序,因而可复用任意现成验证器。若验证失败,还能定位哪些直线程序对应的证明部分出错。作者在合适基准上评估了该方法的有效性。
Validation of program invariants (a.k.a. correctness witnesses) is an established procedure in software verification. There are steady advances in verification of more and more complex software systems, but coming up with good loop invariants remains the central task of many verifiers. While it often requires large amounts of computation to construct safe and inductive invariants, they are more easy to automatically validate. We propose LIV, a new tool for loop-invariant validation, which makes it more practical to check if the invariant produced by a verifier is sufficient to establish an inductive safety proof. The main idea is to apply divide-and-conquer on the program level: We split the program into smaller, loop-free programs (a.k.a. straight-line programs) that form simpler verification tasks. Because the verification conditions are not encoded in logic syntax (such as SMT), but as programs in the language of the original program, any off-the-shelf verifier can be used to verify the generated straight-line programs. In case the validation fails, useful information can be extracted about which part of the proof failed (which straight-line programs are wrong). We show that our approach works by evaluating it on a suitable benchmark. Supplementary website: https://www.sosy-lab.org/research/liv/