Abstract
Term rewriting has proven to be an important technique in theorem proving. In this paper, we illustrate that rewrite systems and strategies for higher-order term rewriting, which includes the usual notion of first-order rewriting, can be naturally specified and implemented in a higher-order logic programming language. We adopt a notion of higherorder rewrite system which uses the simply typed λ-calculus as the language for expressing rules, with a restriction on the occurrences of free variables on the left hand sides of rules so that matching of terms with rewrite templates is decidable. The logic programming language contains an implementation of the simply-typed lambda calculus including Βη-conversion and higher-order unification. In addition, universal quantification in queries and the bodies of clauses is permitted. For higher-order rewriting, we show how these operations implemented at the meta-level provide elegant mechanisms for the object-level operations of descending through terms and matching terms with rewrite templates. We discuss tactic style theorem proving in this environment and illustrate how term rewriting strategies can be expressed as tactic-style search.
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
Peter Aczel. A general church-rosser theorem. Technical report, University of Manchester, 1978.
Val Breazu-Tannen and Jean Gallier. Polymorphic rewriting conserves algebraic strong normalization. Theoretical Computer Science, 83(1):3–28, 1991.
Alonzo Church. A formulation of the simple theory of types. Journal of Symbolic Logic, 5:56–68, 1940.
Robert L. Constable et al. Implementing Mathematics with the Nuprl Proof Development System. Prentice-Hall, 1986.
N. Dershowitz and J.-P. Jouannaud. Rewrite systems. In J. van Leeuwen, editor, Formal Models and Semantics, Handbook of Theoretical Computer Science, volume B, pages 243–320. Elsevier-MIT Press, 1989.
Amy Felty. Specifying and Implementing Theorem Provers in a Higher-Order Logic Programming Language. PhD thesis, University of Pennsylvania, August 1989.
Amy Felty. Encoding dependent types in an intuitionistic logic. In Gérard Huet and Gordon Plotkin, editors, Logical Frameworks. Cambridge University Press, 1991.
Amy Felty and Dale Miller. Specifying theorem provers in a higher-order logic programming language. In Ninth International Conference on Automated Deduction, Argonne, IL, May 1988.
Amy Felty and Dale Miller. A meta language for type checking and inference: An extended abstract. Presented at the 1989 Workshop on Programming Logic, Bålstad, Sweden, 1989.
Michael J. Gordon, Arthur J. Milner, and Christopher P. Wadsworth. Edinburgh LCF: A Mechanised Logic of Computation, volume 78 of Lecture Notes in Computer Science. Springer-Verlag, 1979.
Mike Gordon. HOL: A machine oriented formulation of higher-order logic. Technical Report 68, University of Cambridge, July 1985.
John Hannan and Dale Miller. Enriching a meta-language with higher-order features. In Workshop on Meta-Programming in Logic Programming, Bristol, June 1988.
J. Roger Hindley and Jonathan P. Seldin. Introduction to Combinatory Logic and Lambda Calculus. Cambridge University Press, 1986.
Gérard Huet. A unification algorithm for typed λ-calculus. Theoretical Computer Science, 1:27–57, 1975.
Jean-Pierre Jouannaud and Mitsuhiro Okada. A computation model for executable higher-order algebraic specification languages. In Sixth Annual Symposium on Logic in Computer Science, pages 350–361, Amsterdam, July 1991.
J.W. Klop. Combinatory reduction systems. Technical Report Mathematical Centre Tracts Nr.127, Centre for Mathematics and Computer Science, Amsterdam, 1980.
J.W. Klop. Term rewriting systems. In S. Abramsky, D. Gabbay, and T. Maibaum, editors, Handbook of Logic in Computer Science, volume II. Oxford University Press, 1991.
Dale Miller. Abstract syntax and logic programming. In Proceedings of the Second Russian Conference on Logic Programming. Springer-Verlag LNAI series, September 1991. To appear.
Dale Miller. A logic programming language with lambda-abstraction, function variables, and simple unification. Journal of Logic and Computation, 1(4):497–536, 1991.
Dale Miller. Unification of simply typed lambda-terms as logic programming. In Eighth International Logic Programming Conference, Paris, France, June 1991. MIT Press.
Dale Miller, Gopalan Nadathur, Frank Pfenning, and Andre Scedrov. Uniform proofs as a foundation for logic programming. Annals of Pure and Applied Logic, 51:125–157, 1991.
Tobias Nipkow. Equational reasoning in Isabelle. Science of Computer Programming, 12:123–149, 1989.
Tobias Nipkow. Higher-order critical pairs. In Sixth Annual Symposium on Logic in Computer Science, pages 342–349, Amsterdam, July 1991.
Lawrence C. Paulson. The foundation of a generic theorem prover. Journal of Automated Reasoning, 5(3):363–397, September 1989.
Frank Pfenning. Logic programming in the LF logical framework. In Gérard Huet and Gordon Plotkin, editors, Logical Frameworks. Cambridge University Press, 1991.
Frank Pfenning. Unification and anti-unification in the calculus of constructions. In Sixth Annual Symposium on Logic in Computer Science, pages 74–85, Amsterdam, July 1991.
Frank Pfenning and Conal Elliot. Higher-order abstract syntax. In Proceedings of the ACM-SIGPLAN Conference on Programming Language Design and Implementation, 1988.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Felty, A. (1992). A logic programming approach to implementing higher-Order term rewriting. 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/BFb0013606
Download citation
DOI: https://doi.org/10.1007/BFb0013606
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