Enriching a Meta-Language With Higher-Order Features

Various meta-languages for the manipulation and specification of programs and programming languages have recently been proposed. We examine one such framework, called natural semantics, which was inspired by the work of G. Plotkin on operational semantics and extended by G. Kahn and others at INRIA. Natural semantics makes use of a first-order meta-language which represents programs as first-order tree structures and reasons about these using natural deduction-like methods. We present the following three enrichments of this meta-language. First, programs are represented not by first-order structures but by simply typed A-terms. Second, schema variables in inference rules can be higher-order variables. Third, the reasoning mechanism is explicitly extended with proof methods which have proved valuable for natural deduction systems. In particular, we add methods for introducing and discharging assumptions and for introducing and discharging parameters. The first method can be used to prove hypothetical propositions while the second can be used to prove generic or universal propositions. We provide several example specifications using this extended meta-language and compare them to their first-order specifications. We argue that our extension yields a more natural and powerful meta-language than the related first-order system. We outline how this enriched meta-language can be compiled into the higher-order logic programming language XProlog.

[1]  Albert R. Meyer,et al.  What is a Model of the Lambda Calculus? , 1982, Inf. Control..

[2]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[3]  Dale Miller,et al.  Uses of Higher-Order Unification for Implementing Program Transformers , 1988, ICLP/SLP.

[4]  Gérard P. Huet,et al.  A Unification Algorithm for Typed lambda-Calculus , 1975, Theor. Comput. Sci..

[5]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[6]  Amy P. Felty,et al.  Specifying Theorem Provers in a Higher-Order Logic Programming Language , 1988, CADE.

[7]  Gopalan Nadathur,et al.  A Logic Programming Approach to Manipulating Formulas and Programs , 1987, SLP.

[8]  Gerhard Gentzen,et al.  Investigations into Logical Deduction , 1970 .

[9]  J. Roger Hindley,et al.  The Completeness Theorem for Typing lambda-Terms , 1983, Theor. Comput. Sci..

[10]  John C. Mitchell,et al.  The essence of ML , 1988, POPL '88.

[11]  Joëlle Despeyroux,et al.  Proof of Translation in Natural Semantics , 1986, LICS.

[12]  W. V. Quine,et al.  Natural deduction , 2021, An Introduction to Proof Theory.

[13]  Christopher P. Wadsworth,et al.  The Relation Between Computational and Denotational Properties for Scott's Dinfty-Models of the Lambda-Calculus , 1976, SIAM J. Comput..

[14]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

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

[16]  Dominique Clément,et al.  A simple applicative language: mini-ML , 1986, LFP '86.

[17]  Dominique Clément,et al.  The Natural Dynamic Semantics of Mini-Standard ML , 1987, TAPSOFT, Vol.2.

[18]  Gopalan Nadathur,et al.  Hereditary Harrop Formulas and Uniform Proof Systems , 1987, Logic in Computer Science.

[19]  Pierre-Louis Curien,et al.  The Categorical Abstract Machine , 1987, Sci. Comput. Program..

[20]  Michael J. C. Gordon,et al.  The Denotational Description of Programming Languages , 1979, Springer New York.