Bunched Logics a Uniform Approach
Total Page:16
File Type:pdf, Size:1020Kb
CORE Metadata, citation and similar papers at core.ac.uk Provided by UCL Discovery Bunched Logics A Uniform Approach Simon Robert Docherty A dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy of University College London. Department of Computer Science University College London May 2, 2019 2 I, Simon Robert Docherty, confirm that the work presented in this thesis is my own. Where information has been derived from other sources, I confirm that this has been indicated in the work. Abstract Bunched logics have found themselves to be key tools in modern computer science, in particular through the industrial-level program verification formalism Separation Logic. Despite this—and in contrast to adjacent families of logics like modal and substructural logic—there is a lack of uniform methodology in their study, leaving many evident variants uninvestigated and many open problems unresolved. In this thesis we investigate the family of bunched logics—including previ- ously unexplored intuitionistic variants—through two uniform frameworks. The first is a system of duality theorems that relate the algebraic and Kripke-style inter- pretations of the logics; the second, a modular framework of tableaux calculi that are sound and complete for both the core logics themselves, as well as many classes of bunched logic model important for applications in program verification and systems modelling. In doing so we are able to resolve a number of open problems in the lit- erature, including soundness and completeness theorems for intuitionistic variants of bunched logics, classes of Separation Logic models and layered graph models; decidability of layered graph logics; a characterisation theorem for the classes of bunched logic model definable by bunched logic formulae; and the failure of Craig interpolation for principal bunched logics. We also extend our duality theorems to the categorical structures suitable for interpreting predicate versions of the logics, in particular hyperdoctrinal structures used frequently in Separation Logic. Impact Statement As a work of formal logic this thesis’ impact is primarily academic. We identify a number of different logic communities to which we believe this research will be of benefit. • For the mathematical logic community, this work resolves a number of open problems in the bunched logic literature and situates this branch of logic in a mathematically substantial framework. • For the proof theory community, this work yields new insights about the con- struction of tableaux calculi—in particular, the identification of tableaux sys- tems with theories of coherent logic—that will undoubtably prove useful for automated reasoning, the construction of new systems and our mathematical and philosophical understanding of the tableau method. • For the computational logic community, this work significantly broadens the understanding of ‘resource semantics’, a central notion in modern program verification. The new logics and the general mathematical techniques used may find use in more bespoke verification formalisms and other application areas suggested in the thesis (e.g., quantum information theory, rewriting sys- tems and process algebra). • For the program verification community, this work resolves an issue regard- ing the incompleteness of bunched logic for the classes of ‘memory models’ typically used in separation logic-style program verification formalisms by producing a modular framework of tableaux proof systems that are sound and complete for any choice of class of memory model. This impact is witnessed by publications in top conference venues [78, 79, 80, 81], with two further journal papers [82, 83] (both invited submissions following the top ranking of [78] and [80] at their respective conferences). In particular, [79] was an invited submission to the top ranking AI conference IJCAI as part of their Impact Statement 5 Sister Conferences programme showcasing the best papers at more specialised con- ferences to a wider audience. Potential impact outside of the academic community lies with the modular proof systems for memory models constructed in Part III of the thesis. These are proved correct but not implemented; however, their implementation could form the basis for a program verification tool that is parametric in choice of memory model. Acknowledgements First and foremost I would like to thank my supervisor David Pym for his support and guidance over the past four years. David has been a great scientific inspira- tion, and not just for co-creating the branch of logic that this thesis is dedicated to investigating. In the course of my studies he has imparted on me a philosophical understanding of logic that has substantially deepened my appreciation of the field, as well as broadened my perception of its applicative possibilities. He has also been a great help in navigating the world of academia as a fledging researcher. This has taken many forms, from teaching me about the precision erad- ication of whitespace for punishing conference paper page restrictions, to guiding me through my first grant proposal. More than anything, I thank him for the many times he set me straight when the amorphous task of completing a PhD began to overwhelm or caused me to lose confidence. I extend these thanks to the whole PPLV group for creating a stimulating and supportive environment to do research in. Being so close to the research of aca- demics like Alexandra Silva and James Brotherston has been a great source of in- spiration, while the support, solidarity and friendship of my fellow PhD students has made many a long day shorter. I also thank UCL and the EPSRC for funding the studentship that made my work possible. I would also like to thank my examiners Samson Abramsky and Peter O’Hearn for their dilligent and thoughtful examination of this thesis. Their comments have greatly improved the presentation of this work. My final thanks go to my partner Maya. Doing a PhD can be a lonely en- terprise, but her love has made it substantially less so. Thanks to her I remained (somewhat) human through the arduous task of writing up, and I hope to be able to repay that to her long into the future. I dedicate this thesis to my parents Caroline and Robert. I have them to thank for the curiosity and determination that has led me through my entire education up to this point. Without their material and emotional support this work wouldn’t be possible. Contents 1 Introduction 12 1.1 From Classical to Non-Classical Logic . 12 1.2 Bunched Logics . 18 1.3 Road Map for the Thesis . 22 I A Family of Bunched Logics 27 2 Layered Graph Logics 29 2.1 Syntax and Semantics . 30 2.2 Layered Graphs . 34 3 Logics of Bunched Implications 40 3.1 Syntax and Semantics . 42 3.2 Separation Logic . 50 3.3 Examples of (B)BI Frames . 54 4 Extensions of the Logics of Bunched Implications 61 4.1 De Morgan Bunched Logics . 62 4.2 Sub-Classical Bunched Logics . 66 4.3 Separating Modal Logics . 69 4.4 Concurrent Kleene Bunched Logic . 72 Summary of Part I 75 II Algebra and Duality for Bunched Logics 76 5 Algebraic and Topological Preliminaries 78 5.1 Algebra . 78 5.2 Topology . 82 Contents 8 5.3 Esakia Duality . 84 5.4 Stone Duality . 91 6 Dualities for Propositional Bunched Logics 94 6.1 Layered Graph Logics . 94 6.2 Logics of Bunched Implications . 103 6.3 De Morgan Bunched Logics . 107 6.4 Other Variants . 112 7 Metatheory for Propositional Bunched Logics 121 7.1 Completeness . 121 7.2 Decidability . 123 7.3 Expressivity . 126 7.4 Interpolation . 138 8 Dualities for Predicate Bunched Logics 142 8.1 Categorical Structures for Predicate Bunched Logics . 143 8.2 Bunched Logic Models as Indexed Frames . 147 8.3 Duality for Bunched Logic Hyperdoctrines . 150 Summary of Part II 161 III Proof Theory for Bunched Logics 162 9 Modular Tableaux Calculi for Bunched Logics 164 9.1 Logical Rules for Bunched Logic Tableaux Calculi . 166 9.2 Tableau Rule Generation from Coherent Axioms . 171 9.3 Frame Rules for Bunched Logic Tableaux Calculi . 173 9.4 The Tableaux Calculi . 178 9.5 Parametric Soundness and Completeness . 181 10 Tableaux Calculi for Applications of Bunched Logics 192 10.1 Separation Logics . 192 10.2 Layered Graph Models . 201 Summary of Part III 215 Contents 9 IV Conclusions & Further Work 216 Appendix 222 A Category Theory 222 Bibliography 226 List of Figures 1.1 The bunch ((j ; y) ; c) ; h....................... 19 2.1 Hilbert rules for layered graph logics. 31 2.2 Satisfaction for (I)LGL. 33 2.3 Layered graph representation of Schneier’s gate. 35 2.4 The graph composition H @E K.................... 36 2.5 Place and link graphs. 38 2.6 Bigraph. 38 3.1 Hilbert rules for logics of bunched implications. 42 3.2 Satisfaction for (B)BI. 43 3.3 Satisfaction for Separation Logic. 53 3.4 A team as a database. 57 4.1 Hilbert rules for De Morgan bunched logics. 63 4.2 Satisfaction for DMBI/CBI. 65 4.3 Hilbert rules for basic Bi(B)BI. 67 4.4 Hilbert rules for subclassical bunched logics. 68 4.5 Satisfaction for Bi(B)BI. 68 4.6 Hilbert rules for separating modal logic. 70 4.7 Satisfaction for SML . 71 4.8 Rules for ASL−−............................ 72 4.9 Hilbert rules for concurrent Kleene bunched logic. 73 4.10 Satisfaction for CKBI. 74 6.1 Algebraic axioms for subclassical bunched logics. 113 8.1 Satisfaction on indexed L frames. 147 8.2 Satisfaction for bigraph models of predicate ILGL. 150 9.1 Logical expansion rules for bunched logics with classical additives. 169 List of Figures 11 9.2 Logical expansion rules for bunched logics with intuitionistic addi- tives. 170 9.3 Tableau rules for equality and order.