Logic Of Bunched Implications
   HOME

TheInfoList



OR:

Bunched logic is a variety of
substructural logic In logic, a substructural logic is a logic lacking one of the usual structural rules (e.g. of classical and intuitionistic logic), such as weakening, contraction, exchange or associativity. Two of the more significant substructural logics a ...
proposed by Peter O'Hearn and David Pym. Bunched logic provides primitives for reasoning about ''resource composition'', which aid in the compositional analysis of computer and other systems. It has category-theoretic and truth-functional semantics, which can be understood in terms of an abstract concept of resource, and a proof theory in which the contexts Γ in an
entailment Logical consequence (also entailment or logical implication) is a fundamental concept in logic which describes the relationship between statements that hold true when one statement logically ''follows from'' one or more statements. A valid l ...
judgement Γ ⊢ A are tree-like structures (bunches) rather than
list A list is a Set (mathematics), set of discrete items of information collected and set forth in some format for utility, entertainment, or other purposes. A list may be memorialized in any number of ways, including existing only in the mind of t ...
s or ( multi)
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
s as in most
proof calculi In mathematical logic, a proof calculus or a proof system is built to prove Statement (logic), statements. Overview A proof system includes the components: * Formal language: The set ''L'' of formulas admitted by the system, for example, proposit ...
. Bunched logic has an associated
type theory In mathematics and theoretical computer science, a type theory is the formal presentation of a specific type system. Type theory is the academic study of type systems. Some type theories serve as alternatives to set theory as a foundation of ...
, and its first application was in providing a way to control the
aliasing In signal processing and related disciplines, aliasing is a phenomenon that a reconstructed signal from samples of the original signal contains low frequency components that are not present in the original one. This is caused when, in the ori ...
and other forms of interference in imperative programs. The logic has seen further applications in
program verification In the context of hardware and software systems, formal verification is the act of proving or disproving the correctness of a system with respect to a certain formal specification or property, using formal methods of mathematics. Formal ver ...
, where it is the basis of the assertion language of
separation logic In computer science, separation logic is an extension of Hoare logic, a way of reasoning about programs. It was developed by John C. Reynolds, Peter O'Hearn, Samin Ishtiaq and Hongseok Yang, drawing upon early work by Rod Burstall. The assertio ...
, and in
systems modelling A system is a group of interacting or interrelated elements that act according to a set of rules to form a unified whole. A system, surrounded and influenced by its environment, is described by its boundaries, structure and purpose and is exp ...
, where it provides a way to decompose the resources used by components of a system.


Foundations

The
deduction theorem In mathematical logic, a deduction theorem is a metatheorem that justifies doing conditional proofs from a hypothesis in systems that do not explicitly axiomatize that hypothesis, i.e. to prove an implication A \to B, it is sufficient to assume A ...
of
classical logic Classical logic (or standard logic) or Frege–Russell logic is the intensively studied and most widely used class of deductive logic. Classical logic has had much influence on analytic philosophy. Characteristics Each logical system in this c ...
relates conjunction and implication: ::A \wedge B \vdash C \quad \mbox \quad A \vdash B \Rightarrow C Bunched logic has two versions of the deduction theorem: ::A * B \vdash C \quad \mbox \quad A \vdash B C \qquad \mbox \qquad A \wedge B \vdash C \quad \mbox \quad A \vdash B \Rightarrow C A * B and B C are forms of conjunction and implication that take resources into account (explained below). In addition to these connectives bunched logic has a formula, sometimes written I or emp, which is the unit of *. In the original version of bunched logic \wedge and \Rightarrow were the connectives from
intuitionistic logic Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, systems ...
, while a boolean variant takes \wedge and \Rightarrow (and \neg ) as from traditional
boolean logic In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
. Thus, bunched logic is compatible with constructive principles, but is in no way dependent on them.


Truth-functional semantics (resource semantics)

