Skip to main content

The Supercompiler SCP4: General Structure

  • Conference paper
Perspectives of System Informatics (PSI 2003)

Part of the book series: Lecture Notes in Computer Science ((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).

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ershov, A.P.: Mixed comp.: potential applications and problems for study. Theoret. Comp. Science 18, 41–67 (1982)

    Article  MATH  MathSciNet  Google Scholar 

  2. Futamura, Y., Nogi, K.: Generalized partial computation. In: Proc. of the IFIP TC2 Workshop, pp. 133–151 (1988)

    Google Scholar 

  3. Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Eval. and Automatic Program Generation. Prentice Hall Intern., Englewood Cliffs (1993)

    Google Scholar 

  4. Korlyukov, A.V.: User manual on the Supercompiler Scp4 (1999), http://www.refal.net/supercom.htm (in Russian)

  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. Korlyukov, A.V., Nemytykh, A.P.: Supercompilation of Double Interpretation (2002), http://www.refal.net/~korlukov/scp2int/Karliukou_Nemytykh.pdf

  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. Nemytykh, A.P.: The Supercomp. SCP4: Gen. Struct (2003), ftp://ftp.botik.ru/pub/local/scp/refal5/GenStruct.ps.gz

  9. Nemytykh, A.P., Turchin, V.F.: The Supercompiler Scp4: sources, on-line demonstration (2000), http://www.botik.ru/pub/local/scp/refal5/

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

    Chapter  Google Scholar 

  13. Turchin, V.F.: The concept of a supercompiler. ACM TOPLAS 8, 292–325 (1986)

    Article  MATH  Google Scholar 

  14. Turchin, V.F.: The algorithm of generalization in the supercompiler. In: see reference to [2], pp. 531–549 (1988)

    Google Scholar 

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

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nemytykh, A.P. (2004). The Supercompiler SCP4: General Structure. In: Broy, M., Zamulin, A.V. (eds) Perspectives of System Informatics. PSI 2003. Lecture Notes in Computer Science, vol 2890. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39866-0_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-39866-0_18

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20813-6

  • Online ISBN: 978-3-540-39866-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics