Imperative LF Meta-Programming

Logical frameworks have enjoyed wide adoption as meta-languages for describing deductive systems. While the techniques for representing object languages in logical frameworks are relatively well understood, languages and techniques for meta-programming with them are much less so. This paper presents work in progress on a programming language called Rogue-Sigma-Pi (RSP), in which general programs can be written for soundly manipulating objects represented in the Edinburgh Logical Framework (LF). The manipulation is sound in the sense that, in the absence of runtime errors, any putative LF object produced by a well-typed RSP program is guaranteed to type check in LF. An important contribution is an approach for soundly combining imperative features with higher-order abstract syntax. The focus of the paper is on demonstrating RSP through representative LF meta-programs.

[1]  Lennart Augustsson,et al.  Cayenne—a language with dependent types , 1998, ICFP '98.

[2]  Claude Kirchner,et al.  Pure patterns type systems , 2003, POPL '03.

[3]  George C. Necula,et al.  Proof Generation in the Touchstone Theorem Prover , 2000, CADE.

[4]  Mark Lillibridge,et al.  A type-theoretic approach to higher-order modules with sharing , 1994, POPL '94.

[5]  Aaron Stump,et al.  A language-based approach to functionally correct imperative programming , 2005, ICFP '05.

[6]  Robert Pollack Dependently Typed Records in Type Theory , 2002, Formal Aspects of Computing.

[7]  Nachum Dershowitz,et al.  In handbook of automated reasoning , 2001 .

[8]  David L. Dill,et al.  CVC: A Cooperating Validity Checker , 2002, CAV.

[9]  Bill Kinnersley,et al.  From Rogue to MicroRogue , 2004, WRLA.

[10]  Lev Gordeev,et al.  Basic proof theory , 1998 .

[11]  Andrew W. Appel,et al.  Foundational proof checkers with small witnesses , 2003, PPDP '03.

[12]  Lena Magnusson,et al.  The implementation of ALF : a proof editor based on Martin-Löf's monomorphic type theory with explicit substitution , 1994 .

[13]  Gilles Dowek,et al.  Principles of programming languages , 1981, Prentice Hall International Series in Computer Science.

[14]  Tim Sheard,et al.  Revisiting catamorphisms over datatypes with embedded functions (or, programs from outer space) , 1996, POPL '96.

[15]  Andrew W. Appel,et al.  Dependent types ensure partial correctness of theorem provers , 2004, J. Funct. Program..

[16]  Zhong Shao,et al.  A Syntactic Approach to Foundational Proof-Carrying Code , 2004, Journal of Automated Reasoning.

[17]  Frank Pfenning,et al.  System Description: Twelf - A Meta-Logical Framework for Deductive Systems , 1999, CADE.

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

[19]  Andrei Voronkov,et al.  Handbook of Automated Reasoning: Volume 1 , 2001 .

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

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