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

关键软件的半自动化模块化形式验证:活性和完备性阈值

Semi-Automated Modular Formal Verification of Critical Software: Liveness and Completeness Thresholds

Tobias Reinhard

AI总结:

本论文提出两项贡献:一是用于公平调度下忙等待程序终止性验证的分离逻辑,二是将有界内存安全证明简化为有界证明的完备性阈值概念,并刻画了数组遍历程序的阈值。

摘要:

在本论文中,我们描述了对活性和安全性推理现状的两项贡献。多处理器机器的程序通常通过忙等待进行同步。我们提出了第一个用于在公平调度下模块化验证此类程序终止性的分离逻辑。我们的逻辑要求证明作者为每个忙等待循环关联一个幽灵信号,并允许此类循环在其对应信号 $s$ 未设置时进行迭代。证明作者还需定义信号上的良基序,并证明如果循环线程持有设置信号 $s'$ 的义务,则 $s'$ 排在 $s$ 之上。通过使用常规的共享状态不变量将幽灵信号的状态与数据结构的状态关联起来,可以验证在任意数据结构上忙等待任意条件的程序。此外,我们提出了有界内存安全证明的完备性阈值的首次研究。具体而言,我们考虑在数组上迭代而不分配或释放内存的堆操作程序。在此设置中,我们首次提出了程序验证的完备性阈值概念,将无界内存安全证明简化为有界证明。此外,我们证明了可以为简单类别的数组遍历程序刻画完备性阈值。最后,我们提出了在理论上扩展该技术的研究途径,即扩展到更大类别的程序(堆操作、树状数据结构),并通过强调自动化机会在实践上扩展该技术。

英文摘要:

In this dissertation we describe two contributions to the state of the art in reasoning about liveness and safety, respectively. Programs for multiprocessor machines commonly perform busy waiting for synchronization. We propose the first separation logic for modularly verifying termination of such programs under fair scheduling. Our logic requires the proof author to associate a ghost signal with each busy-waiting loop and allows such loops to iterate while their corresponding signal $s$ is not set. The proof author further has to define a well-founded order on signals and to prove that if the looping thread holds an obligation to set a signal $s'$, then $s'$ is ordered above $s$. By using conventional shared state invariants to associate the state of ghost signals with the state of data structures, programs busy-waiting for arbitrary conditions over arbitrary data structures can be verified. Moreover, we present the first study of completeness thresholds for bounded memory safety proofs. Specifically, we consider heap-manipulating programs that iterate over arrays without allocating or freeing memory. In this setting, we present the first notion of completeness thresholds for program verification which reduce unbounded memory safety proofs to bounded ones. Furthermore, we demonstrate that we can characterise completeness thresholds for simple classes of array traversing programs. Finally, we suggest avenues of research to scale this technique theoretically, i.e., to larger classes of programs (heap manipulation, tree-like data structures), and practically by highlighting automation opportunities.

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

↑