Current static verification techniques such as separation logic 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 practical gradual verifier for recursive heap data structures, which targets C0, a safe subset of C designed for education. To minimize insertion of dynamic checks and support efficiency, Gradual C0 adopts symbolic execution at its core, instead of the backwards reasoning of weakest liberal preconditions 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. Finally, we provide the first empirical performance evaluation of a gradual verifier, and found that on average, Gradual C0 decreases run-time overhead between 50-90% compared to the fully-dynamic approach used in prior work. Further, the worst-case scenarios for performance are predictable and avoidable. This work paves the way towards evaluating gradual verification at scale.
翻译:目前静态的核查技术,例如分离逻辑,支持了一系列广泛的程序。然而,这种技术只支持完整和详细的规格,给用户带来过重的负担。为了解决这个问题,先前的工作建议逐步核查,通过稳妥地结合静态和动态的检查,处理完整、部分或缺失的规格; 逐步核查还扩大到操纵堆积上循环变异数据结构的程序; 不幸的是,这种延长并不奖励因规格的改进而减少动态检查的用户; 事实上,所有财产都被动态地检查,而不论任何静态的保证。 此外,迄今没有全面实施渐进核查,从而无法研究其绩效和适用性。 我们提出了渐进式C0,这是对循环式重现的快速数据结构的第一个实际渐进式的逐步核查,目标是C0,这是为教育设计的安全的C分组。为了尽量减少动态检查和支持效率,Gradualal C0在核心中采用象征性执行,而不是在先前工作中采用的最弱自由前提的倒推理。我们的方法是解决与象征性执行有关的技术挑战,第一次规格、高压所有权和分处,从而无法研究其实际性地在实际操作的50级的进度表化性化的进度表,最后的校验,我们发现,在逐步的进度的进度的C工作上,在逐步的校验算法中,在逐步的进度上,在逐步的进度的进度上,在逐步的进度上,在逐步的进度的进度上,在逐步的进度上找到了。