Bunch theory: Axioms, logic, applications and model

  • Bill Stoddart* (Corresponding Author)
  • , Steve Dunne
  • , Chunyan Mu
  • , Frank Zeyda
  • *Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

11 Downloads (Pure)

Abstract

In his book A practical theory of programming [10], [12], Eric Hehner proposes and applies a radical reformulation of set theory in which the collection and packaging of elements are seen as separate activities. This provides for unpackaged collections, referred to as “bunches”. Bunches allow us to reason about non-determinism at the level of terms, and, very remarkably, allow us to reason about the conceptual entity “nothing”, which is just an empty bunch (and very different from an empty set). This eliminates mathematical “gaps” caused by undefined terms. We have made use of bunches in a number of papers that develop a refinement calculus for backtracking programs. We formulate our bunch theory as an extension of the set theory used in the B-Method, and provide a denotational model to give this formulation a sound mathematical basis. We replace the classical logic that underpins B with a version that is still able to prove the laws of our logic toolkit, but is unable to prove the property, derivable in classical logic, that every term denotes an element, which for us is pathological since we hold that terms such as 1/0 simply denote “nothing”. This change facilitates our ability to reason about partial functions and backtracking programs. We include a section on our backtracking program calculus, showing how it is derived from WP and how bunch theory simplifies its formulation. We illustrate its use with two small case studies.
Original languageEnglish
Article number100977
Number of pages21
JournalJournal of Logical and Algebraic Methods in Programming
Volume140
Early online date24 May 2024
DOIs
Publication statusPublished - 1 Aug 2024

Bibliographical note

We thank the anonymous referees, whose comments have enabled us to greatly improve the presentation of this paper. We warmly
thank Eric Hehner for extended discussions and colleagues from the BCS Formal Aspects special interest group for their interest and
comments.

Data Availability Statement

Two supporting documents covering formal semantics and proof have been submitted.

Keywords

  • Bunch-theory
  • Partial-functions
  • Logic
  • Denotational-model
  • Backtracking
  • Refinement-calculus

Fingerprint

Dive into the research topics of 'Bunch theory: Axioms, logic, applications and model'. Together they form a unique fingerprint.

Cite this