DeepAI AI Chat
Log In Sign Up

Sound Automation of Magic Wands (extended version)

by   Thibault Dardinier, et al.
ETH Zurich
The University of British Columbia

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.


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

Hoare logics are proof systems that allow one to formally establish prop...

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

Deductive verification techniques for C11 programs have advanced signifi...

Embedding Hindsight Reasoning in Separation Logic

Proving linearizability of concurrent data structures remains a key chal...

VST-A: A Foundationally Sound Annotation Verifier

An interactive program verification tool usually requires users to write...

A Separation Logic for Negative Dependence

Formal reasoning about hashing-based probabilistic data structures often...

Context-Aware Separation Logic

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