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.


Local State Global State Algebraic Theory Free Algebra Equivariant Function 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Abramsky, S., Ghica, D.R., Murawski, A.S., Ong, C.-H.L., Stark, I.D.B.: Nominal games and full abstraction for the nu-calculus. In: LICS 2004 (2004)Google Scholar
  2. 2.
    Barr, M., Wells, C.: Toposes, Triples and Theories. Springer, Heidelberg (1984)Google Scholar
  3. 3.
    Benton, N., Leperchey, B.: Relational reasoning in a nominal semantics for storage. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 86–101. Springer, Heidelberg (2005)Google Scholar
  4. 4.
    Birkedal, L., Stø, K.: Realizability semantics of parametric polymorphism, references, and recursive types. In: de Alfaro, L. (ed.) FOSSACS 2009. LNCS, vol. 5504, pp. 456–470. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  5. 5.
    Clouston, R.A., Pitts, A.M.: Nominal equational logic. In: Articles dedicated to Gordon Plotkin. ENTCS, vol. 172, pp. 223–257 (2007)Google Scholar
  6. 6.
    Fiore, M.P., Hur, C.-K.: Term equational systems and logics. In: Proc. of MFPS XXIV. Electron. Notes Theor. Comput. Sci, vol. 218, pp. 171–192 (2008)Google Scholar
  7. 7.
    Fiore, M.P., Staton, S.: Comparing operational models of name-passing process calculi. Inform. and Comput. 204(4), 435–678 (2006)CrossRefMathSciNetGoogle Scholar
  8. 8.
    Gabbay, M., Mathijssen, A.: A formal calculus for informal equality with binding. In: Leivant, D., de Queiroz, R. (eds.) WoLLIC 2007. LNCS, vol. 4576, pp. 162–176. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  9. 9.
    Gabbay, M.J., Pitts, A.M.: A new approach to abstract syntax with variable binding. Formal Aspects of Computing 13, 341–363 (2001)CrossRefGoogle Scholar
  10. 10.
    Gadducci, F., Miculan, M., Montanari, U.: About permutation algebras (pre)sheaves and named sets. Higher-Order Symb. Comput. 19(2-3), 283–304 (2006)zbMATHCrossRefGoogle Scholar
  11. 11.
    Hyland, M., Plotkin, G.D., Power, J.: Combining effects: Sum and tensor. Theoret. Comput. Sci. 357, 70–99 (2006)zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Jeffrey, A., Rathke, J.: Towards a theory of bisimulation for local names. In: Proc. of LICS 1999, pp. 56–66 (1999)Google Scholar
  13. 13.
    Kelly, G.M., Power, A.J.: Adjunctions whose counits are coequalizers, and presentations of finitary enriched monads. J. Pure Appl. Algebra 89(1-2), 163–179 (1993)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Laird, J.: A game semantics of names and pointers. Ann. Pure Appl. Logic 151(2-3), 151–169 (2008)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Møgelberg, R.E.: A nominal relational model for local variables. Draft (2009)Google Scholar
  16. 16.
    Moggi, E.: Notions of computation and monads. Inform. and Comput. 93(1), 55–92Google Scholar
  17. 17.
    Murawski, A.S., Tzevelekos, N.: Full abstraction for Reduced ML. In: de Alfaro, L. (ed.) FOSSACS 2009. LNCS, vol. 5504, pp. 32–47. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  18. 18.
    O’Hearn, P.W., Tennant, R.D.: Parametricity and local variables. J. ACM 42(3), 658–709 (1995)zbMATHGoogle Scholar
  19. 19.
    Pitts, A., Stark, I.: Observable properties of higher order functions that dynamically create local names, or: What’s new? In: Borzyszkowski, A.M., Sokolowski, S. (eds.) MFCS 1993. LNCS, vol. 711. Springer, Heidelberg (1993)Google Scholar
  20. 20.
    Plotkin, G.D., Power, J.: Notions of computation determine monads. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 342–356. Springer, Heidelberg (2002), CrossRefGoogle Scholar
  21. 21.
    Power, J.: Semantics for local computational effects. In: Proc. of MFPS XXII (2006)Google Scholar
  22. 22.
    Stark, I.: Categorical models for local names. LISP and Symbolic Computation 9(1), 77–107 (1996)CrossRefGoogle Scholar
  23. 23.
    Staton, S.: Two cotensors in one: Presentations of algebraic theories for local state and fresh names. In: Proc. of MFPS XXV (2009)Google Scholar
  24. 24.
    Sumii, E.: A complete characterization of observational equivalence in polymorphic λ-calculus with general references. In: Grädel, E., Kahle, R. (eds.) CSL 2009. LNCS, vol. 5771, pp. 455–469. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  25. 25.
    Tzevelekos, N.: Full abstraction for nominal general references. Logical Methods in Computer Science 5(3) (2009)Google Scholar
  26. 26.
    Zhang, Y., Nowak, D.: Logical relations for dynamic name creation. In: Baaz, M., Makowsky, J.A. (eds.) CSL 2003. LNCS, vol. 2803, pp. 575–588. Springer, Heidelberg (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Sam Staton
    • 1
  1. 1.Computer LaboratoryUniversity of Cambridge 

Personalised recommendations