Advertisement

The Supercompiler SCP4: General Structure

  • Andrei P. Nemytykh
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2890)

Abstract

Supercompilation is a program transformation technique introduced in the 1970s by V. Turchin [13,14,16]. His ideas were studied by a number of authors for a long time. We constructed an experimental supercompiler for a functional language Refal-5 [15]. The Scp4 project was discussed with V. Turchin. He initiated and supported our work. Scp4 has been implemented once again using Refal-5. Sources of Scp4 and the whole version of this paper are available for immediate download [8,9,17]. A user manual on Scp4 and reports on several interesting experiments can be found in [4,5,6]. Scp4 is a first experimental supercompiler for the real functional language Refal-5. The principal new tool in Scp4 is an online analysis of global properties of folded-components of the meta-tree MTr of all potential computations. Let a program P and a parameterized input of the P be given. Then such a pair defines a partial mapping. A supercompiler is a transformer of such pairs. The transformer must preserve the map values on the map domain. Scp4 unfolds a potentially infinite tree of all possible computations. It reduces in the process the redundancy that could be present in the original program. It folds the tree into a finite graph of states and transitions between possible configurations of the computing system. It analyses global properties of the graph and specializes this graph w.r.t. these properties. The resulting definition is constructed solely based on the meta-interpretation of the source program rather than by a step-by-step transformation of the program. The size of the Scp4 system is about 19500 lines of commented source code (800 KB).

Keywords

Global Property Source Program Internal Language Task Node Pivot Node 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ershov, A.P.: Mixed comp.: potential applications and problems for study. Theoret. Comp. Science 18, 41–67 (1982)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Futamura, Y., Nogi, K.: Generalized partial computation. In: Proc. of the IFIP TC2 Workshop, pp. 133–151 (1988)Google Scholar
  3. 3.
    Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Eval. and Automatic Program Generation. Prentice Hall Intern., Englewood Cliffs (1993)Google Scholar
  4. 4.
    Korlyukov, A.V.: User manual on the Supercompiler Scp4 (1999), http://www.refal.net/supercom.htm (in Russian)
  5. 5.
    Korlyukov, A.V.: A number of examples of the program transformations with the supercompiler Scp4 (2001), http://www.refal.net/~korlukov/pearls/ (in Russian)
  6. 6.
    Korlyukov, A.V., Nemytykh, A.P.: Supercompilation of Double Interpretation (2002), http://www.refal.net/~korlukov/scp2int/Karliukou_Nemytykh.pdf
  7. 7.
    Nemytykh, A.P.: A Note on Elimination of Simplest Recursions. In: Proc. of ACM SIGPLAN Asia-PEPM 2002, pp. 138–146 (2002)Google Scholar
  8. 8.
    Nemytykh, A.P.: The Supercomp. SCP4: Gen. Struct (2003), ftp://ftp.botik.ru/pub/local/scp/refal5/GenStruct.ps.gz
  9. 9.
    Nemytykh, A.P., Turchin, V.F.: The Supercompiler Scp4: sources, on-line demonstration (2000), http://www.botik.ru/pub/local/scp/refal5/
  10. 10.
    Nemytykh, A.P., Pinchuk, V.A., Turchin, V.F.: A Self-Applicable Supercompiler. In: Dagstuhl Seminar 1996. LNCS, vol. 1110, pp. 322–337. Springer, Heidelberg (1996)Google Scholar
  11. 11.
    Sorensen, M.H., Glück, R.: An algorithm of generalization in positive supercompilation. In: Logic Program.: Proc. of the 1995 Int. Symp., pp. 486–489. MIT, Cambridge (1995)Google Scholar
  12. 12.
    Turchin, V.F., Nirenberg, R.M., Turchin, D.V.: Experiments with a supercompiler. In: ACM Symposium on Lisp and Functional Programming, pp. 47–55. ACM Press, New York (1982)CrossRefGoogle Scholar
  13. 13.
    Turchin, V.F.: The concept of a supercompiler. ACM TOPLAS 8, 292–325 (1986)zbMATHCrossRefGoogle Scholar
  14. 14.
    Turchin, V.F.: The algorithm of generalization in the supercompiler. In: see reference to [2], pp. 531–549 (1988)Google Scholar
  15. 15.
    Turchin, V.F.: Refal-5, Programming Guide and Reference Manual. New England Publishing Co. (1989), URL: http://www.botik.ru/pub/local/scp/refal5/
  16. 16.
    Turchin, V.F.: Supercompilation: Techniques and results. In: Bjorner, D., Broy, M., Pottosin, I.V. (eds.) PSI 1996. LNCS, vol. 1181, pp. 227–248. Springer, Heidelberg (1996)Google Scholar
  17. 17.
    Turchin, V.F., Turchin, D.V., Konyshev, A.P., Nemytykh, A.P.: Refal-5: sources, executable modules (2000), http://www.botik.ru/pub/local/scp/refal5/

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Andrei P. Nemytykh
    • 1
    • 2
  1. 1.Pereslavl-Zalessky, Yaroslavl regionProgram Systems Institute RASRussia
  2. 2.State Key Lab of Software EngineeringWuhan UniversityWuhanChina

Personalised recommendations