Abstract
It has been argued elsewhere that a logic programming language with function variables and λ-abstractions within terms makes a very good meta-programming language, especially when an object language contains notions of bound variables and scope. The λProlog logic programming language and the closely related Elf and Isabelle systems provide meta-programs with both function variables and λ-abstractions by containing implementations of higher-order unification. In this paper, we present a logic programming language, called L λ, that also contains both function variables and λ-abstractions, but certain restriction are placed on occurrences of function variables. As a result, an implementation of L λ does not need to implement full higher-order unification. Instead, an extension to first-order unification that respects bound variable names and scopes is all that is required. Such unification problems are shown to be decidable and to possess most general unifiers when unifiers exist. A unification algorithm and logic programming interpreter are described and proved correct. Several examples of using L λ as a meta-programming language are presented.
Preview
Unable to display preview. Download preview PDF.
References
de Bruijn, N. (1972), Lambda Calculus Notation with Nameless Dummies, a Tool for Automatic Formula Manipulation, with Application to the Church-Rosser Theorem, Indag. Math. (34:5), 381–392.
Church, A. (1940), A Formulation of the Simple Theory of Types, Journal of Symbolic Logic 5, 56–68.
Elliott, C. (1989), Higher-Order Unification with Dependent Types, Proceedings of the 1989 Rewriting Techniques and Applications, Springer-Verlag LNCS.
Felty, A. and Miller, D. (1988), Specifying Theorem Provers in a Higher-Order Logic Programming Language, Proceedings of the Ninth International Conference on Automated Deduction, Argonne, IL, 23–26, eds. E. Lusk and R. Overbeek, Springer-Verlag Lecture Notes in Computer Science, Vol. 310, 61–80.
Hannan, J. and Miller, D. (1988), Uses of Higher-Order Unification for Implementing Program Transformers, Fifth International Conference and Symposium on Logic Programming, ed. K. Bowen and R. Kowalski, MIT Press, 942–959.
Hannan, J. and Miller, D. (1989), A Meta Language for Functional Programs, Chapter 24 of Meta-Programming in Logic Programming, eds. H. Rogers and H. Abramson, MIT Press, 453–476.
Harper, R., Honsell, F. and Plotkin, G. (1987), A Framework for Defining Logics, Second Annual Symposium on Logic in Computer Science, Ithaca, NY, 194–204.
Hindley, J. and Seldin, J. (1986), Introduction to Combinators and λ-calculus, Cambridge University Press.
Huet, G. (1975), A Unification Algorithm for Typed λ-Calculus, Theoretical Computer Science 1, 27–57.
Huet, G. and Lang, B. (1978), Proving and Applying Program Transformations Expressed with Second-Order Logic, Acta Informatica 11, 31–55.
Goldfarb, W. (1981), The Undecidability of the Second-Order Unification Problem, Theoretical Computer Science 13, 225–230.
Miller, D. (1989), A Logical Analysis of Modules in Logic Programming, Journal of Logic Programming 6, 79–108.
Miller, D. (1989), Lexical Scoping as Universal Quantification, Sixth International Logic Programming Conference, Lisbon, eds. G. Levi and M. Martelli, MIT Press, 268–283.
Miller, D. (1990), Abstractions in logic programming, in Logic and Computer Science edited by P. Odifreddi, Academic Press, 329–359.
Miller, D., Unification under a Mixed Prefix, Journal of Symbolic Computation (to appear).
Miller, D. and Nadathur, G. (1987), A Logic Programming Approach to Manipulating Formulas and Programs, Proceedings of the IEEE Fourth Symposium on Logic Programming, IEEE Press, 379–388.
Miller, D., Nadathur, G., Pfenning, F., and Scedrov, A., Uniform Proofs as a Foundation for Logic Programming, Annals of Pure and Applied Logic (to appear).
Nadathur, G. and Miller, D. (1988), An Overview of λProlog, Fifth International Conference on Logic Programming, eds. R. Kowlaski and K. Bowen, MIT Press, 810–827.
Nadathur, G. and Miller, D., Higher-Order Horn Clauses, Journal of the ACM (to appear).
Paulson, L. (1986), Natural Deduction as Higher-Order Resolution, Journal of Logic Programming 3, 237–258.
Paulson, L. (1989), The Foundation of a Generic Theorem Prover, Journal of Automated Reasoning 5, 363–397.
Pfenning, F. and Elliot, C. (1988), Higher-Order Abstract Syntax, Proceedings of the ACM-SIGPLAN Conference on Programming Language Design and Implementation, ACM Press, 199–208.
Pfenning, F. (1989), Elf: A Language for Logic Definition and Verified Metaprogramming, Fourth Annual Symposium on Logic in Computer Science, Monterey, CA, 313–321.
Pietrzykowski, T. and Jensen, D. (1976), Mechanizing ω-Order Type Theory Through Unification, Theoretical Computer Science 3, 123–171.
Statman, R. (1979), Intuitionistic Propositional Logic is Polynomial-Space Complete, Theoretical Computer Science 9, 67–72.
Snyder, W. and Gallier, J. (1989), Higher-Order Unification Revisited: Complete Sets of Transformations, Journal of Symbolic Computation 8, 101–140.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Miller, D. (1991). A logic programming language with lambda-abstraction, function variables, and simple unification. In: Schroeder-Heister, P. (eds) Extensions of Logic Programming. ELP 1989. Lecture Notes in Computer Science, vol 475. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0038698
Download citation
DOI: https://doi.org/10.1007/BFb0038698
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53590-4
Online ISBN: 978-3-540-46879-0
eBook Packages: Springer Book Archive