Proof-Relevant Logical Relations for Name Generation
Pitts and Stark’s ν-calculus is a paradigmatic total language for studying the problem of contextual equivalence in higher-order languages with name generation. Models for the ν-calculus that validate basic equivalences concerning names may be constructed using functor categories or nominal sets, with a dynamic allocation monad used to model computations that may allocate fresh names. If recursion is added to the language and one attempts to adapt the models from (nominal) sets to (nominal) domains, however, the direct-style construction of the allocation monad no longer works. This issue has previously been addressed by using a monad that combines dynamic allocation with continuations, at some cost to abstraction.
This paper presents a direct-style model of a ν-calculus-like language with recursion using the novel framework of proof-relevant logical relations, in which logical relations also contain objects (or proofs) demonstrating the equivalence of (the semantic counterparts of) programs. Apart from providing a fresh solution to an old problem, this work provides an accessible setting in which to introduce the use of proof-relevant logical relations, free of the additional complexities associated with their use for more sophisticated languages.
- 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: Proc. 19th Annual IEEE Symposium on Logic in Computer Science (LICS 2004). IEEE Computer Society (2004)Google Scholar
- 3.Benton, N., Hofmann, M., Nigam, V.: Abstract effects and proof-relevant logical relations. CoRR abs/1212.5692 (2012)Google Scholar
- 4.Benton, N., Kennedy, A., Beringer, L., Hofmann, M.: Relational semantics for effect-based program transformations with dynamic allocation. In: Proc. Ninth International ACM SIGPLAN Symposium on Principles and Practice of Declarative Programming (PPDP 2007). ACM (2007)Google Scholar
- 6.Benton, N., Koutavas, V.: A mechanized bisimulation for the nu-calculus. In: Higher-Order and Symbolic Computation (to appear, 2013) Google Scholar
- 8.Birkedal, L., Carboni, A., Rosolini, G., Scott, D.S.: Type theory via exact categories. In: Proc. 13th Annual IEEE Symposium on Logic in Computer Science (LICS 1998). IEEE Computer Society Press (1998)Google Scholar
- 11.Pitts, A., Stark, I.: Operational reasoning for functions with local state. In: Higher Order Operational Techniques in Semantics, pp. 227–273. Cambridge University Press (1998)Google Scholar
- 13.Shinwell, M.R.: The Fresh Approach: functional programming with names and binders. PhD thesis, University of Cambridge (2004)Google Scholar
- 15.Shinwell, M.R., Pitts, A.M., Gabbay, M.J.: FreshML: Programming with binders made simple. In: Proc. Eighth ACM SIGPLAN International Conference on Functional Programming (ICFP 2003). ACM (2003)Google Scholar
- 16.Stark, I.D.B.: Names and Higher-Order Functions. PhD thesis, University of Cambridge, Cambridge, UK, Also published as Technical Report 363, University of Cambridge Computer Laboratory (December 1994)Google Scholar
- 17.Tzevelekos, N.: Program equivalence in a simple language with state. Computer Languages, Systems and Structures 38(2) (2012)Google Scholar