A computational approach to reflective meta-reasoning about languages with bindings

We present a foundation for a computational meta-theory of languages with bindings implemented in a computer-aided formal reasoning environment. Our theory provides the ability to reason abstractly about operators, languages, open-ended languages, classes of languages, etc. The theory is based on the ideas of higher-order abstract syntax, with an appropriate induction principle parameterized over the language i.e. a set of operators) being used. In our approach, both the bound and free variables are treated uniformly and this uniform treatment extends naturally to variable-length bindings. The implementation is reflective, namely there is a natural mapping between the meta-language of the theorem-prover and the object language of our theory. The object language substitution operation is mapped to the meta-language substitution and does not need to be defined recursively. Our approach does not require designing a custom type theory; in this paper we describe the implementation of this foundational theory within a general-purpose type theory. This work is fully implemented in the MetaPRL theorem prover, using the pre-existing NuPRL-like Martin-Lof-style computational type theory. Based on this implementation, we lay out an outline for a framework for programming language experimentation and exploration as well as a general reflective reasoning framework. This paper also includes a short survey of the existing approaches to syntactic reflection.

[1]  Andrzhei︠a︡ Mostowski Sentences Undecidable in Formalized Arithmetic: An Exposition of the Theory of Kurt Godel , 1982 .

[2]  Tobias Nipkow,et al.  Isabelle tutorial and user’s manual , 1990 .

[3]  Joëlle Despeyroux,et al.  Recursion over objects of functional type , 2001, Math. Struct. Comput. Sci..

[4]  Jason Hickey,et al.  Fault-Tolerant Distributed Theorem Proving , 1999, CADE.

[5]  Xin Yu,et al.  MetaPRL - A Modular Logical Environment , 2003, TPHOLs.

[6]  Freek Wiedijk,et al.  Hierarchical Reflection , 2004, TPHOLs.

[7]  Jason J. Hickey Nuprl-Light: An Implementation Framework for Higher-Order Logics , 1997, CADE.

[8]  Lawrence Charles Paulson,et al.  Isabelle: A Generic Theorem Prover , 1994 .

[9]  Gordon Plotkin,et al.  An Illative Theory of Relations , 2003 .

[10]  J. Hickey The MetaPRL Logical Programming Environment , 2000 .

[11]  Amy P. Felty,et al.  Higher-Order Abstract Syntax in Coq , 1995, TLCA.

[12]  Frank Pfenning,et al.  Primitive recursion for higher-order abstract syntax , 1997, Theoretical Computer Science.

[13]  Eli Barzilay Quotation and Reflection in Nuprl and Scheme , 2001 .

[14]  de Ng Dick Bruijn,et al.  Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem , 1972 .

[15]  Fausto Giunchiglia,et al.  Reflection in Constructive and Non-constructive Automated Reasoning , 1988, META.

[16]  Alan Bundy Proceedings of the 12th International Conference on Automated Deduction , 1994 .

[17]  Frank Pfenning,et al.  Elf: a language for logic definition and verified metaprogramming , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[18]  Sergei N. Artëmov On Explicit Reflection in Theorem Proving and Formal Verification , 1999, CADE.

[19]  Michael Norrish Recursive Function Definition for Types with Binders , 2004, TPHOLs.

[20]  Roy L. Crole,et al.  Combining Higher Order Abstract Syntax with Tactical Theorem Proving and (Co)Induction , 2002, TPHOLs.

[21]  S. Allen A Non-Type-Theoretic Semantics for Type-Theoretic Language , 1987 .

[22]  J. Heijenoort From Frege to Gödel: A Source Book in Mathematical Logic, 1879-1931 , 1967 .

[23]  J. Harrison Metatheory and Reflection in Theorem Proving: A Survey and Critique , 1995 .

[24]  Frank Pfenning,et al.  Primitive recursion for higher-order abstract syntax , 1997, Theor. Comput. Sci..

[25]  Herman Geuvers,et al.  Equational Reasoning via Partial Reflection , 2000, TPHOLs.

[26]  J. Ferreirós From Frege to Gödel. A Source Book in Mathematical Logic, 1879¿1931: By Jean van Heijenoort. Cambridge, MA (Harvard University Press). 1967; new paperback edn., 2002. 664 pages, 1 halftone. ISBN: 0-674-32449-8. $27.95 , 2004 .

[27]  Rohit Parikh,et al.  Existence and feasibility in arithmetic , 1971, Journal of Symbolic Logic.

[28]  Robert L. Constable,et al.  The semantics of reflected proof , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[29]  Stefan Bauer-Mengelberg,et al.  Über die Länge yon Beweisen , 1990 .

[30]  Robert L. Constable,et al.  Using Reflection to Explain and Enhance Type Theory , 1995 .

[31]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[32]  Gérard P. Huet,et al.  Proving and applying program transformations expressed with second-order patterns , 1978, Acta Informatica.

[33]  Eli Barzilay,et al.  Reflecting Higher-Order Abstract Syntax in Nuprl ? , 2002 .

[34]  A. Ehrenfeucht,et al.  Abbreviating proofs by adding new axioms , 1971 .

[35]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[36]  Stuart Allen A Non-Type-Theoretic Definition of Martin-Löf's Types , 1987, LICS.

[37]  Gordon D. Plotkin,et al.  Abstract syntax and variable binding , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[38]  G. Hasenjaeger Review: Andrzej Mostowski, Sentences Undecidable in Formalized Arithmetic. An Exposition of the Theory of Kurt Godel , 1954 .

[39]  Amy P. Felty,et al.  Proceedings of the 10th International Conference on Theorem Proving in Higher Order Logics , 1997 .

[40]  Joëlle Despeyroux,et al.  A Modal Lambda Calculus with Iteration and Case Constructs , 1998, TYPES.

[41]  Andrew D. Gordon,et al.  Five Axioms of Alpha-Conversion , 1996, TPHOLs.

[42]  Jason Hickey,et al.  Sequent Schema for Derived Rules , 2002, TPHOLs.

[43]  Christoph Kreitz,et al.  The Nuprl Open Logical Environment , 2000, CADE.

[44]  Daniel P. Huttenlocher,et al.  Shared annotation for cooperative learning , 1995, CSCL.

[45]  André Hirschowitz,et al.  Higher-Order Abstract Syntax with Induction in Coq , 1994, LPAR.

[46]  Roy L. Crole,et al.  A definitional approach to primitivexs recursion over higher order abstract syntax , 2003, MERLIN '03.

[47]  Sergei N. Artëmov Evidence-Based Common Knowledge , 2005 .

[48]  Jim Grundy,et al.  A reflective functional language for hardware design and theorem proving , 2005, Journal of Functional Programming.

[49]  Robert L. Constable,et al.  Metalogical Frameworks II: Developing a Reflected Decision Procedure , 1999, Journal of Automated Reasoning.

[50]  Carsten Schürmann Recursion for Higher-Order Encodings , 2001, CSL.

[51]  Eric Aaron,et al.  Justifying Calculational Logic by a Conventional Metalinguistic Semanti cs , 1999 .

[52]  Eli Barzilay,et al.  Implementing Reflection in Nuprl , 2005 .

[53]  Brian Cantwell Smith,et al.  Reflection and semantics in LISP , 1984, POPL.

[54]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[55]  Benjamin C. Pierce,et al.  Mechanized Metatheory for the Masses: The PoplMark Challenge , 2005, TPHOLs.

[56]  K. Gödel Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I , 1931 .

[57]  K. Gödel Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I , 1931 .