## Completeness for algebraic theories of local state

Citations: | 4 - 1 self |

### BibTeX

@MISC{Staton_completenessfor,

author = {Sam Staton},

title = {Completeness for algebraic theories of local state},

year = {}

}

### OpenURL

### Abstract

Abstract. Every algebraic theory gives rise to a monad, and monads allow a meta-language which is a basic programming language with sideeffects. 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

### Citations

733 | Notions of Computation and Monads
- Moggi
- 1991
(Show Context)
Citation Context ...tional axiom regarding quotient types. 1 Introduction In this paper we are interested in reasoning about local state, about programs such as let val a = ref(3) in a:=4; !a end; (1) As Moggi suggested =-=[16]-=-, one way to give a denotational semantics to a sideeffecting program of type τ1 → τ2 is to give a morphism �τ1� → T (�τ2�), in a category equipped with a monad T . Many monads arise as free models of... |

208 | A new approach to abstract syntax with variable binding
- Gabbay, Pitts
- 2002
(Show Context)
Citation Context ...ons between programs that can be accommodated in our model. For local state, the category of sets is insufficient, and so we move to the category of nominal sets (first considered by Gabbay and Pitts =-=[9]-=- as a model of variable binding). This category has an object A of ‘atoms’, which we will think of as locations. This object captures many of the important properties of locations. It is infinite, alt... |

189 | Toposes, Triples, and Theories
- Barr, Wells
- 1985
(Show Context)
Citation Context ...te: Proposition 2. The free algebra over X for the theory of local state has carrier TGS(TBK(X)). Recall that the composition of two monads is not a monad unless one can give a distributive law (e.g. =-=[2]-=-). Equations LS1–4 can be understood as defining a distributive law δ : TBK · TGS → TGS · TBK (see also [11, §4], [21]): let ( ) ( ′ δX[s, χ]≏ (S) = S |(A\dom(s)) ∪ S| dom(s) , [ S ′ |(dom(s)∩supp(x))... |

119 | Observable properties of higher order functions that dynamically create local names, or: What’s new
- PITTS, STARK
- 1993
(Show Context)
Citation Context ... known that such a naive semantics is limited at higher-order. At higher order, a more careful treatment of functions is needed. Consider the following programs, of type 1 → T (A →{tt, ff}) (see e.g. =-=[19]-=-). let a ⇐ ref(v) in (λb. ff) let a ⇐ ref(v) in (λb. [a ? = b]) (2) (Here, [(−) ? =(−)]: A →{tt, ff} is the equality test function.) There is a compelling operational argument for considering these ex... |

102 | Parametricity and local variables
- O’Hearn, Tennent
- 2008
(Show Context)
Citation Context ... b]) ) in card(i(f)) = 1 2The problem here is that the composite (card ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations =-=[3, 4, 15, 18, 22, 26]-=-, game semantics [1, 14, 17], and bisimulation [12, 24] to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new prese... |

58 |
Adjunctions whose counits are coequalizers, and presentations of finitary enriched monads, Journal of pure and applied algebra 89
- Kelly, Power
- 1993
(Show Context)
Citation Context ...tated and proved. 2 Presentations of enriched algebraic theories and strong monads We now recall some aspects of the presentation of enriched algebraic theories from the exposition by Kelly and Power =-=[13]-=-, simplified and adapted to the needs of this work. In particular, we focus on the case of cartesian structure, rather than arbitrary monoidal structure. Let C be a cartesian closed category. A signat... |

57 | Relational reasoning in a nominal semantics for storage
- Benton, Leperchley
- 2005
(Show Context)
Citation Context ... b]) ) in card(i(f)) = 1 2The problem here is that the composite (card ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations =-=[3, 4, 15, 18, 22, 26]-=-, game semantics [1, 14, 17], and bisimulation [12, 24] to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new prese... |

55 | Notions of computation determine monads
- Plotkin, Power
- 2002
(Show Context)
Citation Context ...e programs such as (1). The central contribution of this paper is Theorem 5, where we show that the enriched algebraic theory of local state is complete. This solves a conjecture of Plotkin and Power =-=[20]-=-. For Theorem 5 to hold, the set of storable values must be infinite. When it is finite, the theory of local state is not complete. If there are only two values, then there is an interesting additiona... |

39 | Categorical models for local names
- Stark
- 1996
(Show Context)
Citation Context ... b]) ) in card(i(f)) = 1 2The problem here is that the composite (card ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations =-=[3, 4, 15, 18, 22, 26]-=-, game semantics [1, 14, 17], and bisimulation [12, 24] to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new prese... |

32 | Nominal games and full abstraction for the nu-calculus
- ABRAMSKY, GHICA, et al.
- 2004
(Show Context)
Citation Context ...here is that the composite (card ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations [3, 4, 15, 18, 22, 26], game semantics =-=[1, 14, 17]-=-, and bisimulation [12, 24] to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new presentation of a theory of local... |

30 | Combining effects: sum and tensor - Hyland, Plotkin, et al. - 2006 |

27 |
Nominal equational logic
- Clouston, Pitts
(Show Context)
Citation Context ...tate, enriched in the category of nominal sets. The theory is parametrized on a set V of values. 6(We could alternatively reason about the theory of local state in a ‘nominal equational logic’ (e.g. =-=[5, 6, 8]-=-) but we would then have to restrict to a finite set of values and we would have no guarantee of the strength of the resulting monad.) 4.1 Algebras for local state We now construct algebras for the th... |

24 |
Comparing operational models of name-passing process calculi
- Fiore, Staton
(Show Context)
Citation Context ...-stabilizer theorem: Orb is the set of orbits of X; and the finite groups Go generate the stabilizers. This characterization forms the correspondence between nominal sets and named sets with symmetry =-=[7, 10]-=-. We now pick an enumeration of distinct atoms {b1, . . . , bn}, and we pick representatives (s, x) and (s ′ ,x ′ ) of the ≏-equivalence classes λ(γ( ⃗ b))) and ρ(γ( ⃗ b))) respectively. Without loss ... |

