arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2208.07200cs.LOcs.PL
收藏

精确分离逻辑(扩展版)

Exact Separation Logic (Extended Version)

Petar Maksimović, Caroline Cronjäger, Andreas Lööw, Julian Sutherland, Philippa Gardner

AI总结:

本文提出精确分离逻辑(ESL),一种既能验证所有终止行为又能确保结果可达的逻辑,首次实现 UX 逻辑的函数组合性,并探讨了抽象在 UX 推理中的作用。

摘要:

过度近似(OX)程序逻辑,如分离逻辑(SL),用于验证操作堆内存的程序的属性:所有终止行为都被刻画,但已建立的结果和错误不一定可达。因此,OX 函数规范与诸如 Pulse 和 Pulse-X 等符号执行工具所支持的真实错误查找不兼容。相反,欠近似(UX)程序逻辑,如不正确性分离逻辑,用于查找真实结果和错误:已建立的结果和错误是可达的,但没有机制来理解是否所有终止行为都已被刻画。我们引入了精确分离逻辑(ESL),它提供了完全验证的函数规范,既兼容 OX 验证,也兼容 UX 真实错误查找:所有终止行为都被刻画,且所有已建立的结果和错误都是可达的。我们证明了 ESL 对相互递归函数的可靠性,首次展示了 UX 逻辑的函数组合性。我们表明,与 OX 逻辑中熟悉的定义相比,UX 程序逻辑需要更细致的内部和外部函数规范定义。我们研究了 ESL 的表达能力,并首次探索了抽象在 UX 推理中的作用,通过验证各种数据结构算法的抽象 ESL 规范。在此过程中,我们强调了抽象(隐藏信息)与过度近似(丢失信息)之间的区别。我们的发现表明,正如预期,抽象在 UX 逻辑中不能像在 OX 逻辑中那样自由使用,但使用 ESL 为自包含的关键代码提供可处理的函数规范应该是可行的,这些规范将同时用于验证和真实错误查找。

英文摘要:

Over-approximating (OX) program logics, such as separation logic (SL), are used for verifying properties of heap-manipulating programs: all terminating behaviour is characterised, but established results and errors need not be reachable. OX function specifications are thus incompatible with true bug-finding supported by symbolic execution tools such as Pulse and Pulse-X. In contrast, under-approximating (UX) program logics, such as incorrectness separation logic, are used to find true results and bugs: established results and errors are reachable, but there is no mechanism for understanding if all terminating behaviour has been characterised. We introduce exact separation logic (ESL), which provides fully-verified function specifications compatible with both OX verification and UX true bug-funding: all terminating behaviour is characterised, and all established results and errors are reachable. We prove soundness for ESL with mutually recursive functions, demonstrating, for the first time, function compositionality for a UX logic. We show that UX program logics require subtle definitions of internal and external function specifications compared with the familiar definitions of OX logics. We investigate the expressivity of ESL and, for the first time, explore the role of abstraction in UX reasoning by verifying abstract ESL specifications of various data-structure algorithms. In doing so, we highlight the difference between abstraction (hiding information) and over-approximation (losing information). Our findings demonstrate that, expectedly, abstraction cannot be used as freely in UX logics as in OX logics, but also that it should be feasible to use ESL to provide tractable function specifications for self-contained, critical code, which would then be used for both verification and true bug-finding.

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

↑