Reference. From categorical logic to facebook engineering
I chart a line of development from category-theoretic models of programs and logics to automatic program verification/analysis techniques that are in deployment at Facebook. Our journey takes in a number of concepts from the computer science logician’s toolkit – including categorical logic and model theory, denotational semantics, the Curry-Howard isomorphism, sub structural logic, Hoare Logic and Separation Logic, abstract interpretation, compositional program analysis, the frame problem, and abductive inference.
Cite
Cites 28 works (4 here)
With notes (4)
Separation logic: A logic for shared mutable data structures reynolds_separation_2002
In joint work with Peter O’Hearn and others, based on early ideas of Burstall, we have developed an extension of Hoare logic that permits reasoning about low-level imperative programs that use shared mutable data structure. The simple imperative programming language is extended with commands (not expressions) for accessing and modifying shared structures, and for explicit allocation and deallocation of storage. Assertions are extended by introducing a “separating conjunction” that asserts that its subformulas hold for disjoint parts of the heap, and a closely related “separating implication”. Coupled with the inductive definition of predicates on abstract data structures, this extension permits the concise and flexible description of structures with controlled sharing. In this paper, we survey the current development of this program logic, including extensions that permit unrestricted address arithmetic, dynamically allocated arrays, and recursive procedures. We also discuss promising future directions.
BI as an assertion language for mutable data structures ishtiaq_ohearn_bi_2001
Reynolds has developed a logic for reasoning about mutable data structures in which the pre- and postconditions are written in an intuitionistic logic enriched with a spatial form of conjunction. We investigate the approach from the point of view of the logic BI of bunched implications of O’Hearn and Pym. We begin by giving a model in which the law of the excluded middle holds, thus showing that the approach is compatible with classical logic. The relationship between the intuitionistic and classical versions of the system is established by a translation, analogous to a translation from intuitionistic logic into the modal logic S4. We also consider the question of completeness of the axioms. BI’s spatial implication is used to express weakest preconditions for object-component assignments, and an axiom for allocating a cons cell is shown to be complete under an interpretation of triples that allows a command to be applied to states with dangling pointers. We make this latter a feature, by incorporating an operation, and axiom, for disposing of memory. Finally, we describe a local character enjoyed by specifications in the logic, and show how this enables a class of frame axioms, which say what parts of the heap don’t change, to be inferred automatically.
The logic of bunched implications ohearn_pym_bi_1999
We introduce a logic BI in which a multiplicative (or linear) and an additive (or intuitionistic) implication live side-by-side. The propositional version of BI arises from an analysis of the proof-theoretic relationship between conjunction and implication; it can be viewed as a merging of intuitionistic logic and multiplicative intuitionistic linear logic. The naturality of BI can be seen categorically: models of propositional BI’s proofs are given by bicartesian doubly closed categories, i.e., categories which freely combine the semantics of propositional intuitionistic logic and propositional multiplicative intuitionistic linear logic. The predicate version of BI includes, in addition to standard additive quantifiers, multiplicative (or intensional) quantifiers [inline image] and [inline image] which arise from observing restrictions on structural rules on the level of terms as well as propositions. We discuss computational interpretations, based on sharing, at both the propositional and predicate levels.
Introduction to Higher-Order Categorical Logic lambek_scott_1986
External (24)
- Moving Fast with Software Verification (2015)
- Facebook acquires assets of UK mobile bug-checking software developer Monoidics (J. Constine, TechCrunch) (2013)
- Infer: An Automatic Program Verifier for Memory Safety of C Programs (2011)
- Compositional Shape Analysis by Means of Bi-Abduction (2011)
- Footprint Analysis: A Shape Analysis That Discovers Preconditions (2007)
- Smallfoot: Modular Automatic Assertion Checking with Separation Logic (2006)
- A Local Shape Analysis Based on Separation Logic (2006)
- Symbolic execution with separation logic (2005)
- On bunched typing (2003)
- Possible worlds and resources: the semantics of BI (2003)
- On model checking the dynamics of object-based software: a foundational approach (D. Distefano, PhD thesis) (2003)
- The Semantics and Proof Theory of the Logic of Bunched Implications (2002)
- Local reasoning about programs that alter data structures (2001)
- Intuitionistic reasoning about shared mutable data structure (2000)
- Resource Interpretations, Bunched Implications and the αλ-Calculus (Preliminary Version) (1999)
- Algol-like Languages (two volumes, O'Hearn & Tennent eds.) (1997)
- A model for syntactic control of interference (1993)
- Syntactic control of interference (1978)
- Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints (1977)
- The Semantics of Entailment (1973)
- Semantics for relevant logics (1972)
- Toward a mathematical semantics for computer languages (1971)
- On closed categories of functors (1970)
- Deductive systems and categories (J. Lambek, Math. Systems Theory 2) (1968)