Sound Automation of Magic Wands (extended version)

05/23/2022
by   Thibault Dardinier, et al.
0

The magic wand -* (also called separating implication) is a separation logic connective commonly used to specify properties of partial data structures, for instance during iterative traversals. A footprint of a magic wand formula A -* B is a state that, combined with any state in which A holds, yields a state in which B holds. The key challenge of proving a magic wand (also called packaging a wand) is to find such a footprint. Existing package algorithms either have a high annotation overhead or, as we show in this paper, are unsound. We present a formal framework that precisely characterises a wide design space of possible package algorithms applicable to a large class of separation logics. We prove in Isabelle/HOL that our formal framework is sound and complete, and use it to develop a novel package algorithm that offers competitive automation and is sound. Moreover, we present a novel, restricted definition of wands and prove in Isabelle/HOL that it is possible to soundly combine fractions of such wands, which is not the case for arbitrary wands. We have implemented our techniques for the Viper language, and demonstrate that they are effective in practice.

READ FULL TEXT
research
01/24/2023

Hyper Hoare Logic: (Dis-)Proving Program Hyperproperties (extended version)

Hoare logics are proof systems that allow one to formally establish prop...
research
08/03/2021

Owicki-Gries Reasoning for C11 Programs with Relaxed Dependencies (Extended Version)

Deductive verification techniques for C11 programs have advanced signifi...
research
09/27/2022

Embedding Hindsight Reasoning in Separation Logic

Proving linearizability of concurrent data structures remains a key chal...
research
08/31/2019

VST-A: A Foundationally Sound Annotation Verifier

An interactive program verification tool usually requires users to write...
research
11/29/2021

A Separation Logic for Negative Dependence

Formal reasoning about hashing-based probabilistic data structures often...
research
07/28/2023

Context-Aware Separation Logic

Separation logic is often praised for its ability to closely mimic the l...

Please sign up or login with your details

Forgot password? Click here to reset