23 | Towards a theory of bisimulation for local names
- Jeffrey, Rathke
- 1999
(Show Context)
Citation Context ...rd ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations [3, 4, 15, 18, 22, 26], game semantics [1, 14, 17], and bisimulation =-=[12, 24]-=- to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new presentation of a theory of local state in Section 4. In Sec... |

16 | A complete characterization of observational equivalence in polymorphic λ-calculus with general references
- Sumii
- 2009
(Show Context)
Citation Context ...rd ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations [3, 4, 15, 18, 22, 26], game semantics [1, 14, 17], and bisimulation =-=[12, 24]-=- to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new presentation of a theory of local state in Section 4. In Sec... |

13 | A formal calculus for informal equality with binding
- Gabbay, Mathijssen
- 2007
(Show Context)
Citation Context ...tate, enriched in the category of nominal sets. The theory is parametrized on a set V of values. 6(We could alternatively reason about the theory of local state in a ‘nominal equational logic’ (e.g. =-=[5, 6, 8]-=-) but we would then have to restrict to a finite set of values and we would have no guarantee of the strength of the resulting monad.) 4.1 Algebras for local state We now construct algebras for the th... |

12 | Full abstraction for nominal general references
- TZEVELEKOS
(Show Context)
Citation Context ...of values is finite. This notion of completeness is arguably too strong, because the nominal set (A3/C3) would never arise as the denotation of an intensional type. Recall from the work of Tzevelekos =-=[25]-=- that a nominal set X is said to be strong if, for all x ∈ X and a ∈ supp(x), if π •x = x then π(a) =a. Equivalently, a nominal set is strong if it is isomorphic to a coproduct of nominal sets of the ... |

10 | About permutation algebras, (pre)sheaves and named sets
- Gadducci, Miculan, et al.
- 2006
(Show Context)
Citation Context ...-stabilizer theorem: Orb is the set of orbits of X; and the finite groups Go generate the stabilizers. This characterization forms the correspondence between nominal sets and named sets with symmetry =-=[7, 10]-=-. We now pick an enumeration of distinct atoms {b1, . . . , bn}, and we pick representatives (s, x) and (s ′ ,x ′ ) of the ≏-equivalence classes λ(γ( ⃗ b))) and ρ(γ( ⃗ b))) respectively. Without loss ... |

10 |
A game semantics of names and pointers
- LAIRD
(Show Context)
Citation Context ...here is that the composite (card ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations [3, 4, 15, 18, 22, 26], game semantics =-=[1, 14, 17]-=-, and bisimulation [12, 24] to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new presentation of a theory of local... |

9 |
Term equational systems and logics
- Fiore, Hur
(Show Context)
Citation Context ...tate, enriched in the category of nominal sets. The theory is parametrized on a set V of values. 6(We could alternatively reason about the theory of local state in a ‘nominal equational logic’ (e.g. =-=[5, 6, 8]-=-) but we would then have to restrict to a finite set of values and we would have no guarantee of the strength of the resulting monad.) 4.1 Algebras for local state We now construct algebras for the th... |

4 | Semantics for local computational effects
- Power
(Show Context)
Citation Context ...position of two monads is not a monad unless one can give a distributive law (e.g. [2]). Equations LS1–4 can be understood as defining a distributive law δ : TBK · TGS → TGS · TBK (see also [11, §4], =-=[21]-=-): let ( ) ( ′ δX[s, χ]≏ (S) = S |(A\dom(s)) ∪ S| dom(s) , [ S ′ |(dom(s)∩supp(x)) ,x ] ) ≏ where (S ′ ,x)=χ(S|(A\dom(s)) ∪ s). 5 Completeness We now show that the theory of local state is complete, i... |

3 |
Realizability semantics of parametric polymorphism, references, and recursive types
- Birkedal, Støvring, et al.
- 2009
(Show Context)
Citation Context |

3 |
Two cotensors in one: Presentations of algebraic theories for local state and fresh names
- Staton
(Show Context)
Citation Context ...mations {βn : XA⊗(n+1) the following diagrams commute: → X (A⊗n ×Z) }n∈N making X (A⊗n ×A) X pn �� A X ⊗(n+1) for every n ∈ N. (β 0 � A⊗n ) � (β n ) �� X (A⊗n ×Z) I present an alternative solution in =-=[23]-=-, but using a more generous enrichment for which the completeness theorem (Thm. 5) does not hold. Acknowledgements. It has been helpful to talk with Marcelo Fiore, Chung-Kil Hur, Paul Levy, Tadeusz Li... |

3 | Logical relations for dynamic name creation
- Zhang, Nowak
- 2003
(Show Context)
Citation Context |

2 | Full abstraction for Reduced ML
- Murawski, Tzevelekos
(Show Context)
Citation Context ...here is that the composite (card ·i) : [A →{tt, ff}] → (N⊎{ω}) will not be definable in any reasonable programming language. Authors have used logical relations [3, 4, 15, 18, 22, 26], game semantics =-=[1, 14, 17]-=-, and bisimulation [12, 24] to make denotational semantics that can support some higher-order properties. Structure. After recalling background material, I give a new presentation of a theory of local... |

1 |
A nominal relational model for local variables
- Møgelberg
- 2009
(Show Context)
Citation Context |