Skip to main content

A Self-Applicable supercompiler

  • Conference paper
  • First Online:
Partial Evaluation

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1110))

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ershov, A.P. On the essence of compilation, In: E.J.Neuhold(ed) Formal Description of Programming Concepts, pp.391–420, North-Holland, 1978.

    Google Scholar 

  2. Futamura, Y., Partial evaluation of computation process — an approach to compiler compiler. Systems, Computers, Controls, 2, 5 (1971) pp. 45–50.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. 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.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. Glück R. and Turchin V., Experiments with a Self-applicable Supercompiler, CCNY Technical Report, 1989.

    Google Scholar 

  9. 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).

    Google Scholar 

  10. 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).

    Google Scholar 

  11. Turchin, V.F. The Language Refal, the Theory of Compilation and Metasystem Analysis, Courant Computer Science Report #20, New York University, 1980.

    Google Scholar 

  12. 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.

    Google Scholar 

  13. Turchin, V.F. The concept of a supercompiler, ACM Transactions on Programming Languages and Systems, 8, pp. 292–325, 1986.

    Google Scholar 

  14. Turchin V., Refal-5, Programming Guide and Reference Manual, New England Publishing Co., 1989.

    Google Scholar 

  15. Turchin V., Nemytykh, A. Metavariables: Their implementation and use in Program Transformation, CCNY Technical Report CSc TR-95-012, 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Olivier Danvy Robert Glück Peter Thiemann

Rights and permissions

Reprints 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

Publish with us

Policies and ethics