| Valentin F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46-54, February 1979. |
.... Don t solve the same sub problem repeatedly. A successful practical example is the XSB logic programming system [59] based on memoization: Instead of recomputing results, store them for future retrieval when rst computed. Avoid multiple passes over same data structure (tupling, deforestation [8, 11, 33, 76]) Use an abstract, high level speci cation language. SETL [9] is a good example, with small mathematics like speci cations (sets, tuples, nite mappings, xpoints) that are well suited to automatic transformation and optimization of algorithms concerning graphs and databases. The pioneering ....
Valentin F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46-54, February 1979.
....the values it manipulates. In the framework of partial evaluation [6, 2] a typical application consists in specializing an interpreter when the interpreted program is known. This process looks like a compilation of the interpreted program into the language in which the interpreter is written [4, 12]. If we want that this mechanism acts as a compiler, it must solve the above points. This leads to the following operations. 1. Specialization of the eval loop of the interpreter with respect to the interpreted program. Control points of the interpreted program (a data) become points of the ....
....for P , we have the equality: Theta Theta int P (d) hh mix(int; P) ii (d) int(P ; d) 2 Thus, int P represents a icompiledj version of P in the language L. This ability of partial evaluators to create automatically a compilation process using an interpreter is known since a long time [4, 12]. 2.2 A Compiler from an Interpreter Moreover, if the partial evaluator is written in the same language that it specializes, we can create a icompilerj for S programs if we apply it to itself and to int. If comp int = mix(mix; int) then we have: comp int ] P ) hh mix(mix; int) ii (P ) ....
V.F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):4654, February 1979.
....continue to search deeper and deeper in an unending elaboration of recursive function calls. Ferguson and Wadler [FW89] gave a sufficient condition, called treeless functions , to avoid this undesired behavior. Another, powerful approach to transforming function compositions is supercompilation [Tur79, Tur86b, Tur86a] In this technique, the strategy is driving of the outermost application into the unfolded definition of the innermost definition to look for matching patterns of composite application. Driving elaborates the definition of the outermost function on every pattern of constructed ....
V.F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46--54, February 1979.
....we consider only one language and assume that the same metacode is used on all levels. 3. 1 Metasystem Hierarchies Metasystem hierarchies are a corner stone of Turchin s approach: the construction of hierarchies of arbitrary height is taken as the basis for program analysis and transformation [21] (in contrast to logics and mathematics which usually deal with two level hierarchies) For example, the well known Futamura projections make use of a three level hierarchy of metasystems (i.e. program specializers) To make multi level hierarchies practical, one needs facilities for satisfying ....
Valentin F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46--54, 1979.
....and the outside in strategy, in 1972 [80, 81] and the main results concerning selfapplication, metasystem transition, in 1973. The book [96] defined all three Futamura projections in terms of metasystem transition. In the English language, the work on supercompilation was first described in [83, 84, 85, 86] and then developed further in [87, 89, 93, 99] For more historical details, see Turchin s personal account [95] Despite these remarkable contributions, supercompilation has not found recognition outside a small circle of experts. This paper gives a gentle introduction to the principles of ....
.... of this paper we adopt the language independent formalization of [30] based on [27, 35, 84, 97] Metasystem transition is a key ingredient of Turchin s approach: the construction of hierarchies of metasystems (e.g. supercompilers) was taken as the basis for program analysis and transformation [83]. The book [96] defined all three Futamura projections in terms of metasystem transition. Section 5.1 introduces a formalism for metacomputation, in Sect. 5.2 discusses supercompilation and program inversion, and Sect. 5.3 presents metasystem transition. 5.1 Metacomputation Revisited Computation. ....
V.F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46--54, 1979.
....with treeless definitions, a syntactic restriction on the terms defining functions. However, we will see that deforestation has valuable applications well beyond this original, intended scope by applying it to arbitrary definitions, see Sections 5.5 and 6.2. Supercompilation, conceived by Turchin (1979,1980,1986) in the early 1970 s in Russia for the language Refal, achieves the effects of both deforestation and partial evaluation, as well as some more dramatic optimizations. This is done by driving, i.e. unfolding and propagation of information, and generalization (Turchin, 1988) a form of ....
Turchin, V.F. 1979. A supercompiler system based on the language Refal. In SIGPLAN Notices, 14(2): 46--54.
....specialized parsers. One particularly simple specialization technique, offline partial evaluation, suffices to achieve good results. Also, offline partial evaluation can automatically generate stand alone parser generators using either self application of the partial evaluator [Jones et al. 1985; Turchin 1979] or a compiler generator (cogen) Launchbury and Holst 1991] The generated parsers are simple in structure, consisting of mutually recursive procedures that encode parser states. To achieve good results with offline partial evaluation, realistic programs sometimes require slight changes, ....
....s inp = p s inp Jp s inp K d inp = result JpK s inp d inp = result A generating extension results from applying a program generator generator (PGG) to p. Customarily, a PGG results from double self application of a partial evaluator as described by the third Futamura projection [Futamura 1971; Turchin 1979; Jones et al. 1993] PGGs are also called compiler generators (cogen) or partial evaluation compilers (pecom) because they can turn interpreters into compilers. We will call a PGG constructed by self application of a partial evaluator cogen. Specialization with generating extensions (also called ....
Turchin, V. F. 1979. A supercompiler system based on the language Refal. SIGPLAN Notices 14, 2 (Feb.), 46--54.
....s inp terminate. Jp genK s inp = p s inp Jp s inp K d inp = result JpK s inp d inp = result A generating extension results from applying a programgenerator generator (PGG) to p. A PGG can result from double self application of a partial evaluator as described by the third Futamura projection [21, 30, 62], or from direct implementation [36, 59] 4 Specializing Core Scheme The building blocks of the system are a PGG for a large subset of Scheme [59] and the Scheme 48 byte code implementation of Scheme [32] Our PGG has several design properties which make it especially suitable for our goals. ....
Valentin F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46--54, February 1979.
....languages. The fundamental language used 1 The following interpretation of Turchin s work is very simplified and is most likely not how he would describe his own work. by Turchin, i.e. the predefined language, is called Refal. This language is a (somewhat strange) rewrite system on strings [29]. The Refal language could thus be used as a specification language for programming languages: An interpreter for a language L could be written in Refal, and supercompilation could turn L programs into efficient programs. In fact, one could imagine to introduce a hierarchy of ad hoc programming ....
TURCHIN, V. A supercompiler system based on the language Refal. SIGPLAN Notices 14, 2 (1979), 46--54.
.... the program (which accepts the static parameters and computes the residual program) The Futamura projections even lead to the automatic generation of a binding time polyvariant compiler generator (or cogen a generator of generating extensions) at the (rather low) cost of writing the interpreter [13, 29, 11, 12]. The construction of a binding time polyvariant cogen is new. The following section is an introduction to the interpretive approach and its application to the polyvariant expansion problem. The next section defines the language of the subject programs. Section 3 defines a bindingtime domain and ....
.... Moreover, mapping an arbitrary b to the least b 0 in the restricted lattice can be regarded as a widening operator [8, 9, 10] The idea of using self application to obtain stand alone generating extensions came from Futamura [13] Turchin and Ershov later extended the idea to compiler generators [29, 11, 12]. 8 Conclusion We have implemented polyvariant expansion for higher order functional programs using the interpretive approach. Our method uses a fine grained abstract binding time domain. It fully automates Bulyonkov s method and extends it to higher order programs, and we have implemented it. In ....
V. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46--54, February 1979. This article was processed using the L A T E X macro package with the LLNCS document class.
....by double self application. Turchin and his group also worked with partial evaluation in the early 1970s, in the context of the functional language Refal, and gave a description of selfapplication and double self application [94] The history of that work is briefly summarized in English in [95]. Andrei Ershov worked with imperative languages, and used the term mixed computation to mean roughly the same as partial evaluation [34, 35] In 1984, Jones, Sestoft, and S ndergaard constructed a self applicable partial evaluator for a simple first order functional language [59, 60, 86] until ....
.... partial evaluator Pell Mell [70] Birkedal and Welinder created a generator of generating extensions [17, 18] Refal and supercompilation: Turchin created the Refal language and developed the program transformation techniques of driving and supercompilation, which generalize partial evaluation [95, 96, 97]. A number of recent surveys on driving and supercompilation exist [48, 89, 90, 91] Prolog partial evaluation was pioneered by Komorowski [64, 65] subsequent work on Prolog includes [13, 44, 45, 66, 93, 98, 99] Sahlin constructed a practical but non self applicable partial evaluator for full ....
V.F. Turchin. A supercompiler system based on the language Refal. SIGPLAN Notices, 14(2):46--54, February 1979.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC