Proof Pearl: The Power of Higher-Order Encodings in the Logical Framework LF

In this proof pearl, we demonstrate the power of higher-order encodings in the logical framework Twelf[PS99] by investigating proofs about an algorithmic specification of bounded subtype polymorphism, a problem from the POPLmark challenge [ABF+05]. Our encoding and representation of the problem plays to the strengths of the logical framework LF. Higher-order abstract syntax is used to deal with issues of bound variables. More importantly, we exploit the full advantage of parametric and higher-order judgments. As a key benefit we get a tedious narrowing lemma, which must normally be proven separately, for free. Consequently, we obtain an extremely compact and elegant encoding of the admissibility of general transitivity and other meta-theoretic properties.

[1]  Hanne Riis Nielson,et al.  Programming Languages and Systems — ESOP '96 , 1996, Lecture Notes in Computer Science.

[2]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..

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

[4]  Patrick J. Hayes,et al.  Computation and Deduction , 1973, MFCS.

[5]  Robert Harper,et al.  Mechanizing metatheory in a logical framework , 2007, Journal of Functional Programming.

[6]  Jaime G. Carbonell,et al.  Automated Deduction — CADE-16 , 2002, Lecture Notes in Computer Science.

[7]  Frank Pfenning,et al.  Mode and Termination Checking for Higher-Order Logic Programs , 1996, ESOP.

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

[9]  Brigitte Pientka Verifying Termination and Reduction Properties about Higher-Order Logic Programs , 2005, Journal of Automated Reasoning.

[10]  Frank Pfenning,et al.  Logical Frameworks , 2001, Handbook of Automated Reasoning.

[11]  Alberto Momigliano,et al.  Multi-level Meta-reasoning with Higher-Order Abstract Syntax , 2003, FoSSaCS.

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

[13]  Ian Stark,et al.  Free-Algebra Models for the pi-Calculus , 2005, FoSSaCS.

[14]  David Aspinall,et al.  Formalising Java's Data Race Free Guarantee , 2007, TPHOLs.

[15]  Brigitte Pientka A Proof-Theoretic Foundation for Tabled Higher-Order Logic Programming , 2002, ICLP.

[16]  F. Pfenning Logic programming in the LF logical framework , 1991 .

[17]  Dale Miller,et al.  Reasoning with higher-order abstract syntax in a logical framework , 2000, TOCL.

[18]  Amy P. Felty Two-Level Meta-reasoning in Coq , 2002, TPHOLs.

[19]  Frank Pfenning,et al.  A Coverage Checking Algorithm for LF , 2003, TPHOLs.

[20]  Krzysztof R. Apt,et al.  Logic Programming , 1990, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[21]  Graham Steel,et al.  Deduction with XOR Constraints in Security API Modelling , 2005, CADE.

[22]  Brigitte Pientka Tabling for Higher-Order Logic Programming , 2005, CADE.