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.
翻译:超超常( OX) 程序逻辑, 例如 偏差( SL), 用于核查 堆积管理程序 的特性 : 所有终止行为都有特征, 但是没有机制可以理解 。 我们引入了精确的分离逻辑( ESL), 它提供了与 OX 核查和 UX 真正错误供资兼容的完全核查功能规格: 所有终止行为都具有特征, 并且所有既定结果和错误都可以实现。 相反, 偏差( UX) 程序逻辑, 例如不正确的分离逻辑, 被用来寻找真实的结果和错误: 已经确立的结果和错误是可以实现的, 但是如果所有终止行为都有特征的话, 就没有机制可以理解 。 我们引入精确的分离逻辑( ESL ), 提供与 OX 核查和 UX 真正错误供资的完全核查功能: 所有的终止行为都具有特征, 并且所有既定结果和错误都可以实现。 我们证明 ESL 具有相互递解的功能( ), 首次显示UX 逻辑的功能是可行的 。 我们的逻辑 。 我们的逻辑逻辑需要精确定义 和外部的, 和外部功能 。</s>