The easiest way to understand these formulae is in terms of its truth-functional semantics. In this semantics a formula is true or false with respect to given resources. A*B asserts that the resource at hand can be decomposed into resources that satisfy A and B. B C says that if we compose the resource at hand with additional resource that satisfies B, then the combined resource satisfies C. \wedge and \Rightarrow have their familiar meanings. The foundation for this reading of formulae was provided by a forcing semantics r \models A advanced by Pym, where the forcing relation means ''A'' holds of resource ''r''. The semantics is analogous to Kripke's semantics of
intuitionistic In the philosophy of mathematics, intuitionism, or neointuitionism (opposed to preintuitionism), is an approach where mathematics is considered to be purely the result of the constructive mental activity of humans rather than the discovery of f ...
or
modal logic Modal logic is a kind of logic used to represent statements about Modality (natural language), necessity and possibility. In philosophy and related fields it is used as a tool for understanding concepts such as knowledge, obligation, and causality ...
, but where the elements of the model are regarded as resources that can be composed and decomposed, rather than as possible worlds that are accessible from one another. For example, the forcing semantics for the conjunction is of the form ::r \models A * B \quad \mbox \quad \exists r_Ar_B.\,r_A \models A,\, r_B \models B,\,\mbox\,r_A \bullet r_B \leq r where r_A \bullet r_B is a way of combining resources and \leq is a relation of approximation. This semantics of bunched logic draws on prior work in
relevance logic Relevance logic, also called relevant logic, is a kind of non-classical logic requiring the antecedent and consequent of implications to be relevantly related. They may be viewed as a family of substructural or modal logics. It is generally, b ...
(especially the
operational semantics Operational semantics is a category of formal programming language semantics in which certain desired properties of a program, such as correctness, safety or security, are verified by constructing proofs from logical statements about its exec ...
of Routley–Meyer), but differs from it by not requiring r \bullet r \leq r and by accepting the semantics of standard intuitionistic or classical versions of \wedge and \Rightarrow . The property r \bullet r \leq r is justified when thinking about relevance but denied by considerations of resource; having two copies of a resource is not the same as having one, and in some models (e.g. heap models) r \bullet r might not even be defined. The standard semantics of \Rightarrow (or of negation) is often rejected by relevantists in their bid to escape the `paradoxes of material implication', which are not a problem from the perspective of modelling resources and so not rejected by bunched logic. The semantics is also related to the 'phase semantics' of
linear logic Linear logic is a substructural logic proposed by French logician Jean-Yves Girard as a refinement of classical and intuitionistic logic, joining the dualities of the former with many of the constructive properties of the latter. Although the ...
, but again is differentiated by accepting the standard (even boolean) semantics of \wedge and \Rightarrow , which in linear logic is rejected in a bid to be constructive. These considerations are discussed in detail in an article on resource semantics by Pym, O'Hearn and Yang.


Categorical semantics (doubly closed categories)

The double version of the deduction theorem of bunched logic has a corresponding category-theoretic structure. Proofs in intuitionistic logic can be interpreted in
cartesian closed In category theory, a Category (mathematics), category is Cartesian closed if, roughly speaking, any morphism defined on a product (category theory), product of two Object (category theory), objects can be naturally identified with a morphism defin ...
categories, that is, categories with finite products satisfying the (
natural Nature is an inherent character or constitution, particularly of the ecosphere or the universe as a whole. In this general sense nature refers to the laws, elements and phenomena of the physical world, including life. Although humans are part ...
in ''A'' and ''C'') adjunction correspondence relating hom sets: ::Hom(A \wedge B, C) \quad \mbox \quad Hom(A, B \Rightarrow C) Bunched logic can be interpreted in categories possessing two such structures ::a categorical model of bunched logic is a single category possessing two closed structures, one symmetric monoidal closed the other cartesian closed. A host of categorial models can be given using Day's
tensor product In mathematics, the tensor product V \otimes W of two vector spaces V and W (over the same field) is a vector space to which is associated a bilinear map V\times W \rightarrow V\otimes W that maps a pair (v,w),\ v\in V, w\in W to an element of ...
construction. Additionally, the implicational fragment of bunched logic has been given a
game semantics Game semantics is an approach to Formal semantics (logic), formal semantics that grounds the concepts of truth or Validity (logic), validity on Game theory, game-theoretic concepts, such as the existence of a winning strategy for a player. In this ...
.


Algebraic semantics

The algebraic semantics of bunched logic is a special case of its categorical semantics, but is simple to state and can be more approachable. ::An algebraic model of bunched logic is a poset that is a
Heyting algebra In mathematics, a Heyting algebra (also known as pseudo-Boolean algebra) is a bounded lattice (with join and meet operations written ∨ and ∧ and with least element 0 and greatest element 1) equipped with a binary operation ''a'' → ''b'' call ...
and that carries an additional commutative
residuated lattice In abstract algebra, a residuated lattice is an algebraic structure that is simultaneously a lattice (order), lattice ''x'' ≤ ''y'' and a monoid ''x''•''y'' which admits operations ''x''\''z'' and ''z''/''y'', loosely analogous to division or i ...
structure (for the same lattice as the Heyting algebra): that is, an ordered commutative monoid with an associated implication satisfying A * B \leq C \quad \mbox \quad A \leq B C. The boolean version of bunched logic has models as follows. ::An algebraic model of boolean bunched logic is a poset that is a
Boolean algebra In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
and that carries an additional residuated commutative monoid structure.


Proof theory and type theory (bunches)

The
proof calculus In mathematical logic, a proof calculus or a proof system is built to prove statements. Overview A proof system includes the components: * Formal language: The set ''L'' of formulas admitted by the system, for example, propositional logic or fir ...
of bunched logic differs from usual
sequent calculi In mathematical logic, sequent calculus is a style of formal logical argumentation in which every line of a proof is a conditional tautology (called a sequent by Gerhard Gentzen) instead of an unconditional tautology. Each conditional tautology ...
in having a tree-like context of
hypotheses A hypothesis (: hypotheses) is a proposed explanation for a phenomenon. A scientific method, scientific hypothesis must be based on observations and make a testable and reproducible prediction about reality, in a process beginning with an educ ...
instead of a flat list-like structure. In its sequent-based proof theories, the context \Delta in an entailment judgement \Delta \vdash A is a finite rooted tree whose leaves are propositions and whose internal nodes are labelled with modes of composition corresponding to the two conjunctions. The two combining operators, comma and semicolon, are used (for instance) in the introduction rules for the two implications. :\frac \qquad \qquad \frac The difference between the two composition rules comes from additional rules that apply to them. * Multiplicative composition \Delta , \Gamma denies the
structural rule In the logical discipline of proof theory, a structural rule is an inference rule of a sequent calculus that does not refer to any logical connective but instead operates on the sequents directly. Structural rules often mimic the intended meta-the ...
s of weakening and contraction. * Additive composition \Delta ; \Gamma admits weakening and contraction of entire bunches. The structural rules and other operations on bunches are often applied deep within a tree-context, and not only at the top level: it is thus in a sense a calculus of
deep inference Deep or The Deep may refer to: Places United States * Deep Creek (Appomattox River tributary), Virginia * Deep Creek (Great Salt Lake), Idaho and Utah * Deep Creek (Mahantango Creek tributary), Pennsylvania * Deep Creek (Mojave River tributary ...
. Corresponding to bunched logic is a type theory having two kinds of function type. Following the
Curry–Howard correspondence In programming language theory and proof theory, the Curry–Howard correspondence is the direct relationship between computer programs and mathematical proofs. It is also known as the Curry–Howard isomorphism or equivalence, or the proofs-as-p ...
, introduction rules for implications correspond to introduction rules for function types. :\frac \qquad \qquad \frac Here, there are two distinct binders, \lambda and \alpha, one for each kind of function type. The proof theory of bunched logic has an historical debt to the use of bunches in relevance logic. But the bunched structure can in a sense be derived from the categorical and algebraic semantics: to formulate an introduction rule for we should mimick * on the left in sequents, and to introduce \Rightarrow we should mimick \wedge . This consideration leads to the use of two combining operators. James Brotherston has done further significant work on a unified proof theory for bunched logic and variants, employing Belnap's notion of display logic. Galmiche, Méry, and Pym have provided a comprehensive treatment of bunched logic, including completeness and other meta-theory, based on labelled tableaux.


Applications


Interference control

In perhaps the first use of substructural type theory to control resources,
John C. Reynolds John Charles Reynolds (June 1, 1935 – April 28, 2013) was an American computer scientist. Education and affiliations John Reynolds studied at Purdue University and then earned a Doctor of Philosophy (Ph.D.) in theoretical physics from Harvard U ...
showed how to use an
affine Affine may describe any of various topics concerned with connections or affinities. It may refer to: * Affine, a Affinity_(law)#Terminology, relative by marriage in law and anthropology * Affine cipher, a special case of the more general substi ...
type theory to control aliasing and other forms of interference in
Algol ALGOL (; short for "Algorithmic Language") is a family of imperative computer programming languages originally developed in 1958. ALGOL heavily influenced many other languages and was the standard method for algorithm description used by the ...
-like programming languages. O'Hearn used bunched type theory to extend Reynolds' system by allowing interference and non-interference to be more flexibly mixed. This resolved open problems concerning recursion and jumps in Reynolds' system.


Separation logic

Separation logic is an extension of
Hoare logic Hoare logic (also known as Floyd–Hoare logic or Hoare rules) is a formal system with a set of logical rules for reasoning rigorously about the correctness of computer programs. It was proposed in 1969 by the British computer scientist and l ...
that facilitates reasoning about mutable data structures that use pointers. Following Hoare logic the formulae of separation logic are of the form \ program \, but the preconditions and postconditions are formulae interpreted in a model of bunched logic. The original version of the logic was based on models as follows: * Heaps = L \rightharpoonup_f V \qquad (finite
partial function In mathematics, a partial function from a set to a set is a function from a subset of (possibly the whole itself) to . The subset , that is, the '' domain'' of viewed as a function, is called the domain of definition or natural domain ...
s from locations to values) * h_0 \bullet h_1 = union of heaps with disjoint domains, undefined when domains overlap. It is the undefinedness of the composition on overlapping heaps that models the separation idea. This is a model of the boolean variant of bunched logic. Separation logic was used originally to prove properties of sequential programs, but then was extended to concurrency using a proof rule : \frac that divides the storage accessed by parallel threads. Later, the greater generality of the resource semantics was utilized: an abstract version of separation logic works for Hoare triples where the preconditions and postconditions are formulae interpreted over an arbitrary partial commutative monoid instead of a particular heap model. By suitable choice of commutative monoid, it was surprisingly found that the proofs rules of abstract versions of concurrent separation logic could be used to reason about interfering concurrent processes, for example by encoding rely-guarantee and trace-based reasoning. Separation logic is the basis of a number of tools for automatic and semi-automatic reasoning about programs, and is used in the Infer program analyzer currently deployed at Facebook.


Resources and processes

Bunched logic has been used in connection with the (synchronous) resource-process calculus SCRP in order to give a (modal) logic that characterizes, in the sense of
Hennessy Jas Hennessy & Cie., commonly known simply as Hennessy (), is a French producer of cognac, founded in 1765 by Richard Hennessy which has its headquarters in Cognac, France. It is one of the best-known cognac houses, along with Martell, Courvo ...
Milner, the compositional structure of concurrent systems. SCRP is notable for interpreting A * B in terms of ''both'' parallel composition of systems and composition of their associated resources. The semantic clause of SCRP's process logic that corresponds to separation logic's rule for concurrency asserts that a formula A * B is true in resource-process state R , E just in case there are decompositions of the resource R = S \bullet T and process E ~ F \times G, where ~ denotes
bisimulation In theoretical computer science a bisimulation is a binary relation between state transition systems, associating systems that behave in the same way in that one system simulates the other and vice versa. Intuitively two systems are bisimilar if ...
, such that A is true in the resource-process state S , F and B is true in the resource-process state T , G ; that is R, E \models A iff S, F \models A and T, G \models B . The system SCRP is based directly on bunched logic's resource semantics; that is, on ordered monoids of resource elements. While direct and intuitively appealing, this choice leads to a specific technical problem: the Hennessy–Milner completeness theorem holds only for fragments of the modal logic that exclude the multiplicative implication and multiplicative modalities. This problem is solved by basing resource-process calculus on a resource semantics in which resource elements are combined using two combinators, one corresponding to concurrent composition and one corresponding to choice.


Spatial logics

Cardelli, Caires, Gordon and others have investigated a series of logics of process calculi, where a conjunction is interpreted in terms of parallel composition. Unlike the work of Pym et al. in SCRP, they do not distinguish between parallel composition of systems and composition of resources accessed by the systems. Their logics are based on instances of the resource semantics that give rise to models of the boolean variant of bunched logic. Although these logics give rise to instances of boolean bunched logic, they appear to have been arrived at independently, and in any case have significant additional structure in the way of modalities and binders. Related logics have been proposed as well for modelling
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
data.


See also

*
Separation logic In computer science, separation logic is an extension of Hoare logic, a way of reasoning about programs. It was developed by John C. Reynolds, Peter O'Hearn, Samin Ishtiaq and Hongseok Yang, drawing upon early work by Rod Burstall. The assertio ...
*
Relevance logic Relevance logic, also called relevant logic, is a kind of non-classical logic requiring the antecedent and consequent of implications to be relevantly related. They may be viewed as a family of substructural or modal logics. It is generally, b ...
*
Linear logic Linear logic is a substructural logic proposed by French logician Jean-Yves Girard as a refinement of classical and intuitionistic logic, joining the dualities of the former with many of the constructive properties of the latter. Although the ...


References

{{reflist Mathematical logic Logic in computer science Substructural logic