Abstract
In this paper we describe a grammar formalism for program transformation and its implementation in Prolog. Whereas Definite Clause Grammars are merely working on a string of tokens the formalism presented here acts on semantic items such as Prolog literals. This grammar will be used to implement a very compact form of a compiler generator that transforms solve-like interpreters into compilers. Finally the compiler generator will be applied on itself to obtain a more efficient version of the compiler generator.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
H. Abramson: “Definite Clause Translation Grammars”, in: Proceedings of the 1984 International Symposium on Logic Programming, 1984, pp 233–240.
H. Fujita, K. Furukawa: “A Self-Applicable Partial Evaluator and its Use in Incremental Compilation”, New Generation Computing, Vol. 6, Nos. 2 and 3, pp. 91–118, 1988.
Y. Futamura: “Partial Evaluation of Computation Process — an Approach to a Compiler-Compiler”, Systems, Computers, Controls, Vol. 2, No. 5, 1971, pp. 45–50.
J. Gallagher: “Transforming Logic Programs by Specializing Interpreters”, Proceedings of ECAI 86, pp. 109–122, Brighton 1986.
N.D. Jones, P. Sestoft, H. Søndergaard: “The Generation of a Compiler Generator”, 1st International Conference on Rewriting Techniques and Applications, Dijon 1985, LNCS 202, pp. 120–140.
A. Lakhotia: “Incorporating ‘Programming Techniques’ into Prolog Programs”, in: Proceedings of the North American Logic Programming Conference 1989, MIT Press, Cambridge 1989.
M. McCord: “Natural Language Processing and Prolog”, in: A. Walker et al.: “Knowledge Systems and Prolog”, Addison Wesley, Reading 1987.
G. Neumann: “Meta-Interpreter Directed Compilation of Logic Programs into Prolog”, IBM-Research Report RC 12113 (#54357), Yorktown Heights, New York 1986.
G. Neumann: “Metaprogrammierung und Prolog”, Addison-Wesley, Bonn 1988.
G. Neumann: “Transforming Interpreters into Compilers by Goal Classification”, in: Proceedings of the Meta90, 4–6 April 1990, Leuven, Belgium 1990.
F.G. Pagan: “Converting Interpreters into Compilers”, Software-Practice and Experience, Vol. 18, No. 6, pp. 509–527, June 1988.
F.C.N. Pereira, D.H.D. Warren: “Definite Clause Grammars for Language Analysis—A Survey of the Formalism and a Comparison with Augmented Transition Networks”, Artificial Intelligence, Vol. 13, Nr. 3, pp. 231–278, May 1980.
F.C.N. Pereira: “Extraposition Grammars”, American Journal of Computational Linguistics, 1981, vol. 7, no. 4, pp 243–255.
A. Takeuchi, K. Furukawa: “Partial Evaluation of Prolog Programs and its Application to Meta Programming”, IFIP 1986.
P. Van Roy: “A Useful Extension to Prolog's Definite Clause Grammar Notation”, SIGPLAN Notices, Volume 24, Number 11, November 1989.
N. Wirth: “Compilerbau”, Teubner Verlag, Stuttart 1984.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Neumann, G. (1992). A simple transformation from Prolog-written metalevel interpreters into compilers and its implementation. In: Voronkov, A. (eds) Logic Programming. Lecture Notes in Computer Science, vol 592. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55460-2_26
Download citation
DOI: https://doi.org/10.1007/3-540-55460-2_26
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55460-8
Online ISBN: 978-3-540-47083-0
eBook Packages: Springer Book Archive