Verifying Graph Algorithms in Separation Logic: A Case for an Algebraic Approach

  • Abstract
  • References
  • Similar Papers
Abstract
Translate article icon Translate Article Star icon
Take notes icon Take Notes

Verifying graph algorithms has long been considered challenging in separation logic, mainly due to structural sharing between graph subcomponents. We show that these challenges can be effectively addressed by representing graphs as a partial commutative monoid (PCM), and by leveraging structure-preserving functions (PCM morphisms), including higher-order combinators. PCM morphisms are important because they generalize separation logic's principle of local reasoning. While traditional framing isolates relevant portions of the heap only at the top level of a specification, morphisms enable contextual localization: they distribute over monoid operations to isolate relevant subgraphs, even when nested deeply within a specification. We demonstrate the morphisms' effectiveness with novel and concise verifications of two canonical graph benchmarks: the Schorr-Waite graph marking algorithm and the union-find data structure.

ReferencesShowing 10 of 49 papers
  • Open Access Icon
  • Cite Count Icon 12
  • 10.1007/3-540-08342-1_32
On backtracking and greatest fixpoints
  • Jan 1, 1977
  • Willem P De Roever

  • Cite Count Icon 7
  • 10.1007/978-3-540-69061-0_15
The Schorr-Waite-Algorithm
  • Jan 1, 2007
  • Richard Bubel

  • Cite Count Icon 173
  • 10.1007/10722010_8
Proving Pointer Programs in Hoare Logic
  • Jan 1, 2000
  • Richard Bornat

  • Cite Count Icon 40
  • 10.1145/1292535.1292541
A persistent union-find data structure
  • Oct 2, 2007
  • Sylvain Conchon + 1 more

  • Open Access Icon
  • Cite Count Icon 220
  • 10.1145/363534.363554
An efficient machine-independent procedure for garbage collection in various list structures
  • Aug 1, 1967
  • Communications of the ACM
  • H Schorr + 1 more

  • Open Access Icon
  • Cite Count Icon 44
  • 10.1007/s10817-017-9431-7
Verifying the Correctness and Amortized Complexity of a Union-Find Implementation in Separation Logic with Time Credits
  • Sep 22, 2017
  • Journal of Automated Reasoning
  • Arthur Charguéraud + 1 more

  • 10.1007/978-3-319-11737-9_10
Pointer Program Derivation Using Coq: Graphs and Schorr-Waite Algorithm
  • Jan 1, 2014
  • Jean-François Dufourd

  • Cite Count Icon 62
  • 10.1145/1706299.1706331
Structuring the verification of heap-manipulating programs
  • Jan 17, 2010
  • Aleksandar Nanevski + 2 more

  • Open Access Icon
  • PDF Download Icon
  • Cite Count Icon 10
  • 10.1007/978-3-030-44914-8_12
Local Reasoning for Global Graph Properties
  • Jan 1, 2020
  • Programming Languages and Systems
  • Siddharth Krishna + 2 more

  • Cite Count Icon 1
  • 10.48550/arxiv.2205.15306
How to Compose Shortest Paths
  • May 27, 2022
  • Jade Master

Similar Papers
  • Research Article
  • Cite Count Icon 15
  • 10.1145/3547631
Later credits: resourceful reasoning for the later modality
  • Aug 29, 2022
  • Proceedings of the ACM on Programming Languages
  • Simon Spies + 6 more

In the past two decades, step-indexed logical relations and separation logics have both come to play a major role in semantics and verification research. More recently, they have been married together in the form of step-indexed separation logics like VST, iCAP, and Iris, which provide powerful tools for (among other things) building semantic models of richly typed languages like Rust. In these logics, propositions are given semantics using a step-indexed model, and step-indexed reasoning is reflected into the logic through the so-called “later” modality. On the one hand, this modality provides an elegant, high-level account of step-indexed reasoning; on the other hand, when used in sufficiently sophisticated ways, it can become a nuisance, turning perfectly natural proof strategies into dead ends. In this work, we introduce later credits , a new technique for escaping later-modality quagmires. By leveraging the second ancestor of these logics—separation logic—later credits turn “the right to eliminate a later” into an ownable resource, which is subject to all the traditional modular reasoning principles of separation logic. We develop the theory of later credits in the context of Iris, and present several challenging examples of proofs and proof patterns which were previously not possible in Iris but are now possible due to later credits.

  • Research Article
  • Cite Count Icon 7
  • 10.1016/j.entcs.2018.03.018
