Abstract
We present the language S-Graph-n — the core of a multilevel metaprogramming environment for exploring foundational issues of self-applicable online program specialization.
We illustrate how special-purpose S-Graph-n primitives can be used to obtain an efficient and conceptually simple encoding of programs as data objects. The key feature of the encoding scheme is the use of numerical indices which indicate the number of times that a program piece has been encoded.
Evaluation of S-Graph-n is formalized via an operational semantics. This semantics is used to justify the fundamental operations on metavariables — special-purpose tags for tracking unknown values in self-applicable online specialization systems. We show how metavariables can be used to construct biased generating extensions without relying on a separate binding-time analysis phase.
This work has been supported by the Danish Research Academy and by the DART project (Design, Analysis and Reasoning about Tools) of the Danish Research Councils.
Chapter PDF
References
S.M. Abramov. Metavychislenija i ikh prilozhenija (Metacomputation and its applications). Nauka, Moscow, 1995. (In Russian).
Jonas Barklund. A basis for a multilevel metalogic programming language. Technical Report 81, Uppsala University, Dept. of Computing Science, 1994.
Jonas Barklund. Metaprogramming in logic. Technical Report 80, Uppsala University, Dept. of Computing Science, 1994.
Charles Consel and Siau Cheng Khoo. Parameterized partial evaluation. ACM TOPLAS, 15(3):463–493, 1993.
Hiroshi Fujita and Koichi Furukawa. A self-applicable partial evaluator and its use in incremental compilation. New Generation Computing, 6(2–3):91–118, June 1988.
Robert Glück. Towards multiple self-application. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pages 309–320, New Haven, Connecticut, 1991. ACM Press.
Robert Glück. On the mechanics of metasystem hierarchies in program transformation. In M. Proietti, editor, Logic Program Synthesis and Transformation (LoPSTr'95), volume 1048 of Lecture Notes in Computer Science, pages 234–251. Springer-Verlag, 1996.
Robert Glück and Jesper Jørgensen. Efficient multi-level generating extensions for program specialization. In S.D. Swierstra and M. Hermenegildo, editors, Programming Languages: Implementations, Logics and Programs (PLILP'95), volume 982 of Lecture Notes in Computer Science, pages 259–278. Springer-Verlag, 1995.
Robert Glück and Andrei V. Klimov. Occam's razor in metacomputation: the notion of a perfect process tree. In P. Cousot, M. Falaschi, G. Filè, and G. Rauzy, editors, Static Analysis. Proceedings. Lecture Notes in Computer Science, Vol. 724, pages 112–123. Springer-Verlag, 1993.
Robert Glück and Valentin F. Turchin. Application of metasystem transition to function inversion and transformation. In Proceedings of the ISSAC '90 (Tokyo, Japan), pages 286–287. ACM Press, 1990.
Corin A. Gurr. A self-applicable partial evaluator for the logic programming language Gödel. Ph.d. thesis, University of Bristol, 1994.
Patricia Hill and John Gallagher. Meta-programming in logic programming. Technical Report 94.22, School of Computer Studies, University of Leeds, 1994.
Patricia Hill and John W. Lloyd. The Gödel Programming Language. MIT Press, Cambridge, Massachusetts, 1994.
Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial Evaluation and Automatic Program Generation. Prentice-Hall, 1993.
Neil D. Jones, Peter Sestoft, and Harald Søndergaard. An experiment in partial evaluation: the generation of a compiler generator. In J.-P. Jouannaud, editor, Rewriting Techniques and Applications, Dijon, France. Lecture Notes in Computer Science 202, pages 124–140. Springer-Verlag, 1985.
Neil D. Jones, Peter Sestoft, and Harald Søndergaard. Mix: a self-applicable partial evaluator for experiments in compiler generation. LISP and Symbolic Computation, 2(1):9–50, 1989.
Andrei Nemytykh, Victoria Pinchuck, and Valentin F. Turchin. A self-applicable supercompiler. In Olivier Danvy, Robert Glück, and Peter Thiemann, editors, Partial Evaluation. Proceedings, Lecture Notes in Computer Science, page to appear. Springer-Verlag, 1996.
Flemming Nielson and Hanne R. Nielson. Multi-level lambda-calculi: an algebraic description. In Olivier Danvy, Robert Glück, and Peter Thiemann, editors, Partial Evaluation. Proceedings, Lecture Notes in Computer Science, page to appear. Springer-Verlag, 1996.
Eric Ruf and Daniel Weise. On the specialization of online program specializers. Journal of Functional Programming, 3(3):251–281, 1993.
Michael Sperber. Self-applicable online partial evaluation. In Olivier Danvy, Robert Glück, and Peter Thiemann, editors, Partial Evaluation. Proceedings, Lecture Notes in Computer Science, page to appear. Springer-Verlag, 1996.
Valentin F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46–54, 1979.
Valentin F. Turchin. The language Refal, the theory of compilation and metasystem analysis. Courant Computer Science Report 20, Courant Institute of Mathematical Sciences, New York University, Feb. 1980 1980.
Valentin F. Turchin. The concept of a supercompiler. Transactions on Programming Languages and Systems, 8(3):292–325, 1986.
Valentin F. Turchin. Refal-5, Programming Guide and Reference Manual. New England Publishing Co., Holyoke, Massachusetts, 1989.
Valentin F. Turchin. Program transformation with metasystem transitions. Journal of Functional Programming, 3(3):283–313, 1993.
V.F. Turchin. Programmirovanie na jazyke Refal: I. Neformal'noe vvedenie v programmirovanie na jazyke Refal. (Programming in the language Refal: I. Informal introduction to programming in the language Refal). Preprint 41, Institute of Applied Mathematics, Academy of Sciences of the USSR, Moscow, 1971. (In Russian).
V.F. Turchin and A.P. Nemytykh. Metavariables: their implementation and use in program transformation. Technical Report CSc. TR 95-012, City College of the City University of New York, 1995.
Frank van Harmelen. Definable naming relations in meta-level systems. In A. Pettorossi, editor, Meta-Programming in Logic. Proceedings, volume 649 of Lecture Notes in Computer Science, pages 89–104, Uppsala, Sweden, 1992. Springer-Verlag.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hatcliff, J., Glück, R. (1996). Reasoning about hierarchies of online program specialization systems. In: Danvy, O., Glück, R., Thiemann, P. (eds) Partial Evaluation. Lecture Notes in Computer Science, vol 1110. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61580-6_9
Download citation
DOI: https://doi.org/10.1007/3-540-61580-6_9
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61580-4
Online ISBN: 978-3-540-70589-5
eBook Packages: Springer Book Archive