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.
Chapter PDF
References
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)
Barr, M., Wells, C.: Toposes, Triples and Theories. Springer, Heidelberg (1984)
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)
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)
Clouston, R.A., Pitts, A.M.: Nominal equational logic. In: Articles dedicated to Gordon Plotkin. ENTCS, vol. 172, pp. 223–257 (2007)
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)
Fiore, M.P., Staton, S.: Comparing operational models of name-passing process calculi. Inform. and Comput. 204(4), 435–678 (2006)
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)
Gabbay, M.J., Pitts, A.M.: A new approach to abstract syntax with variable binding. Formal Aspects of Computing 13, 341–363 (2001)
Gadducci, F., Miculan, M., Montanari, U.: About permutation algebras (pre)sheaves and named sets. Higher-Order Symb. Comput. 19(2-3), 283–304 (2006)
Hyland, M., Plotkin, G.D., Power, J.: Combining effects: Sum and tensor. Theoret. Comput. Sci. 357, 70–99 (2006)
Jeffrey, A., Rathke, J.: Towards a theory of bisimulation for local names. In: Proc. of LICS 1999, pp. 56–66 (1999)
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)
Laird, J.: A game semantics of names and pointers. Ann. Pure Appl. Logic 151(2-3), 151–169 (2008)
Møgelberg, R.E.: A nominal relational model for local variables. Draft (2009)
Moggi, E.: Notions of computation and monads. Inform. and Comput. 93(1), 55–92
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)
O’Hearn, P.W., Tennant, R.D.: Parametricity and local variables. J. ACM 42(3), 658–709 (1995)
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)
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), http://homepages.inf.ed.ac.uk/gdp/publications/
Power, J.: Semantics for local computational effects. In: Proc. of MFPS XXII (2006)
Stark, I.: Categorical models for local names. LISP and Symbolic Computation 9(1), 77–107 (1996)
Staton, S.: Two cotensors in one: Presentations of algebraic theories for local state and fresh names. In: Proc. of MFPS XXV (2009)
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)
Tzevelekos, N.: Full abstraction for nominal general references. Logical Methods in Computer Science 5(3) (2009)
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)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Staton, S. (2010). Completeness for Algebraic Theories of Local State. In: Ong, L. (eds) Foundations of Software Science and Computational Structures. FoSSaCS 2010. Lecture Notes in Computer Science, vol 6014. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12032-9_5
Download citation
DOI: https://doi.org/10.1007/978-3-642-12032-9_5
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-12031-2
Online ISBN: 978-3-642-12032-9
eBook Packages: Computer ScienceComputer Science (R0)