A Stone-type Duality Theorem for Separation Logic Via its Underlying Bunched Logics
  • Apr 1, 2018
  • Electronic Notes in Theoretical Computer Science
  • Simon Docherty + 1 more

Stone-type duality theorems, which relate algebraic and relational/topological models, are important tools in logic because — in addition to elegant abstraction — they strengthen soundness and completeness to a categorical equivalence, yielding a framework through which both algebraic and topological methods can be brought to bear on a logic. We give a systematic treatment of Stone-type duality theorems for the structures that interpret bunched logics, starting with the weakest systems, recovering the familiar Boolean BI, and concluding with Separation Logic. Our results encompass all the known existing algebraic approaches to Separation Logic and prove them sound with respect to the standard store-heap semantics. We additionally recover soundness and completeness theorems of the specific truth-functional models of these logics as presented in the literature. This approach synthesises a variety of techniques from modal, substructural and categorical logic and contextualises the ‘resource semantics’ interpretation underpinning Separation Logic amongst them. As a consequence, theory from those fields — as well as algebraic and topological methods — can be applied to both Separation Logic and the systems of bunched logics it is built upon. Conversely, the notion of indexed resource frame (generalizing the standard model of Separation Logic) and its associated completeness proof can easily be adapted to other non-classical predicate logics.

  • Research Article
  • Cite Count Icon 40
  • 10.1145/2480359.2429104
Views
  • Jan 23, 2013
  • ACM SIGPLAN Notices
  • Thomas Dinsdale-Young + 4 more

Compositional abstractions underly many reasoning principles for concurrent programs: the concurrent environment is abstracted in order to reason about a thread in isolation; and these abstractions are composed to reason about a program consisting of many threads. For instance, separation logic uses formulae that describe part of the state, abstracting the rest; when two threads use disjoint state, their specifications can be composed with the separating conjunction. Type systems abstract the state to the types of variables; threads may be composed when they agree on the types of shared variables. In this paper, we present the "Concurrent Views Framework", a metatheory of concurrent reasoning principles. The theory is parameterised by an abstraction of state with a notion of composition, which we call views. The metatheory is remarkably simple, but highly applicable: the rely-guarantee method, concurrent separation logic, concurrent abstract predicates, type systems for recursive references and for unique pointers, and even an adaptation of the Owicki-Gries method can all be seen as instances of the Concurrent Views Framework. Moreover, our metatheory proves each of these systems is sound without requiring induction on the operational semantics.

  • Conference Article
  • Cite Count Icon 140
  • 10.1145/2429069.2429104
Views
  • Jan 23, 2013
  • Thomas Dinsdale-Young + 4 more

Compositional abstractions underly many reasoning principles for concurrent programs: the concurrent environment is abstracted in order to reason about a thread in isolation; and these abstractions are composed to reason about a program consisting of many threads. For instance, separation logic uses formulae that describe part of the state, abstracting the rest; when two threads use disjoint state, their specifications can be composed with the separating conjunction. Type systems abstract the state to the types of variables; threads may be composed when they agree on the types of shared variables.In this paper, we present the Views Framework, a metatheory of concurrent reasoning principles. The theory is parameterised by an abstraction of state with a notion of composition, which we call views. The metatheory is remarkably simple, but highly applicable: the rely-guarantee method, concurrent separation logic, concurrent abstract predicates, type systems for recursive references and for unique pointers, and even an adaptation of the Owicki-Gries method can all be seen as instances of the Concurrent Views Framework. Moreover, our metatheory proves each of these systems is sound without requiring induction on the operational semantics.

  • Research Article
  • Cite Count Icon 13
  • 10.1145/3360587
