Verifying Graph Algorithms in Separation Logic: A Case for an Algebraic Approach
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.
12
- 10.1007/3-540-08342-1_32
- Jan 1, 1977
7
- 10.1007/978-3-540-69061-0_15
- Jan 1, 2007
173
- 10.1007/10722010_8
- Jan 1, 2000
40
- 10.1145/1292535.1292541
- Oct 2, 2007
220
- 10.1145/363534.363554
- Aug 1, 1967
- Communications of the ACM
44
- 10.1007/s10817-017-9431-7
- Sep 22, 2017
- Journal of Automated Reasoning
- 10.1007/978-3-319-11737-9_10
- Jan 1, 2014
62
- 10.1145/1706299.1706331
- Jan 17, 2010
10
- 10.1007/978-3-030-44914-8_12
- Jan 1, 2020
- Programming Languages and Systems
1
- 10.48550/arxiv.2205.15306
- May 27, 2022
- Research Article
15
- 10.1145/3547631
- Aug 29, 2022
- Proceedings of the ACM on Programming Languages
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
7
- 10.1016/j.entcs.2018.03.018
- Apr 1, 2018
- Electronic Notes in Theoretical Computer Science
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
40
- 10.1145/2480359.2429104
- Jan 23, 2013
- ACM SIGPLAN Notices
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
140
- 10.1145/2429069.2429104
- Jan 23, 2013
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
13
- 10.1145/3360587
- Oct 10, 2019
- Proceedings of the ACM on Programming Languages
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
5
- 10.1145/3434286
- Jan 4, 2021
- Proceedings of the ACM on Programming Languages
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
3
- 10.1007/978-3-642-04639-1_5
- Jan 1, 2009
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
27
- 10.1016/j.jlap.2011.04.003
- Apr 13, 2011
- The Journal of Logic and Algebraic Programming
Algebraic separation logic
- Book Chapter
2
- 10.1007/978-3-030-76920-8_5
- Dec 14, 2021
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
16
- 10.1016/j.entcs.2008.10.022
- Oct 1, 2008
- Electronic Notes in Theoretical Computer Science
Higher-Order Separation Logic in Isabelle/HOLCF
- Book Chapter
3
- 10.1007/978-3-642-27269-1_6
- Jan 1, 2012
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
96
- 10.2307/2215113
- Mar 1, 1985
- Noûs
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
1
- 10.2307/2185121
- Oct 1, 1989
- The Philosophical Review
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
61
- 10.1017/cbo9780511814273.003
- May 5, 2008
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
3
- 10.4314/sajpem.v22i3.31373
- Jan 1, 2003
- South African Journal of Philosophy
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.
- Research Article
- 10.1145/3763135
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763057
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763134
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763087
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763185
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763103
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763051
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763081
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763175
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Research Article
- 10.1145/3763067
- Oct 9, 2025
- Proceedings of the ACM on Programming Languages
- Ask R Discovery
- Chat PDF
AI summaries and top papers from 250M+ research sources.