Table of Contents
Fetching ...

Incorrectness Separation Logic with Arrays and Pointer Arithmetic

Yeonseok Lee, Koji Nakazawa

TL;DR

This paper extends Incorrectness Separation Logic (ISL) to support variable-length array predicates and pointer arithmetic, enabling precise bug-finding in heap-manipulating programs that manipulate arrays. It achieves this by defining a weakest postcondition framework $\textsf{WPO}[\![P,\mathbb{C},\epsilon]\!]$ and a corresponding generating function $\textsf{wpo}$ to compute postconditions for heap operations, while employing a block-based memory model and canonical forms to handle arithmetic and array predicates. The authors prove the relative completeness of the extended ISL by demonstrating the expressiveness of $\textsf{wpo}$ and showing that every valid ISL triple is derivable from $[P]\;\mathbb{C}\;[\epsilon:\;\textsf{wpo}(P,\mathbb{C},\epsilon)]$. This work connects ISL with existing array-separation logic research and sets the stage for future automation improvements, while highlighting the trade-off between expressiveness and the complexity of the proof rules.

Abstract

Incorrectness Separation Logic (ISL) is a proof system designed to automate verification and detect bugs in programs manipulating heap memories. In this study, we extend ISL to support variable-length array predicates and pointer arithmetic. Additionally, we prove the relative completeness of this extended ISL by constructing the weakest postconditions. Relative completeness means that all valid ISL triples are provable, assuming an oracle capable of checking entailment between formulas; this property ensures the reliability of the proof system.

Incorrectness Separation Logic with Arrays and Pointer Arithmetic

TL;DR

This paper extends Incorrectness Separation Logic (ISL) to support variable-length array predicates and pointer arithmetic, enabling precise bug-finding in heap-manipulating programs that manipulate arrays. It achieves this by defining a weakest postcondition framework and a corresponding generating function to compute postconditions for heap operations, while employing a block-based memory model and canonical forms to handle arithmetic and array predicates. The authors prove the relative completeness of the extended ISL by demonstrating the expressiveness of and showing that every valid ISL triple is derivable from . This work connects ISL with existing array-separation logic research and sets the stage for future automation improvements, while highlighting the trade-off between expressiveness and the complexity of the proof rules.

Abstract

Incorrectness Separation Logic (ISL) is a proof system designed to automate verification and detect bugs in programs manipulating heap memories. In this study, we extend ISL to support variable-length array predicates and pointer arithmetic. Additionally, we prove the relative completeness of this extended ISL by constructing the weakest postconditions. Relative completeness means that all valid ISL triples are provable, assuming an oracle capable of checking entailment between formulas; this property ensures the reliability of the proof system.

Paper Structure

This paper contains 66 sections, 11 theorems, 103 equations, 6 figures.

Key Result

lemma thmcounterlemma

$\psi \equiv \bigvee_{\normalfont\pi \in \textsf{cases}(T)}( \pi * \psi)$ holds for any $\psi$ and $T$.

Figures (6)

  • Figure 1: Proof Rules of ISL
  • Figure 2: Rules for Memory Allocation
  • Figure 3: Rules for Memory Deallocation
  • Figure 4: Rules for the other Memory Manipulation
  • Figure 5: $\normalfont\textsf{wpo}_\text{sh}$ for commands that do not manipulate heaps
  • ...and 1 more figures

Theorems & Definitions (32)

  • definition thmcounterdefinition: Assertions of ISL
  • definition thmcounterdefinition: $\normalfont\textsf{term}(t)$
  • definition thmcounterdefinition: $\normalfont\textsf{termS}(\psi)$ and $\normalfont\textsf{termS}^-(\psi)$
  • definition thmcounterdefinition: Conditions on the models and exact models
  • definition thmcounterdefinition: Term interpretation
  • definition thmcounterdefinition: Assertion semantics of ISL
  • definition thmcounterdefinition: Program Language $\normalfont\mathbb{C}\in \textsc{Comm}$
  • definition thmcounterdefinition: $\normalfont\textsf{termC}(\mathbb{C})$
  • definition thmcounterdefinition: The set of terms modified by $\mathbb{C}$, $\normalfont\textsf{mod}(\mathbb{C})$
  • definition thmcounterdefinition: Denotational semantics of ISL
  • ...and 22 more