Specifying concurrent programs in separation logic: morphisms and simulations
  • Oct 10, 2019
  • Proceedings of the ACM on Programming Languages
  • Aleksandar Nanevski + 3 more

In addition to pre- and postconditions, program specifications in recent separation logics for concurrency have employed an algebraic structure of resources —a form of state transition systems—to describe the state-based program invariants that must be preserved, and to record the permissible atomic changes to program state. In this paper we introduce a novel notion of resource morphism , i.e. structure-preserving function on resources, and show how to effectively integrate it into separation logic, using an associated notion of morphism-specific simulation . We apply morphisms and simulations to programs verified under one resource, to compositionally adapt them to operate under another resource, thus facilitating proof reuse.

  • Research Article
  • Cite Count Icon 5
  • 10.1145/3434286
On algebraic abstractions for concurrent separation logics
  • Jan 4, 2021
  • Proceedings of the ACM on Programming Languages
  • František Farka + 4 more

Concurrent separation logic is distinguished by transfer of state ownership upon parallel composition and framing. The algebraic structure that underpins ownership transfer is that of partial commutative monoids (PCMs). Extant research considers ownership transfer primarily from the logical perspective while comparatively less attention is drawn to the algebraic considerations. This paper provides an algebraic formalization of ownership transfer in concurrent separation logic by means of structure-preserving partial functions (i.e., morphisms) between PCMs, and an associated notion of separating relations. Morphisms of structures are a standard concept in algebra and category theory, but haven't seen ubiquitous use in separation logic before. Separating relations. are binary relations that generalize disjointness and characterize the inputs on which morphisms preserve structure. The two abstractions facilitate verification by enabling concise ways of writing specs, by providing abstract views of threads' states that are preserved under ownership transfer, and by enabling user-level construction of new PCMs out of existing ones.

  • Book Chapter
  • Cite Count Icon 3
  • 10.1007/978-3-642-04639-1_5
Towards Algebraic Separation Logic
  • Jan 1, 2009
  • Han-Hing Dang + 2 more

We present an algebraic approach to separation logic. In particular, we give algebraic characterisations for all constructs of separation logic. The algebraic view does not only yield new insights on separation logic but also shortens proofs and enables the use of automated theorem provers for verifying properties at a more abstract level.

  • Research Article
  • Cite Count Icon 27
  • 10.1016/j.jlap.2011.04.003
Algebraic separation logic
  • Apr 13, 2011
  • The Journal of Logic and Algebraic Programming
  • H.-H Dang + 2 more

Algebraic separation logic

  • Book Chapter
  • Cite Count Icon 2
  • 10.1007/978-3-030-76920-8_5
An Algebraic Glimpse at Bunched Implications and Separation Logic
  • Dec 14, 2021
  • Peter Jipsen + 1 more

We overview the logic of Bunched Implications (BI) and Separation Logic (SL) from a perspective inspired by Hiroakira Ono’s algebraic approach to substructural logics. We propose generalized BI algebras (GBI-algebras) as a common framework for algebras arising via “declarative resource reading”, intuitionistic generalizations of relation algebras and arrow logics and the distributive Lambek calculus with intuitionistic implication. Apart from existing models of BI (in particular, heap models and effect algebras), we also cover models arising from weakening relations, formal languages or more fine-grained treatment of labelled trees and semistructured data. After briefly discussing the lattice of subvarieties of \(\mathsf {GBI}\), we present a suitable duality for \(\mathsf {GBI}\) along the lines of Esakia and Priestley and an algebraic proof of cut elimination in the setting of residuated frames of Galatos and Jipsen. We also show how the algebraic approach allows generic results on decidability, both positive and negative ones. In the final part of the paper, we gently introduce the substructural audience to some theory behind state-of-art tools, culminating with an algebraic and proof-theoretic presentation of (bi-) abduction.

  • Research Article
  • Cite Count Icon 16
  • 10.1016/j.entcs.2008.10.022
