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).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Ershov, A.P.: Mixed comp.: potential applications and problems for study. Theoret. Comp. Science 18, 41–67 (1982)
Futamura, Y., Nogi, K.: Generalized partial computation. In: Proc. of the IFIP TC2 Workshop, pp. 133–151 (1988)
Jones, N.D., Gomard, C.K., Sestoft, P.: Partial Eval. and Automatic Program Generation. Prentice Hall Intern., Englewood Cliffs (1993)
Korlyukov, A.V.: User manual on the Supercompiler Scp4 (1999), http://www.refal.net/supercom.htm (in Russian)
Korlyukov, A.V.: A number of examples of the program transformations with the supercompiler Scp4 (2001), http://www.refal.net/~korlukov/pearls/ (in Russian)
Korlyukov, A.V., Nemytykh, A.P.: Supercompilation of Double Interpretation (2002), http://www.refal.net/~korlukov/scp2int/Karliukou_Nemytykh.pdf
Nemytykh, A.P.: A Note on Elimination of Simplest Recursions. In: Proc. of ACM SIGPLAN Asia-PEPM 2002, pp. 138–146 (2002)
Nemytykh, A.P.: The Supercomp. SCP4: Gen. Struct (2003), ftp://ftp.botik.ru/pub/local/scp/refal5/GenStruct.ps.gz
Nemytykh, A.P., Turchin, V.F.: The Supercompiler Scp4: sources, on-line demonstration (2000), http://www.botik.ru/pub/local/scp/refal5/
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)
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)
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)
Turchin, V.F.: The concept of a supercompiler. ACM TOPLAS 8, 292–325 (1986)
Turchin, V.F.: The algorithm of generalization in the supercompiler. In: see reference to [2], pp. 531–549 (1988)
Turchin, V.F.: Refal-5, Programming Guide and Reference Manual. New England Publishing Co. (1989), URL: http://www.botik.ru/pub/local/scp/refal5/
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)
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/
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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