arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2210.02428cs.LO
收藏

Gradual C0:面向渐进式验证的符号执行

Gradual C0: Symbolic Execution for Gradual Verification

Jenna DiVincenzo, Ian McCormack, Hemant Gouni, Jacob Gorenburg, Jan-Paul Ramos-Dávila, Mona Zhang, Conrad Zimmerman, Joshua Sunshine, Éric Tanter, Jonathan Aldrich

AI总结:

本文提出首个实用的递归堆数据结构渐进式验证器 Gradual C0,以符号执行为核心并减少动态检查插入,实证显示其平均运行时开销较完全动态方法降低11%至34%。

摘要:

当前的静态验证技术支持广泛的程序。然而,这类技术只支持完整且详细的规约,给用户带来了不应有的负担。为了解决这一问题,先前工作提出了渐进式验证,它通过可靠地结合静态检查与动态检查来处理完整、部分或缺失的规约。渐进式验证也已被扩展到操作堆上递归、可变数据结构的程序。遗憾的是,这种扩展并不会在规约被细化时以减少动态检查的方式回馈用户。事实上,无论是否存在任何静态保证,所有性质都会被动态检查。此外,迄今尚不存在功能完备的渐进式验证实现,这阻碍了在实践中研究其性能与适用性。我们提出 Gradual C0,这是首个适用于递归堆数据结构的实用渐进式验证器,面向 C0——一种为教学设计的 C 语言安全子集。支持分离逻辑或隐式动态帧的静态验证器使用符号执行进行推理;因此,扩展自此类验证器之一的 Gradual C0 在其核心采用符号执行,而不是先前工作中使用的最弱宽松前置条件方法。我们的方法解决了与使用不精确规约的符号执行、堆所有权以及程序语句和规约公式两者中的分支相关的技术挑战。我们还处理了与尽量减少动态检查插入以及向 C0 之外其他编程语言扩展相关的挑战。最后,我们提供了首个渐进式验证器的实证性能评估,并发现与先前工作中使用的完全动态方法相比,Gradual C0 平均将运行时开销降低了 11%至34%。此外,性能的最坏情况场景是可预测且可避免的。

英文摘要:

Current static verification techniques support a wide range of programs. However, such techniques only support complete and detailed specifications, which places an undue burden on users. To solve this problem, prior work proposed gradual verification, which handles complete, partial, or missing specifications by soundly combining static and dynamic checking. Gradual verification has also been extended to programs that manipulate recursive, mutable data structures on the heap. Unfortunately, this extension does not reward users with decreased dynamic checking as specifications are refined. In fact, all properties are checked dynamically regardless of any static guarantees. Additionally, no full-fledged implementation of gradual verification exists so far, which prevents studying its performance and applicability in practice. We present Gradual C0, the first practicable gradual verifier for recursive heap data structures, which targets C0, a safe subset of C designed for education. Static verifiers supporting separation logic or implicit dynamic frames use symbolic execution for reasoning; so Gradual C0, which extends one such verifier, adopts symbolic execution at its core instead of the weakest liberal precondition approach used in prior work. Our approach addresses technical challenges related to symbolic execution with imprecise specifications, heap ownership, and branching in both program statements and specification formulas. We also deal with challenges related to minimizing insertion of dynamic checks and extensibility to other programming languages beyond C0. Finally, we provide the first empirical performance evaluation of a gradual verifier, and found that on average, Gradual C0 decreases run-time overhead between 11-34% compared to the fully-dynamic approach used in prior work. Further, the worst-case scenarios for performance are predictable and avoidable.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