Automatically generated infrastructure for de bruijn syntaxes

  • Authors:
  • Emmanuel Polonowski

  • Affiliations:
  • LACL, University Paris-East Créteil, Créteil, France

  • Venue:
  • ITP'13 Proceedings of the 4th international conference on Interactive Theorem Proving
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

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.