Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

Mechanized meta-reasoning using a hybrid HOAS/de bruijn representation and reflection

Published: 16 September 2006 Publication History

Abstract

We investigate the development of a general-purpose framework for mechanized reasoning about the meta-theory of programming languages. In order to provide a standard, uniform account of a programming language, we propose to define it as a logic in a logical framework, using the same mechanisms for definition, reasoning, and automation that are available to other logics. Then, in order to reason about the language's meta-theory, we use reflection to inject the programming language into (usually richer and more expressive) meta-theory.One of the key features of our approach is that structure of the language is preserved when it is reflected, including variables, meta-variables, and binding structure. This allows the structure of proofs to be preserved as well, and there is a one-to-one map from proof steps in the original programming logic to proof steps in the reflected logic. The act of reflecting a language is automated; all definitions, theorems, and proofs are preserved by the transformation and all the key lemmas (such as proof and structural induction) are automatically derived.The principal representation used by the reflected logic is higher-order abstract syntax (HOAS). However, reasoning about terms in HOAS can be awkward in some cases, especially for variables. For this reason, we define a computationally equivalent variable-free de Bruijn representation that is interchangeable with the HOAS in all contexts. The de Bruijn representation inherits the properties of substitution and alpha-equality from the logical framework, and it is not complicated by administrative issues like variable renumbering.We further develop the concepts and principles of proofs, provability, and structural and proof induction. This work is fully implemented in the MetaPRL theorem prover. We illustrate with an application to F<: as defined in the POPLmark challenge.

References

