Advertisement

Journal of Automated Reasoning

, Volume 49, Issue 3, pp 363–408 | Cite as

The Locally Nameless Representation

  • Arthur Charguéraud
Article

Abstract

This paper provides an introduction to the locally nameless approach to the representation of syntax with variable binding, focusing in particular on the use of this technique in formal proofs. First, we explain the benefits of representing bound variables with de Bruijn indices while retaining names for free variables. Then, we explain how to describe and manipulate syntax in that form, and show how to define and reason about judgments on locally nameless terms.

Keywords

Locally nameless Cofinite quantification Formal proofs Binders Metatheory 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Altenkirch, T., McBride, C., McKinna, J.: Why Dependent Types Matter. Available from http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.106.8190 (2005). Accessed Apr 2006
  2. 2.
    Aydemir, B., Bohannon, A., Fairbairn, M., Foster, J.N., Pierce, B.C., Sewell, P., Vytiniotis, D., GeoffrG.ey Washburn, Weirich, S., Zdancewic, S.: Mechanized metatheory for the masses: the PoplMark challenge. In: TPHOLs, vol. 3603 of LNCS, pp. 50–65. Springer (2005)Google Scholar
  3. 3.
    Aydemir, B., Weirich, S., Zdancewic, S.: Abstracting Syntax. Technical Reports (CIS) (2009)Google Scholar
  4. 4.
    Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2008)Google Scholar
  5. 5.
    Barras, B., Werner, B.: Coq in coq. Available from http://pauillac.inria.fr/~barras/coq_work-eng.html (1997). Accessed Mar 2006
  6. 6.
    Benton, N., Koutavas, V.: A Mechanized Bisimulation for the Nu-Calculus (2007)Google Scholar
  7. 7.
    Charguéraud, A.: Submission to the PoplMark Challenge, Part 1a. Available from http://arthur.chargueraud.org/research/2006/poplmark/ (2006). Accessed Jul 2009
  8. 8.
    Chlipala, A.: Submission to the PoplMark Challenge, Part 1a. Available from http://www.cs.berkeley.edu/~adamc/poplmark/ (2006). Accessed Jun 2006
  9. 9.
    The Coq Development Team: The Coq Proof Assistant Reference Manual, Version 8.2. Available at http://coq.inria.fr/ (2009). Accessed Jul 2009
  10. 10.
    de Bruijn, N.G.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church–Rosser theorem. Indag. Math. 34(5), 381–392 (1972)Google Scholar
  11. 11.
    de Vries, E., Plasmeijer, R., Abrahamson, D.M.: Uniqueness typing simplified. In: IFL, vol. 5083 of LNCS, pp. 201–218. Springer (2007)Google Scholar
  12. 12.
    Effinger-Dean, L., Grossman, D.: Modular Metatheory for Memory Consistency Models (2010)Google Scholar
  13. 13.
    Garrigue, J.: A Certified Interpreter for ML with Structural Polymorphism (2009)Google Scholar
  14. 14.
    Gordon, A.D.: A mechanisation of name-carrying syntax up to alpha-conversion. In: Proceedings on Higher-order Logic Theorem Proving and its Applications, vol. 780 of LNCS, pp. 414–426. Springer (1993)Google Scholar
  15. 15.
    Gordon, A.D., Melham, T.: Five axioms of alpha-conversion. In: TPHOLs, vol. 1125 of LNCS, pp. 173–190. Springer (1996)Google Scholar
  16. 16.
    Henrio, L., Kammüller, F., Lutz, B., Sudhof, H.: Locally Nameless Sigma Calculus (2010)Google Scholar
  17. 17.
    Huet, G.: The zipper. J. Funct. Program. 7(5), 549–554 (1997) Functional PearlMathSciNetzbMATHCrossRefGoogle Scholar
  18. 18.
    Huet, G.: The constructive engine. In: A Perspective in Theoretical Computer Science: Commerative Volume for Gift Siromoney. World Scientific Publishing (1989) Also available as INRIA Technical Report 110Google Scholar
  19. 19.
    Jia, L., Vaughan, J.A., Mazurak, K., Zhao, J., Zarko, L., Schorr, J., Zdancewic, S.: Aura: a programming language for authorization and audit. In: ACM SIGPLAN International Conference on Functional Programming, pp. 27–38. ACM (2008)Google Scholar
  20. 20.
    Krebbers, R.: A formalization of Γ in Coq. URL: http://robbertkrebbers.nl/research/gammainf/ (2010). Accessed Dec 2010
  21. 21.
    Leroy, X.: A Locally Nameless Solution to the Poplmark Challenge. Technical Report 6098, INRIA (2007)Google Scholar
  22. 22.
    Luo, Z., Pollack, R.: The LEGO proof development system: a user’s manual. Technical Report ECS-LFCS-92-211, University of Edinburgh (1992)Google Scholar
  23. 23.
    McBride, C., McKinna, J.: Functional pearl: I am not a number—I am a free variable. In: ACM SIGPLAN Workshop on Haskell, pp. 1–9. ACM (2004)Google Scholar
  24. 24.
    McKinna, J., Pollack, R.: Pure type systems formalized. In: Typed Lambda Calculi and Applications: International Conference on Typed Lambda Calculi and Applications, TLCA ’93, vol. 664 of LNCS, pp. 289–305. Springer (1993)Google Scholar
  25. 25.
    McKinna, J., Pollack, R.: Some lambda calculus and type theory formalized. J. Autom. Reasoning 23(3–4), 373–409 (1999)MathSciNetzbMATHCrossRefGoogle Scholar
  26. 26.
    Montagu, B.: Mechanizing Core F-zip using the locally nameless approach. In: 5th ACM SIGPLAN Workshop on Mechanizing Metatheory (2010)Google Scholar
  27. 27.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL: A Proof Assistant For Higher-Order Logic, vol. 2283 of LNCS. Springer (2002)Google Scholar
  28. 28.
    Norrish, M., Slind, K.: HOL 4. Available from http://hol.sourceforge.net/ (2007)
  29. 29.
    Papakyriakou, M.A., Gerakios, P.E., Papaspyrou, N.S.: A Mechanized Proof of Type Safety for the Polymorphic λ-calculus with References. In: 6th Panhellenic Logic Symposium (2007)Google Scholar
  30. 30.
    Paulson, L.C.: Natural deduction as higher-order resolution. J. Log. Program. 3, 237–258 (1986)MathSciNetzbMATHCrossRefGoogle Scholar
  31. 31.
    Paulson, L.C.: A Preliminary User’s Manual for Isabelle. Technical Report TR-133, Computer Laboratory, University of Cambridge (1988)Google Scholar
  32. 32.
    Paulson, L.C.: ML for the Working Programmer. Cambridge University Press (1991)Google Scholar
  33. 33.
    Plotkin, G.: Call-by-name, call-by-value and the λ-calculus. Theor. Comp. Sci. 1(2), 125–159 (1975)MathSciNetzbMATHCrossRefGoogle Scholar
  34. 34.
    Pollack, R.: Reasoning About Languages with Binding: Can We Do It Yet? Slides from http://homepages.inf.ed.ac.uk/rpollack/export/bindingChallenge_slides.pdf (2006). Accessed Mar 2006
  35. 35.
    Pollack, R.: Closure under alpha-conversion. In: TYPES’93: Workshop on Types for Proofs and Programs, Nijmegen, May 1993, Selected Papers, vol. 806 of LNCS, pp. 313–332. Springer (1994)Google Scholar
  36. 36.
    Pollack, R.: The Theory of LEGO: A Proof Checker for the Extended Calculus of Constructions. PhD thesis, Univ. of Edinburgh (1994)Google Scholar
  37. 37.
    Pratikakis, P., Foster, J.S., Hicks, M., Neamtiu, I.: Formalizing soundness of contextual effects. In: Theorem Proving in Higher Order Logics, vol. 5170 of LNCS, pp. 262–277. Springer (2008)Google Scholar
  38. 38.
    Rendel, T., Ostermann, K., Hofer, C.: Typed self-representation. In: Proceedings of the 2009 ACM SIGPLAN conference on Programming Language Design and Implementation, pp. 293–303. ACM (2009)Google Scholar
  39. 39.
    Ricciotti, W.: Submission to the PoplMark Challenge, Part 1a. Available from http://ricciott.web.cs.unibo.it/ (2007). Accessed Feb 2007
  40. 40.
    Rossberg, A., Russo, C.V., Dreyer, D.: F-ing modules. In: Workshop on Types in Language Design and Implementation, pp. 89–102. ACM (2010)Google Scholar
  41. 41.
    Russo, C.V., Vytiniotis, D.: QML: explicit first-class polymorphism for ML. In: Proceedings of the 2009 ACM SIGPLAN workshop on ML, pp. 3–14. ACM (2009)Google Scholar
  42. 42.
    Shinwell, M.R., Pitts, A.M., Gabbay, M.: FreshML: programming with binders made simple. In: Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming, ICFP, pp. 263–274. ACM (2003)Google Scholar
  43. 43.
    Swamy, N., Hicks, M.: Verified enforcement of stateful information release policies. SIGPLAN Not. 43(12), 21–31 (2008)CrossRefGoogle Scholar
  44. 44.
    Urban, C.: Nominal techniques in Isabelle/HOL. J. Autom. Reason. 40, 327–356 (2008)MathSciNetzbMATHCrossRefGoogle Scholar
  45. 45.
    Yakobowski, B.: Graphical Types and Constraints: Second-order Polymorphism and Inference. PhD thesis, Université Paris-Diderot (2008)Google Scholar
  46. 46.
    Zhao, J., Zhang, Q., Zdancewic, S.: Relational parametricity for a polymorphic linear lambda calculus. In: APLAS, vol. 6461 of LNCS, pp. 344–359. Springer (2010)Google Scholar

Copyright information

© Springer Science+Business Media B.V. 2011

Authors and Affiliations

  1. 1.Max-Planck Institute for Software SystemsSaarbrückenGermany

Personalised recommendations