论文标题
确切的分离逻辑(扩展版本)
Exact Separation Logic (Extended Version)
论文作者
论文摘要
过度评价(OX)程序逻辑(例如分离逻辑(SL))用于验证堆型操纵程序的属性:所有终止行为均表征,但是建立的结果和错误不必达到。因此,OX功能规格与符号执行工具(例如脉冲和脉冲-X)支持的真正错误调查不兼容。相反,使用不足的(UX)程序逻辑(例如不正确的分离逻辑)来查找真实的结果和错误:已建立的结果和错误是可以达到的,但是没有理解所有终止行为是否已表征的机制。 我们介绍了精确的分离逻辑(ESL),该逻辑(ESL)提供了与OX验证和UX True Bug资金兼容的完全验证的函数规格:所有终止行为均表征,并且所有已建立的结果和错误都是可达到的。我们证明了具有相互递归函数的ESL的合理性,这是UX逻辑首次证明功能组成性。我们表明,与OX逻辑的熟悉的定义相比,UX程序逻辑需要对内部和外部功能规范的微妙定义。我们通过验证各种数据结构算法的抽象ESL规范来研究ESL的表现性,并首次研究了抽象在UX推理中的作用。在此过程中,我们强调了抽象(隐藏信息)和过度评价(丢失信息)之间的区别。我们的发现表明,预期的是,抽象不能像OX逻辑中一样自由地用作UX逻辑中的自由使用,但也应该使用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.