Completeness for Algebraic Theories of Local State

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.

[1]  John Power,et al.  Semantics for Local Computational Effects , 2006, MFPS.

[2]  Gordon D. Plotkin,et al.  Combining effects: Sum and tensor , 2006, Theor. Comput. Sci..

[3]  Alex K. Simpson,et al.  Computational Adequacy in an Elementary Topos , 1998, CSL.

[4]  Andrzej S. Murawski,et al.  Nominal games and full abstraction for the nu-calculus , 2004, Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004..

[5]  Andrew M. Pitts,et al.  Observable Properties of Higher Order Functions that Dynamically Create Local Names, or What's new? , 1993, MFCS.

[6]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[7]  Fabio Gadducci,et al.  About permutation algebras, (pre)sheaves and named sets , 2006, High. Order Symb. Comput..

[8]  Andrew M. Pitts,et al.  Nominal Equational Logic , 2007, Electron. Notes Theor. Comput. Sci..

[9]  Gordon D. Plotkin,et al.  Notions of Computation Determine Monads , 2002, FoSSaCS.

[10]  Ian Stark,et al.  Free-Algebra Models for the pi-Calculus , 2005, FoSSaCS.

[11]  Andrew M. Pitts,et al.  A New Approach to Abstract Syntax with Variable Binding , 2002, Formal Aspects of Computing.

[12]  Sam Staton,et al.  Comparing Operational Models of Name-Passing Process Calculi , 2004, CMCS.

[13]  HurChung-Kil,et al.  Term Equational Systems and Logics , 2008 .

[14]  Eijiro Sumii A Complete Characterization of Observational Equivalence in Polymorphic λ-Calculus with General References , 2009 .

[15]  Rasmus Ejlers Mgelberg A nominal relational model for local variables , 2009 .

[16]  Ian Stark Categorical models for local names , 1996, LISP Symb. Comput..

[17]  Peter W. O'Hearn,et al.  Parametricity and local variables , 1995, JACM.

[18]  Sam Lindley,et al.  Extensional Rewriting with Sums , 2007, TLCA.

[19]  Julian Rathke,et al.  Towards a theory of bisimulation for local names , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[20]  Robin Milner Action Calculi, or Syntactic Action Structures , 1993, MFCS.

[21]  Nikos Tzevelekos,et al.  Full abstraction for nominal general references , 2007, 22nd Annual IEEE Symposium on Logic in Computer Science (LICS 2007).

[22]  James Laird A game semantics of names and pointers , 2008, Ann. Pure Appl. Log..

[23]  Robin Milner,et al.  Theories for the Global Ubiquitous Computer , 2004, FoSSaCS.

[24]  Sam Staton,et al.  Two Cotensors in One: Presentations of Algebraic Theories for Local State and Fresh Names , 2009, MFPS.

[25]  M. Barr,et al.  Toposes, Triples and Theories , 1984 .

[26]  Alan Bundy,et al.  Towards Ontology Evolution in Physics , 2008, WoLLIC.

[27]  G. M. Kelly,et al.  Adjunctions whose counits are coequalizers, and presentations of finitary enriched monads , 1993 .

[28]  Lars Birkedal,et al.  Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types , 2009, FoSSaCS.

[29]  Murdoch James Gabbay,et al.  A Formal Calculus for Informal Equality with Binding , 2007, WoLLIC.

[30]  Yu Zhang,et al.  Logical Relations for Dynamic Name Creation , 2003, CSL.

[31]  Nick Benton,et al.  Relational Reasoning in a Nominal Semantics for Storage , 2005, TLCA.