An Empirical Study of the Runtime Behavior of Higher-Order Logic Programs

Implementation technology for higher-order logic programming languages such as λProlog [17] and Elf [21] is still in its infancy. There are many features of these languages that do not occur in ordinary Prolog programs, such as types, variable binding constructs for terms, embedded implication and universal quantification, or dependent types and explicit construction of proofs. Some initial work on compiler design for higher-order logic programming languages can be found in [11, 16, 18, 19]2. At the same time, the language design process for such languages is far from complete. Extensions [2, 7] as well as restrictions [14] of λProlog have been proposed to increase its expressive power or simplify the language theory or its implementation. Obviously, further language design and implementation efforts must be closely linked. It is easy to design unimplementable languages or implement unusable languages. In order to understand and evaluate the challenges and available choices, we report the results of an empirical study of existing example programs. We chose Elf over λProlog for this study for two reasons: (1) accessibility of the large suite of examples, and (2) ease of instrumentation of the Elf interpreter to perform measurements. Many of these examples can be trivially transformed into λProlog programs, and essentially the same issues arise regarding their runtime behavior. We will discuss later which

[1]  Benjamin C. Pierce,et al.  A record calculus based on symmetric concatenation , 1991, POPL '91.

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

[3]  Frank Pfenning,et al.  Partial polymorphic type inference and higher-order unification , 1988, LISP and Functional Programming.

[4]  Roland H. C. Yap,et al.  A methodology for managing hard constraints in CLP systems , 1991, PLDI '91.

[5]  Dale Miller,et al.  Logic programming in a fragment of intuitionistic linear logic , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[6]  John Hannan,et al.  Compiler verification in LF , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[7]  Frank Pfenning,et al.  Unification and anti-unification in the calculus of constructions , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[8]  Frank Pfenning,et al.  Implementing the Meta-Theory of Deductive Systems , 1992, CADE.

[9]  Frank Pfenning,et al.  Uniication and Anti-uniication in the Calculus of Constructions , 1991 .

[10]  Spiro Michaylov,et al.  Design and implementation of practical constraint logic programming systems , 1992 .

[11]  Gopalan Nadathur,et al.  Towards a WAM Model for Lambda-Prolog , 1989, NACLP.

[12]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[13]  Gopalan Nadathur,et al.  A representation of Lambda terms suitable for operations on their intensions , 1990, LISP and Functional Programming.

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

[15]  Gopalan Nadathur,et al.  Implementing Logic Programming Languages with Polymorphic Typing , 1991 .

[16]  Forbes AvenuePittsburgh,et al.  Compiler Veriication in Lf , 1992 .

[17]  John C. Reynolds,et al.  Preliminary design of the programming language Forsythe , 1988 .

[18]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[19]  Frank Pfenning,et al.  Natural Semantics and Some of Its Meta-Theory in Elf , 1992, ELP.

[20]  Roland H. C. Yap,et al.  The CLP( R ) language and system , 1992, TOPL.

[21]  Dale A. Miller,et al.  AN OVERVIEW OF PROLOG , 1988 .

[22]  Dale Miller,et al.  Unification of Simply Typed Lamda-Terms as Logic Programming , 1991, ICLP.