Context-Aware Separation Logic

07/28/2023
by   Roland Meyer, et al.
0

Separation logic is often praised for its ability to closely mimic the locality of state updates when reasoning about them at the level of assertions. The prover only needs to concern themselves with the footprint of the computation at hand, i.e., the part of the state that is actually being accessed and manipulated. Modern concurrent separation logics lift this local reasoning principle from the physical state to abstract ghost state. For instance, these logics allow one to abstract the state of a fine-grained concurrent data structure by a predicate that provides a client the illusion of atomic access to the underlying state. However, these abstractions inadvertently increase the footprint of a computation: when reasoning about a local low-level state update, one needs to account for its effect on the abstraction, which encompasses a possibly unbounded portion of the low-level state. Often this gives the reasoning a global character. We present context-aware separation logic (CASL) to provide new opportunities for local reasoning in the presence of rich ghost state abstractions. CASL introduces the notion of a context of a computation, the part of the concrete state that is only affected on the abstract level. Contexts give rise to a new proof rule that allows one to reduce the footprint by the context, provided the computation preserves the context as an invariant. The context rule complements the frame rule of separation logic by enabling more local reasoning in cases where the predicate to be framed is known in advance. We instantiate our developed theory for the flow framework, which enables local reasoning about global properties of heap graphs. We then use the instantiation to obtain a fully local proof of functional correctness for a sequential binary search tree implementation that is inspired by fine-grained concurrent search structures.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
07/05/2022

A Concurrent Program Logic with a Future and History

Verifying fine-grained optimistic concurrent programs remains an open pr...
research
11/09/2017

Go with the Flow: Compositional Abstractions for Concurrent Data Structures (Extended Version)

Concurrent separation logics have helped to significantly simplify corre...
research
10/23/2020

On Algebraic Abstractions for Concurrent Separation Logics

Concurrent separation logic is distinguished by transfer of state owners...
research
04/10/2023

Make flows small again: revisiting the flow framework

We present a new flow framework for separation logic reasoning about pro...
research
01/17/2019

TaDA Live: Compositional Reasoning for Termination of Fine-grained Concurrent Programs

We introduce TaDA Live, a separation logic for reasoning compositionally...
research
11/19/2019

Local Reasoning for Global Graph Properties

Separation logics are widely used for verifying programs that manipulate...
research
05/23/2022

Sound Automation of Magic Wands (extended version)

The magic wand -* (also called separating implication) is a separation l...

Please sign up or login with your details

Forgot password? Click here to reset