Higher-Order Separation Logic in Isabelle/HOLCF
  • Oct 1, 2008
  • Electronic Notes in Theoretical Computer Science
  • Carsten Varming + 1 more

Higher-Order Separation Logic in Isabelle/HOLCF

  • Book Chapter
  • Cite Count Icon 3
  • 10.1007/978-3-642-27269-1_6
A Separation Logic for OO Programs
  • Jan 1, 2012
  • Liu Yijing + 1 more

We present a general storage model that reflects features of object oriented (OO) languages with pure reference semantics. Based on this model, we develop an OO Separation Logic (OOSL) to specify and verify OO programs. Many inference rules in the Separation Logic still hold in OOSL. Additionally, OOSL has certain properties important to OO reasoning. We introduce Hoare-Triple for a small OO language, and use the Schorr-Waite Marking Algorithm as a verification example.

  • Research Article
  • Cite Count Icon 96
  • 10.2307/2215113
Frege, The Tractatus, and the Logocentric Predicament
  • Mar 1, 1985
  • Noûs
  • Thomas G Ricketts

The principles of logic are, let us remember, the principles of valid reasoning that set the standards of consistency. Inquiry into any subject matter whatsoever draws implicitly on these principles and must conform to these standards on pain of incoherence. Logic then has a privileged position among the sciences, and this position raises two questions. First, what is the subject matter of logic; what content for logical principles does justice to their role in setting standards of consistency? Second, from what vantage point are we able to isolate and elucidate the basic notions that enter into the formulation of logic? These questions become all the more pressing, once the study of logic is separated sharply from empirical psychological investigations of human cognition. The magnitude of Frege's innovation in logic makes him acutely aware of the logocentric predicament. Frege puts forward his begriffsschrift as a formulation of the principles of valid reasoning. In developing a conception of logic that supports this identification, Frege addresses the issues raised by the logocentric predicament. Indeed, an examination of Frege's conception of logic can serve to clarify those issues. However, in the end, this conception of logic is unsatisfactory. For there are deep tensions between Frege's official construal of the content of the axioms of the begriffsschrift, and his view of judgment that underlies the identification of the begriffsschrift as logic. Wittgenstein's Tractatus is, in large measure, a response to these tensions in Frege's thought. Wittgenstein largely

  • Research Article
  • Cite Count Icon 1
  • 10.2307/2185121
Change in View: Principles of Reasoning.
  • Oct 1, 1989
  • The Philosophical Review
  • Richard Feldman + 1 more

Change in View offers an entirely original approach to the philosophical study of reasoning by identifying principles of reasoning with principles for revising one's beliefs and intentions and not with principles of logic. This crucial observation leads to a number of important and interesting consequences that impinge on psychology and artificial intelligence as well as on various branches of philosophy, from epistemology to ethics and action theory.

  • Book Chapter
  • Cite Count Icon 61
  • 10.1017/cbo9780511814273.003
Change in View: Principles of Reasoning
  • May 5, 2008
  • Gilbert Harman

Change in View offers an entirely original approach to the philosophical study of reasoning by identifying principles of reasoning with principles for revising one's beliefs and intentions and not with principles of logic. This crucial observation leads to a number of important and interesting consequences that impinge on psychology and artificial intelligence as well as on various branches of philosophy, from epistemology to ethics and action theory.

  • Research Article
  • Cite Count Icon 3
  • 10.4314/sajpem.v22i3.31373
How “rational” is “rationality”?
  • Jan 1, 2003
  • South African Journal of Philosophy
  • Daniël F.M Strauss

