Proof-Relevant Logical Relations for Name Generation

  • Nick Benton
  • Martin Hofmann
  • Vivek Nigam
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7941)


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. 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
  2. 2.
    Barthe, G., Capretta, V., Pons, O.: Setoids in type theory. J. Funct. Program. 13(2), 261–293 (2003)MathSciNetMATHCrossRefGoogle Scholar
  3. 3.
    Benton, N., Hofmann, M., Nigam, V.: Abstract effects and proof-relevant logical relations. CoRR abs/1212.5692 (2012)Google Scholar
  4. 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
  5. 5.
    Benton, N., Kennedy, A., Hofmann, M., Beringer, L.: Reading, writing and relations: Towards extensional semantics for effect analyses. In: Kobayashi, N. (ed.) APLAS 2006. LNCS, vol. 4279, pp. 114–130. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  6. 6.
    Benton, N., Koutavas, V.: A mechanized bisimulation for the nu-calculus. In: Higher-Order and Symbolic Computation (to appear, 2013) Google Scholar
  7. 7.
    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)CrossRefGoogle Scholar
  8. 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
  9. 9.
    Carboni, A., Freyd, P.J., Scedrov, A.: A categorical approach to realizability and polymorphic types. In: Main, M.G., Mislove, M.W., Melton, A.C., Schmidt, D. (eds.) MFPS 1987. LNCS, vol. 298, pp. 23–42. Springer, Heidelberg (1988)CrossRefGoogle Scholar
  10. 10.
    Gabbay, M., Pitts, A.M.: A new approach to abstract syntax with variable binding. Formal Asp. Comput. 13(3-5), 341–363 (2002)MATHCrossRefGoogle Scholar
  11. 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
  12. 12.
    Pitts, A.M., Stark, I.D.B.: 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, pp. 122–141. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  13. 13.
    Shinwell, M.R.: The Fresh Approach: functional programming with names and binders. PhD thesis, University of Cambridge (2004)Google Scholar
  14. 14.
    Shinwell, M.R., Pitts, A.M.: On a monadic semantics for freshness. Theor. Comput. Sci. 342(1), 28–55 (2005)MathSciNetMATHCrossRefGoogle Scholar
  15. 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. 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. 17.
    Tzevelekos, N.: Program equivalence in a simple language with state. Computer Languages, Systems and Structures 38(2) (2012)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Nick Benton
    • 1
  • Martin Hofmann
    • 2
  • Vivek Nigam
    • 3
  1. 1.Microsoft ResearchCambridgeUK
  2. 2.LMUMunichGermany
  3. 3.UFPBJoão PessoaBrazil

Personalised recommendations