Abstract
A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation, and can be referred to as metacomputation. Supercompilers that have been in existence up to now (see [12], [13]) were not self-applicable: this is a more difficult problem than self-application of a partial evaluator, because of the more intricate logic of supercompilation. In the present paper we describe the first self-applicable model of a supercompiler and present some tests. Three features distinguish it from the previous models and make self-application possible: (1) The input language is a subset of Refal which we refer to as flat Refal. (2) The process of driving is performed as a transformation of pattern-matching graphs. (3) Metasystem jumps are implemented, which allows the supercompiler to avoid interpretation whenever direct computation is possible.
Preview
Unable to display preview. Download preview PDF.
References
Ershov, A.P. On the essence of compilation, In: E.J.Neuhold(ed) Formal Description of Programming Concepts, pp.391–420, North-Holland, 1978.
Futamura, Y., Partial evaluation of computation process — an approach to compiler compiler. Systems, Computers, Controls, 2, 5 (1971) pp. 45–50.
Jones N., Sestoft P., Sondergaard H., An experiment in partial evaluation: the generation of a compiler generator. In: Jouannaud J.-P. (Ed.) Rewriting Techniques and Applications, Dijon, France, LNCS 202, Springer, 1985.
Jones, Neil. The essence of program transformation by partial evaluation and driving. In: Proc. of The Atlantique Worlshop on Semantics Based Program Manipulation, N.Jones and C.Talcott Ed. Copenhagen University, pp.134–147, 1994.
Glück, R., Towards multiple self-application, Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation (Yale University), ACM Press, 1991, pp.309–320.
Glück, R. and Klimov, And., Occam's razor in metacomputation: the notion of a perfect process tree. In: Static Analysis, COusot et.al (Eds), LNCS Vol 724, pp.112–123, Springer-Verlag 1993.
Glück R. and Sørensen, M.H. Partial deduction and driving are equivalent. In: Symposium on Programming Language Implementation and Logic Programming (PLILP'94), LNCS, Springer-Verlag, 1994.
Glück R. and Turchin V., Experiments with a Self-applicable Supercompiler, CCNY Technical Report, 1989.
Turchin, V.F., Equivalent transformations of recursive functions defined in Refal. In: Teoriya Yazykov I Metody Postroeniya Sistem Programmirovaniya (Proceedings of the Symposium), Kiev-Alushta (USSR), pp.31–42, 1972 (in Russian).
Turchin V.F., Klimov A.V. et al, Bazisnyi Refal i yego realizatsiya na vychislitel'nykh mashinakh (Basic Refal and its implementation on computers) GOSSTROY SSSR, TsNIPIASS, Moscow, 1977 (in Russian).
Turchin, V.F. The Language Refal, the Theory of Compilation and Metasystem Analysis, Courant Computer Science Report #20, New York University, 1980.
Turchin, V.F., Nirenberg, R.M., Turchin, D.V. Experiments with a supercompiler. In: ACM Symposium on Lisp and Functional Programming (1982), ACM, New York, pp. 47–55.
Turchin, V.F. The concept of a supercompiler, ACM Transactions on Programming Languages and Systems, 8, pp. 292–325, 1986.
Turchin V., Refal-5, Programming Guide and Reference Manual, New England Publishing Co., 1989.
Turchin V., Nemytykh, A. Metavariables: Their implementation and use in Program Transformation, CCNY Technical Report CSc TR-95-012, 1995.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nemytykh, A.P., Pinchuk, V.A., Turchin, V.F. (1996). A Self-Applicable supercompiler. 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_16
Download citation
DOI: https://doi.org/10.1007/3-540-61580-6_16
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