[1]
William Aitken and Robert L. Constable. Reflecting on NuPRL: Lessons 1-4. Technical report, Cornell University, Computer Science Department, Ithaca, NY, 1992.
[2]
William Aitken, Robert L. Constable, and Judith Underwood. Metalogical Frameworks II: Using reflected decision procedures. Journal of Automated Reasoning, 22(2):171--221, 1993.
[3]
Stuart F. Allen, Robert L. Constable, Douglas J. Howe, and William Aitken. The semantics of reflected proof. In Proceedings of the 5th Symposium on Logic in Computer Science, pages 95--197. IEEE Computer Society Press, June 1990.
[4]
Brian E. Aydemir, Aaron Bohannon, Matthew Fairbairn, J. Nathan Foster, Benjamin C. Pierce, Peter Sewell, Dimitrios Vytiniotis, Geoffrey Washburn, Stephanie Weirich, and Steve Zdancewic. Mechanized metatheory for the masses: The POPLmark challenge. Available from http://www.cis.upenn.edu/group/proj/plclub/mmm/,2005.
[5]
James Cheney. Towards a general theory of names, binding and scope. In Proceedings of the 2005 workshop on Mechanized reasoning about languages with variable binding, pages 33--40. ACM Press, 2005.
[6]
Robert L. Constable. Using reflection to explain and enhance type theory. In Helmut Schwichtenberg, editor, Proof and Computation, volume 139 of NATO Advanced Study Institute, International Summer School held in Marktoberdorf, Germany, July 20-August 1, NATO Series F, pages 65--100. Springer, Berlin, 1994.
[7]
N.G. de Bruijn. Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem. Indagaciones Mathematische, 34:381--392, 1972. This also appeared in the Proceedings of the Koninklijke Nederlandse Akademie van Wetenschappen, Amsterdam, series A, 75, No. 5.
[8]
Kurt Gödel. Über formal unentscheidbare sätze der principia mathematica und verwandter systeme I. Monatshefte für Mathematik und Physik, 38:173--198, 1931. English version in {24}.
[9]
Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the Association for Computing Machinery, 40(1):143--184, January 1993. A revised and expanded version of the 1987 paper.
[10]
J. Harrison. Metatheory and reflection in theorem proving: A survey and critique. Technical Report CRC-53, SRI International, Cambridge Computer Science Research Centre, Millers Yard, Cambridge, UK, February 1995.
[11]
Dimitri Hendriks. Proof reflection in Coq. Journal of Automated Reasoning, 29(3):277--307, 2002.
[12]
Jason Hickey, Aleksey Nogin, Robert L. Constable, Brian E. Aydemir, Eli Barzilay, Yegor Bryukhov, Richard Eaton, Adam Granicz, Alexei Kopylov, Christoph Kreitz, Vladimir N. Krupski, Lori Lorigo, Stephan Schmitt, Carl Witty, and Xin Yu. MetaPRL-A modular logical environment. In David Basin and Burkhart Wolff, editors, Proceedings of the 16th International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2003), volume 2758 of Lecture Notes in Computer Science, pages 287--303. Springer-Verlag, 2003
[13]
Jason Hickey, Aleksey Nogin, Xin Yu, and Alexei Kopylov. Practical reflection for sequent logics. In Proceedings of the International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice (LFMTP'06), Electronic Notes in Theoretical Computer Science, 2006. To appear.
[14]
Jason J. Hickey, Brian Aydemir, Yegor Bryukhov, Alexei Kopylov, Aleksey Nogin, and Xin Yu. A listing of MetaPRL theories. http://metaprl.org/theories.pdf.
[15]
Jason J. Hickey, Aleksey Nogin, Alexei Kopylov, et al. MetaPRL home page. http://metaprl.org/.
[16]
Aleksey Nogin and Jason Hickey. Sequent schema for derived rules. In Victor A. Carreño, Cézar A. Muñoz, and Sophiène Tahar, editors, Proceedings of the 15th International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2002), volume 2410 of Lecture Notes in Computer Science, pages 281--297. Springer-Verlag, 2002.
[17]
Aleksey Nogin and Alexei Kopylov. Formalizing type operations using the "Image" type constructor. Accepted to to Workshop on Logic, Language, Information and Computation (WoLLIC), 2006.
[18]
Aleksey Nogin, Alexei Kopylov, Xin Yu, and Jason Hickey. A computational approach to reflective meta-reasoning about languages with bindings. In MERLIN '05: Proceedings of the 3rd ACM SIGPLAN workshop on Mechanized reasoning about languages with variable binding, pages 2--12. ACM Press, 2005. An extended version is available as California Institute of Technology technical report CaltechCSTR:2005. 003.
[19]
Russell OConnor. Essential incompleteness of arithmetic verified by Coq. InProceedings of the 18th International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2005), volume 3603 of Lecture Notes in Computer Science, pages 245--260, 2005.
[20]
Frank Pfenning and Conal Elliott. Higher-order abstract syntax. In Proceedings of the ACM SIGPLAN '88 Conference on Programming Language Design and Implementation (PLDI), volume 23(7) of SIGPLAN Notices, pages 199--208, Atlanta, Georgia, June 1988. ACM Press.
[21]
Andrew M. Pitts and Murdoch Gabbay. A metalanguage for programming with bound names modulo renaming. In R. Backhouse and J.N. Oliveira, editors, Mathematics of Program Construction, volume 1837 of Lecture Notes in Computer Science, pages 230--255. Springer-Verlag, Heidelberg, 2000.
[22]
Gordon Plotkin. An illative theory of relations. In R. Cooper, K. Mukai, and J. Perry, editors, Situation Theory and Its Applications, Volume 1, number 22 in CSLI Lecture Notes, pages 133--146. Centre for the Study of Language and Information, 1990.
[23]
Harald Rueß. Computational reflection in the calculus of constructions and its application to theorem proving. In R. Hindley, editor, Proceedings of the International Conference on Typed Lambda Calculus and its Applications (TLCA'97), volume 1210 of Lecture Notes in Computer Science, Nancy, France, April 1997. Springer-Verlag.
[24]
J. van Heijenoort, editor. From Frege to Gödel: A Source Book in Mathematical Logic, 1879--1931. Harvard University Press, Cambridge, MA, 1967.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 41, Issue 9
Proceedings of the 2006 ICFP conference
September 2006
296 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/1160074
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP '06: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
    September 2006
    308 pages
    ISBN:1595933093
    DOI:10.1145/1159803
    • General Chair:
    • John Reppy,
    • Program Chair:
    • Julia Lawall
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 September 2006
Published in SIGPLAN Volume 41, Issue 9

Check for updates

Author Tags

  1. higher-order abstract syntax
  2. languages with bindings
  3. mechanized reasoning
  4. meta-theory
  5. metaPRL
  6. nuPRL
  7. reflection
  8. type theory

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 11 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2018)HybridJournal of Automated Reasoning10.1007/s10817-010-9194-x48:1(43-105)Online publication date: 28-Dec-2018
  • (2009)A universe of binding and computationACM SIGPLAN Notices10.1145/1631687.159657144:9(123-134)Online publication date: 31-Aug-2009
  • (2009)A universe of binding and computationProceedings of the 14th ACM SIGPLAN international conference on Functional programming10.1145/1596550.1596571(123-134)Online publication date: 31-Aug-2009
  • (2008)Parametric higher-order abstract syntax for mechanized semanticsProceedings of the 13th ACM SIGPLAN international conference on Functional programming10.1145/1411204.1411226(143-156)Online publication date: 20-Sep-2008
  • (2008)Parametric higher-order abstract syntax for mechanized semanticsACM SIGPLAN Notices10.1145/1411203.141122643:9(143-156)Online publication date: 20-Sep-2008
  • (2008)Focusing on Binding and ComputationProceedings of the 2008 23rd Annual IEEE Symposium on Logic in Computer Science10.1109/LICS.2008.48(241-252)Online publication date: 24-Jun-2008
  • (2007)Practical Reflection for Sequent LogicsElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2007.01.019174:5(79-94)Online publication date: 1-Jun-2007

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media