Completeness for algebraic theories of local state

  • Authors:
  • Sam Staton

  • Affiliations:
  • Computer Laboratory, University of Cambridge

  • Venue:
  • FOSSACS'10 Proceedings of the 13th international conference on Foundations of Software Science and Computational Structures
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Every algebraic theory gives rise to a monad, and monads allow a meta-language which is a basic programming language with side-effects. Equations in the algebraic theory give rise to equations between programs in the meta-language. An interesting question is this: to what extent can we put equational reasoning for programs into the algebraic theory for the monad? In this paper I focus on local state, where programs can allocate, update and read the store. Plotkin and Power (FoSSaCS'02) have proposed an algebraic theory of local state, and they conjectured that the theory is complete, in the sense that every consistent equation is already derivable. The central contribution of this paper is to confirm this conjecture. To establish the completeness theorem, it is necessary to reformulate the informal theory of Plotkin and Power as an enriched algebraic theory in the sense of Kelly and Power (JPAA, 89:163–179). The new presentation can be read as 14 program assertions about three effects. The completeness theorem for local state is dependent on certain conditions on the type of storable values. When the set of storable values is finite, there is a subtle additional axiom regarding quotient types.