Abstract
We study the implementation of four reduction strategies for the untyped λ-calculus in the logic programming language λProlog and restricted sublanguages. The higher-order features of these languages provide very natural methods for manipulating and substituting bound variables. Starting from clear and concise specifications of reduction in the full language we demonstrate how to make certain details in the implementations explicit as we restrict ourselves to the weaker sublanguages. We also show how to translate specifications in a higher-order language to a first-order one, such as Prolog, introducing closures as a replacement for substitutions. This process illustrates how a very high-level description of an implementation can be translated to lower-level ones by reasoning about the logic in which the descriptions are given. It also illustrates some basic methods for manipulating functional languages represented in a higher-order abstract syntax.
Preview
Unable to display preview. Download preview PDF.
References
C. Elliott and F. Pfenning. eLP, a Common Lisp Implementation of λProlog. May 1989.
J. Hannan. Investigating a Proof-Theoretic Meta-Language for Functional Programs. PhD thesis, University of Pennsylvania, 1990.
J. Hannan and F. Pfenning. Compiler verification in LF. 1991. Submitted.
J. Hodas and D. Miller. Logic programming in a fragment of intuitionistic linear logic. In Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science, pages 32–42, ACM Press, 1991.
G. Huet. A unification algorithm for typed λ-calculus. Theoretical Computer Science, 1:27–57, 1975.
G. Kahn. Natural semantics. In Proceedings of the Symposium on Theoretical Aspects of Computer Science, pages 22–39, Springer-Verlag LNCS, Vol. 247, 1987.
D. Miller. Abstractions in logic programs. In P. Odifreddi, editor, Logic and Computer Science, pages 329–359, Academic Press, 1990.
D. Miller. A logic programming language with lambda-abstraction, function variables, and simple unification. In Peter Schroeder-Heister, editor, Extensions of Logic Programming, Springer-Verlag, 1990.
D. Miller. Unification of simply typed lambda-terms as logic programming. In K. Furukawa, editor, Eigth International Conference on Logic Programming, pages 255–269, MIT Press, 1991.
D. Miller, G. Nadathur, F. Pfenning, and A. Scedrov. Uniform proofs as a foundation for logic programming. Annals of Pure and Applied Logic, 51:125–157, 1991.
G. Nadathur and D. Miller. An overview of λProlog. In K. Bowen and R. Kowalski, editors, Fifth International Conference and Symposium on Logic Programming, MIT Press, 1988.
F. Pfenning. Elf: a language for logic definition and verified metaprogramming. In Fourth Annual Symposium on Logic in Computer Science, pages 313–322, IEEE Computer Society Press, 1989.
D. H. D. Warren. An Abstract Prolog Instruction Set. Technical Note 309, SRI International, 1983.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hannan, J. (1992). Implementing λ-calculus reduction strategies in extended logic programming languages. In: Eriksson, L.H., Hallnäs, L., Schroeder-Heister, P. (eds) Extensions of Logic Programming. ELP 1991. Lecture Notes in Computer Science, vol 596. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0013609
Download citation
DOI: https://doi.org/10.1007/BFb0013609
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55498-1
Online ISBN: 978-3-540-47114-1
eBook Packages: Springer Book Archive