Summary
Term rewriting systems have some excellent properties as a functional computation model. However, their programming is similar to logical programming rather than functional programming. This paper proposes the use of term rewriting systems as a mechanism of execution and verification, and the use of a functional programming language as syntax sugar which hides the underlying layer.
We show how to translate functional programs into term rewriting systems derived from techniques of conditional term rewriting systems. Selectors in programs, which are obstacles at the stage of development of programs, can be eliminated at the same time.
As an example of this concept, we describe a graph rewriting system and its application for functional programming. The graph grammar and its rewriting system are similar to term rewriting systems, except that the graph rewriting system can treat naturally both multiple output functions and call-by-name evaluation. We define properties, termination and confluency, for equational reasoning on this system, and then we show that this system is useful for evaluating and verifying programs which have multiple output functions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Knuth DE, Bendix PB (1970) Simple word problems in universal algebras. In: Leech J (ed) Computational problems in abstract algebra. Pergamon, Toyohashi, Japan, pp 263–297
Huet G, Hullot JM (1982) Proofs by induction in equational theories with constructors. Comput Syst Sci 25(2): 239–266
Hsiang J (1985) Refutational theorem proving using term-rewriting systems. Artif Intell 25: 255–300
Comon H (1989) Inductive proofs by specification transformations. In: Dershowitz N (ed) Rewriting techniques and applications. Springer-Verlag, Chapel Hill pp 76–91. Proceedings, 3rd International Conference, RTA-89, Lecture Notes in Computer Science, 355
Shinoda Y. Katayama T (1988) Attribute grammar based programming and its environment. In: Proc 21st Hawaii International Conference on System Sciences, Kona, Hawaii pp 612–620
Knuth DE (1968) Semantics of context-free languages. Math Syst Theory 2(2): 127–145
Huet G (1980) Confluent reductions: abstract properties and applications to term rewriting systems. J ACM 27(4): 797–821
Dershowitz N (1985) Termination. In: Jouannaud J-P (ed) Rewriting techniques and applications. Springer-Verlag, pp 180–224. Lecture Notes in Computer Science, 202
Klop JW (1990) Term rewriting systems. In: ICALP. Springer-Verlag, pp 350–369. Lecture Notes in Computer Science
Bergstra JA, Klop JW (1986) Conditional rewrite rules: confluence and termination. J Comput Syst Sci 32: 323–362
Giovannetti E, Moiso C (1987) Notes on the elimination of conditions. In: Kaplan S, Jouannaud J-P (eds) Conditional term rewriting systems. Springer-Verlag, pp 91–97. Proceedings, 1st International Workshop, Orsay, France, Lecture Notes in Computer Science, 308
Baeten JCM, Bergstra JA, Klop JW, Weijland WP (1989) Term-rewriting systems with rule priorities. Theor Comput Sci 67: 283–301
Katayama T (1981) Hfp, a hierarchical and functional programming. In: Proc 5th International Conference on Software Engineering, pp 343–353
Reps T, Teitelbaum T (1985) The Synthesizer Generator reference manual. Department of Computer Science, Cornell University, Ithaca, New York
Reps TW (1984) Generating language-based environments. MIT Press, Massachusetts Institute of Technology, Cambridge, Massachusetts 02142
Reps T, Alpern B (1984) Interactive proof checking. In: Proc 11th ACM Symp Principles of Programming Languages
Lusk EL, Overbeek RA (1982) An LMA-based theorem prover. Mathematics and Computer Science Division ANL-82–75, Argonne National Laboratory, 9700 South Cass Avenue, Argonne, Illinois 60439
Lusk EL, Mrine WW, Overbeek RA (1982) Logic machine architecture: kernel functions. In: Lecture notes in computer science 138. Springer-Verlag, pp 70–108
Habel A, Kreowski H-J (1986) May we introduce to you: hyperedge replacement. In: Ehrig H, Nagl M, Rozenberg G, Rosenfeld A (eds) Graph-grammars and their application to computer science. Springer-Verlag, pp 15–29. Lecture Notes in Computer Science, 291
Katayama T, Sasaki N (1986) Global storage allocation in attribute evaluation. In: Proc 13th ACM Symp Principles of Programming Languages, pp 26–37
Dershowitz N (1990) Infinite rewriting. In: Proc Toyohashi Symposium on Theoretical Computer Science. Toyohashi, Japan, pp 27–31, August 1990
Sakai M, Sakabe T, Inagaki Y (1987) Direct implementation system of algebraic specifications of abstract data types (in Japanese). Comput Software 4(4): 16–27
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1991 Springer-Verlag Tokyo
About this chapter
Cite this chapter
Kikuchi, Y., Katayama, T. (1991). An Application of Term Rewriting Systems for Functional Programming. In: Ohno, Y., Matsuda, T. (eds) Distributed Environments. Springer, Tokyo. https://doi.org/10.1007/978-4-431-68144-1_7
Download citation
DOI: https://doi.org/10.1007/978-4-431-68144-1_7
Publisher Name: Springer, Tokyo
Print ISBN: 978-4-431-68146-5
Online ISBN: 978-4-431-68144-1
eBook Packages: Springer Book Archive