Verifying Graph Algorithms in Separation Logic: A Case for an Algebraic Approach (Extended Version)

📅 2025-01-23
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
Formal verification of graph algorithms—particularly those involving intricate pointer manipulations—in separation logic remains challenging due to the difficulty of abstracting low-level heap structures while preserving semantic precision. Method: This paper introduces an algebraic modeling approach: it is the first to represent graph structures as partial commutative monoids and, grounded in category theory, designs structure-preserving higher-order morphisms and combinators that jointly encode pointer-operation semantics and abstract graph reasoning. Contribution/Results: The method enables natural divide-and-conquer verification and significantly simplifies separation logic proof rules. Applied to the Schorr–Waite graph-marking algorithm, it yields a concise, modular, and reusable formal verification—eliminating reliance on complex loop invariants and fine-grained pointer tracking. This advances the abstraction level, scalability, and engineering practicality of graph algorithm verification.

Technology Category

Application Category

📝 Abstract
Specifying and verifying graph-manipulating programs is a well-known and persistent challenge in separation logic. We show that the obstacles in dealing with graphs are removed if one represents graphs as partial commutative monoids, and admits applying over them structure-preserving functions (i.e., morphisms), including higher-order ones (i.e., combinators). By distributing over the monoid operations, morphisms work in tandem with framing to propagate the low-level pointer manipulation to the more abstract level of mathematical graphs, and to reduce the reasoning about the whole graph to reasoning about sub-components. We illustrate the approach with a novel and concise proof of a well-known graph benchmark, the Schorr-Waite graph marking algorithm.
Problem

Research questions and friction points this paper is trying to address.

Separation Logic
Graph Manipulating Programs
Pointer Operations
Innovation

Methods, ideas, or system contributions that make the work stand out.

Partial Order Semigroups
Morphism Functions
Separation Logic
🔎 Similar Papers
No similar papers found.
M
Marcos Grandury
IMDEA Software Institute and Universidad PolitĂŠcnica de Madrid, Spain
Aleksandar Nanevski
Aleksandar Nanevski
IMDEA Software Institute
Logic and Programming Languages
A
Alexander Gryzlov
IMDEA Software Institute, Spain