Abstract
Dealing with variable binding during the formalization of programming languages metatheory is notorious for being a very complex issue. This paper introduces a new framework, DBEB, and a tool based on it, DBGen, whose purpose is to generate Coq code providing a rather complete infrastructure for de Bruijn encodings of a large variety of languages. DBEB is an abstract syntax with explicit binding informations that captures the great regularity of de Bruijn syntaxes. From this abstract syntax it is then possible to derive all the definitions and property statements and proofs required for the formalization of the syntactic infrastructure of the language.
Thereby, from a Coq inductive definition of a syntax in de Bruijn style, annotated with comments that make explicit its binding structure within DBEB, DBGen produces a Coq module with term structures definitions and a significant amount of properties (and their proof), up to the substitution lemma. Mutually defined syntaxes are supported, and such definitions may contain several distinct sets of variables. Moreover, this framework handles the generation of a named syntax for “usual” binding with explicit variables together with a smart translation function that greatly improves the readability of de Bruijn terms.
Keywords
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
de Bruijn, N.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the church-rosser theorem. Indagationes Mathematicae (Proceedings) 75(5), 381–392 (1972)
Aydemir, B.E., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: Necula, G.C., Wadler, P. (eds.) Proceeding of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 3–15. ACM (2008)
Gabbay, M.J., Pitts, A.M.: A new approach to abstract syntax with variable binding. Formal Aspects of Computing 13, 341–363 (2001)
Pitts, A.M.: Nominal logic, a first order theory of names and binding. Information and Computation 186, 165–193 (2003)
Urban, C., Tasson, C.: Nominal techniques in isabelle/hol. In: Nieuwenhuis, R. (ed.) CADE 2005. LNCS (LNAI), vol. 3632, pp. 38–53. Springer, Heidelberg (2005)
Charguéraud, A.: The locally nameless representation. Journal of Automated Reasoning (2011)
Aydemir, B., Weirich, S.: LNgen: Tool support for locally nameless representations (March 2009)
Polonowski, E.: DBGen User Manual, TR–LACL–2012–4 This document introduces DBGen, an automatic generator of De Bruijn infrastructure for the Coq proof assistant. TR–LACL–2012–4 (2012)
Church, A.: The Calculi of Lambda Conversion. Princeton University Press (1941)
Aydemir, B., et al.: Mechanized metatheory for the masses: The poplmark challenge. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 50–65. Springer, Heidelberg (2005)
Girard, J.Y., Taylor, P., Lafont, Y.: Proofs and Types. Cambridge University Press (1990)
Klop, J.W., van Oostrom, V., van Raamsdonk, F.: Combinatory reduction systems: introduction and survey. Theoretical Computer Science 121(1-2), 279–308 (1993)
Lee, G., Oliveira, B.C.D.S., Cho, S., Yi, K.: Gmeta: A generic formal metatheory framework for first-order representations. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 436–455. Springer, Heidelberg (2012)
Sewell, P., Nardelli, F.Z., Owens, S., Peskine, G., Ridge, T., Sarkar, S., Strinsa, R.: Ott: Effective tool support for the working semanticist. Journal of Functional Programming 20, 71–122 (2010)
Crolard, T., Polonowski, E.: A program logic for higher-order procedural variables and non-local jumps. Technical Report TR-LACL-2011-4, 50 pages (2011-2012)
Crolard, T., Polonowski, E.: Deriving a Floyd-Hoare logic for non-local jumps from a formulæ-as-types notion of control. Journal of Logic and Algebraic Programming, 181–208 (2012)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Polonowski, E. (2013). Automatically Generated Infrastructure for De Bruijn Syntaxes. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds) Interactive Theorem Proving. ITP 2013. Lecture Notes in Computer Science, vol 7998. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-39634-2_29
Download citation
DOI: https://doi.org/10.1007/978-3-642-39634-2_29
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-39633-5
Online ISBN: 978-3-642-39634-2
eBook Packages: Computer ScienceComputer Science (R0)