Skip to main content
QUICK REVIEW

[Paper Review] Exact Separation Logic (Extended Version)

Petar Maksimović, Caroline Cronjäger|arXiv (Cornell University)|Aug 15, 2022
Software Testing and Debugging TechniquesComputer Science2 citations
TL;DR

This paper introduces Exact Separation Logic (ESL), a novel program logic that unifies verification and true bug-finding by ensuring all terminating behaviors are characterized and all established results and errors are reachable. ESL achieves soundness with mutually recursive functions and proves function compositionality for under-approximating logics, enabling tractable, abstract specifications for critical heap-manipulating code.

ABSTRACT

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 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.

Motivation & Objective

  • To bridge the gap between verification (over-approximating) and true bug-finding (under-approximating) in program logic.
  • To develop a logic that ensures all terminating behaviors are characterized and all results/errors are reachable, combining the strengths of both paradigms.
  • To prove function compositionality for an under-approximating logic, a key challenge previously unresolved in incorrectness logic.
  • To explore the role of abstraction in under-approximating reasoning, distinguishing it from over-approximation.
  • To demonstrate the feasibility of using ESL for self-contained, critical code such as data-structure libraries with precise, reusable specifications.

Proposed method

  • Propose Exact Separation Logic (ESL) as a new program logic combining over-approximating and under-approximating features.
  • Define function specifications in ESL that are both sound and fully reachable, ensuring all results and errors are true.
  • Prove soundness of ESL for mutually recursive functions, establishing the first compositional reasoning framework for under-approximating logics.
  • Introduce subtle distinctions between internal and external function specifications in UX logics, differing from standard OX logic definitions.
  • Develop abstract ESL specifications for data-structure algorithms, demonstrating abstraction without over-approximation.
  • Use symbolic execution and frame reasoning to verify complex heap-manipulating code, including BST insertion and list-length algorithms.

Experimental results

Research questions

  • RQ1Can a program logic be designed that simultaneously supports full characterization of terminating behavior and full reachability of results and errors?
  • RQ2Is function compositionality achievable in an under-approximating logic, and if so, how must specification definitions differ from over-approximating logics?
  • RQ3How can abstraction be meaningfully applied in under-approximating logics without losing information or compromising reachability?
  • RQ4What is the role of the frame property and locality in under-approximating reasoning, and how do they interact with reachability guarantees?
  • RQ5Can ESL be used to specify self-contained, critical code with tractable, reusable specifications suitable for both verification and true bug-finding?

Key findings

  • ESL achieves soundness for mutually recursive functions, proving for the first time that function compositionality is possible in an under-approximating logic.
  • The paper establishes that internal and external function specifications in UX logics require fundamentally different definitions than in OX logics, due to the absence of forward consequence and the need to preserve reachability.
  • Abstraction in UX logics cannot be used as freely as in OX logics, as it must preserve information rather than allow information loss, highlighting a key distinction between hiding information and over-approximating.
  • The authors successfully verify abstract ESL specifications for data-structure algorithms, demonstrating that precise, reusable, and tractable specifications are feasible for critical code.
  • The list-length and BST insertion examples show that ESL supports symbolic reasoning with reachability guarantees, enabling both verification and true bug-finding in the same framework.
  • The extended version on arXiv (arXiv:2208.07200) provides full proofs and detailed case studies, confirming the practical viability of ESL in real-world verification scenarios.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.