By taking serious a remark once made by Paul Bernays, namely that an account of the nature of rationality should begin with concept-formation, this article sets out to uncover both the restrictive and the expansive boundaries of rationality. In order to do this some implications of the perennial philosophical problem of the “coherence of irreducibles” will be related to the acknowledgement of primitive terms and of their indefinability. Some critical remarks will be articulated in connection with an over-estimation of rationality - concerning the influence of Kant’s view of human understanding as the formal law-giver of nature (the supposedly “rational structure of the world”), and the apparently innocent (subjectivist) habit to refer to experiential entities as ‘objects’. The other side of the coin will be highlighted with reference to those kinds of knowledge transcending the limits of concept-formation - culminating in formulating the four most basic idea-statements philosophy can articulate about the universe. What is found “in-between” these (restrictive) and (expansive) boundaries of rationality will then briefly be placed within the contours of a threefold perspective on the self-insufficiency of logicality - as merely one amongst many more dimensions conditioning human life. Although the meaning of the most basic logical principles - such as the logical principles of identity, non-contradiction and sufficient reason - will surface in our analysis, exploring some of the complex issues in this respect, such as the relationship between thought and language, will not be analysed. The important role of solidarity - as the basis of critique - will be explained and related both to the role of immanent criticism in rational conversation and the importance of acknowledging what is designated as the principle of the excluded antinomy (which in an ontic sense underlies the logical principle of non-contradiction). The last section of our discussion will succinctly illuminate the proper place of the inevitable trust we ought to have in rationality - while implicitly warning against the rationalistic over-estimation of it (its degeneration into a rationalist “faith in reason”). Our intention is to enhance an awareness of the reality that rationality is embedded in and borders on givens which are not open to further “rational” exploration - givens that both condition (in a constitutive sense) and transcend the limits of conceptual knowledge. Some of the distinctions and insights operative in our analysis are explained in Strauss 2000 and 2003. Yet, most of the systematic perspectives found in this analysis of rationality are only developed in this article for the first time. Since a different study is required to discuss related problems and results found within cognitive science, it cannot be discussed within one article.

More from: Proceedings of the ACM on Programming Languages
  • Research Article
  • 10.1145/3763135
A Language for Quantifying Quantum Network Behavior
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Anita Buckley + 5 more

  • Research Article
  • 10.1145/3763057
Liberating Merges via Apartness and Guarded Subtyping
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Han Xu + 2 more

  • Research Article
  • 10.1145/3763134
Modal Abstractions for Virtualizing Memory Addresses
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Ismail Kuru + 1 more

  • Research Article
  • 10.1145/3763087
Statically Analyzing the Dataflow of R Programs
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Florian Sihler + 1 more

  • Research Article
  • 10.1145/3763185
DepFuzz: Efficient Smart Contract Fuzzing with Function Dependence Guidance
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Chenyang Ma + 2 more

  • Research Article
  • 10.1145/3763103
Heap-Snapshot Matching and Ordering using CAHPs: A Context-Augmented Heap-Path Representation for Exact and Partial Path Matching using Prefix Trees
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Matteo Basso + 3 more

  • Research Article
  • 10.1145/3763051
Quantified Underapproximation via Labeled Bunches
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Lang Liu + 4 more

  • Research Article
  • 10.1145/3763081
Two Approaches to Fast Bytecode Frontend for Static Analysis
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Chenxi Li + 3 more

  • Research Article
  • 10.1145/3763175
HeapBuffers: Why Not Just Using a Binary Serialization Format for Your Managed Memory?
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Daniele Bonetta + 3 more

  • Research Article
  • 10.1145/3763067
React-tRace: A Semantics for Understanding React Hooks: An Operational Semantics and a Visualizer for Clarifying React Hooks
  • Oct 9, 2025
  • Proceedings of the ACM on Programming Languages
  • Jay Lee + 2 more

Save Icon
Up Arrow
Open/Close
  • Ask R Discovery Star icon
  • Chat PDF Star icon

AI summaries and top papers from 250M+ research sources.

Search IconWhat is the difference between bacteria and viruses?
Open In New Tab Icon
Search IconWhat is the function of the immune system?
Open In New Tab Icon
Search IconCan diabetes be passed down from one generation to the next?
Open In New Tab Icon