| Anders Bondorf. Improving binding times without explicit CPS-conversion. In 1992. |
....time (and which are not) It is also a drawback because some programs require non trivial transformation (binding time improvements) before they specialize well. Hence, some research has been geared towards automatizing these transformations and including them into partial evaluation systems [1, 7, 8, 16, 20]. The present work concerns continuation based partial evaluation, which incorporates one of the most essential binding time improvements for call by value functional programming languages. It was pioneered by Bondorf, Consel, and Danvy [1, 3] and later re ned and explained by Danvy, Hatcli , ....
....them into partial evaluation systems [1, 7, 8, 16, 20] The present work concerns continuation based partial evaluation, which incorporates one of the most essential binding time improvements for call by value functional programming languages. It was pioneered by Bondorf, Consel, and Danvy [1, 3] and later re ned and explained by Danvy, Hatcli , Lawall, and the present author [13, 16, 17] The basic idea is that code may be generated interleaved with specialization time computations. For example let x = e in 4) let x = e in 21 that is, the code generation for the surrounding let ....
[Article contains additional citation context not shown here]
Anders Bondorf. Improving binding times without explicit CPS-conversion. In Proc. 1992 ACM Conference on Lisp and Functional Programming, pages 1-10, San Francisco, California, USA, June 1992. 14
....We gratefully thank Cormac Flanagan for implementing this experiment. 119 Chapter 6 Correspondence of Data Flow Analyzers The final component of compilers that we will study is data flow analysis. The literature generally supports the idea that CPS improves the precision of data flow analysis [10, 15, 33, 34, 58, 92]. Although much of the evidence is informal, investigations by Nielson [72] and Burn Filho [33, 34] support, to some degree, the idea with formal results. However, their results do not pinpoint the source of increased abstract information and do not explain the observation of many people that ....
Bondorf, A. Improving binding times without explicit CPS-conversion. In Proceedings of the ACM Conference on Lisp and Functional Programming (1992) 1--10. 149
....effects. Similarly, the constraint over the branches of a conditional is introduced because one cannot decide statically which conditional branch should be selected. The above mentioned constraint on the body of a letexpression can be relaxed if one uses a continuation based program specializer [2, 10, 18]. The constraint connecting the branches of a test with the test itself can be relaxed as well if one allows the same continuation based specializer to lift the test above the context, either by duplicating the context or by using a let expression. Given such a specializer, we can show that ....
....relocates potentially static contexts inside definitely dynamic contexts (let expressions and conditionals) thereby providing a bindingtime improvement. To this end, the CPS transformation itself is continuation based [7] which paved the way to continuation based partial evaluation [2, 18]. Hatcli# and Danvy have characterized the full e#ect of continuation based partial evaluation as online let flattening in Moggi s computational meta language [10] This characterization justifies why o#ine let flattening is also, partially, a binding time improvement [13] In any case, o#ine let ....
Anders Bondorf. Improving binding times without explicit cps-conversion. In William Clinger, editor, Proceedings of the
....need be annotated with a binding time, and only function arguments need be coerced. Constants and expressions are always static, and are coerced to be dynamic where necessary. let expressions are always dynamic, but their bodies may even so be static since we use Bondorf s CPS specialisation [3], which moves the context of a let into its body, where it can be specialised. Applications to binding times and coercions always take place during specialisation, and so need no annotation. We have already seen integer coercions. A coercion OE 1 b1 b2 OE 2 coerces a function with ....
A. Bondorf. Improving binding times without explicit cps-conversion. In 1992 ACM Conference on Lisp and Functional Programming. San Francisco, California, pages 1--10, June 1992.
....11, 12, 17] Compiler writers believe that the intermediate representation based on CPS eases the production of code and facilitates optimizations. Numerous people also argue that the CPS transformation increases the precision of the data flow analysis that is necessary for advanced optimizations [2, 3, 5, 6, 16]. 2 Even though CPS programs are widely accepted as an advantageous intermediate representation, few compiler writers can pinpoint what distinguishes the CPS representation from other intermediate representations or precisely why it is better. In an attempt to understand the principles of ....
Bondorf, A. Improving binding times without explicit CPS-conversion. In Proceedings of the ACM Conference on Lisp and Functional Programming (1992) 1--10.
....p and can transmit useful feedback to the user of the system. The specialized program is built from pieces of the original source program. The inverse translation is hard wired into the specializer. Examples of this approach are Bondorf s specializer in extended continuationpassing style [4] and a specializer for call by value lambda calculus with first class references in extended continuation passing store passing style [17] Specializer in Direct Style with Monadic Operators Here we depart from writing the specializer in a pure language and use a meta interpreter eval = eval v ....
Anders Bondorf. Improving binding times without explicit CPS-conversion. In Proc. 1992 ACM Conference on Lisp and Functional Programming, pages 1--10, San Francisco, California, USA, June 1992. 13
....that further optimizations on the generated code can be useful. It may be possible, through the use of an j v like reduction, to produce optimal results without having the user rewrite the program in CPS. Bondorf has studied improving binding times without resorting to explicit CPS conversion [9]. The work of Sabry and Wadler suggests that the use of Moggi s c may also be relevant to dealing with this problem [76] 3. Can MetaML be compiled using the traditional functional programming language compilation techniques Compiling MetaML requires staging its semantics, and will reveal new ....
Bondorf, A. Improving binding times without explicit CPS-conversion. In 1992 ACM Conference on Lisp and Functional Programming. San Francisco, California (June 1992), pp. 1--10.
.... smart primitives actually probes the actual values of the static inputs. Two of the harder problems in partial evaluation are pushing a static context over a dynamic branch such as an if or case, and handling higher order functions. The first has been handled by continuation based specialization[6, 4], and the second by a closure analysis[14, 15, 3, 5] In reification based systems, higher order functions are treated like any other function, and static contexts are handled implicitly by the use of the shift and reset control operators which abstract the current context and push it into the ....
A. Bondorf. Improving binding times without explicit cps-conversion. In 1992 ACM Conference in Lisp and Functional Programming, San Francisco, California (Lisp Pointers, vol. V, no. 1, 1992), pages 1--10. New York: ACM, 1992.
....1) 3 ( 2 d 0) 1) to state this code duplication explicitly by garnishing one s source programs with eta redexes (see [15, Section 10.1. 4, Item (2) and [15, Section 12.4] for two separate explanations) This solution has been consistently maintained in the later versions of Similix [3, 5], and adopted in LambdaMix [12, 15] It seems that this decision, together with the forward nature of binding time analysis [9] have created the need for binding time improvements: ffl Eta expansion prevents the dynamization of higherorder values and contexts. Delta expansion prevents the ....
Anders Bondorf. Improving binding times without explicit CPS-conversion. In William Clinger, editor, Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, LISP Pointers, Vol. V, No. 1, pages 1--10, San Francisco, California, June 1992. ACM Press.
....This is similar to the introduction of let expressions in our specializer. 7. 3 Specialization with Continuations Continuation based partial evaluation started of with Consel and Danvy s improvement of static data flow by CPS transforming the source program before specializing it [18] Bondorf [10] avoids CPS in residual programs by writing the specializer itself using continuations and liberalizing the binding time analysis in the same way as Consel and Danvy. Lawall and Danvy [48] reexpress Bondorf s specializer in direct style plus control operators to gain efficiency. Moura, Consel, and ....
....single assignment form [21] and apply analysis techniques developed for pure functional programs. This parallels Consel and Danvy s use of the CPS transformation [18] In our work we use Consel and Danvy s approach as a proof device. In practice, our specializer rephrases Bondorf s specializer [10] in the style of Consel and Danvy [18] using A normal form instead of CPS for the residual code and, of course, adding store passing. Our actual implementation generalizes Lawall and Danvy s direct style specializer. Interestingly, Hatcliff and Danvy [39] have specified and proved correct a ....
Anders Bondorf. Improving binding times without explicit CPS-conversion. In Proc. 1992 ACM Conference on Lisp and Functional Programming, pages 1--10, San Francisco, California, USA, June 1992.
....time. This context move can be achieved either by a source transformation such as the CPS transformation or by delimiting the static continuation of the specializer and relocating it inside the reconstructed expression. Both of these continuation based methods are documented in the literature [Bondorf 1992; Consel and Danvy 1991; Jones et al. 1993; Lawall and Danvy 1995] Note that this change in the specializer requires a corresponding change in the binding time analysis. 1.5 Eta Expansion Jones, Gomard, and Sestoft list eta expansion as an effective binding time improvement [Jones et al. 1993] ....
....Also like Gomard and Jones, only static terms are typed. Our partial evaluator provides a proper treatment of disjoint sums, where a dynamic sum of two static values is not approximated to be dynamic if its context of use is static. Instead, this context is duplicated during specialization. Bondorf [1992] has given a specification of this technique, but no proof of correctness. The technique is also used to specify one pass CPS transformations [Danvy and Filinski 1990] Like the CPS transformation, the specification can be specified both purely functionally or in a more direct style, using ....
Bondorf, A. 1992. Improving binding times without explicit cps-conversion. In Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, W. Clinger, Ed. LISP Pointers 5, 1 (June), 1--10.
....gives roughly if x = 0 then (v:v 7) 9 else (v:v 7) 13 which partial evaluation can transform to if x = 0 then 16 else 20. A similar effect is obtained if the partial evaluator adopts an explicit context distribution rule that moves the context 7 into the branches of the conditional. Bondorf [Bon92] shows how such manipulations can be incorporated elegantly by writing the specializer itself in CPS. Lawall and Danvy adopt a language with control operators to include such manipulations in a direct style (DS) specializer [Law94] However, these methods cannot handle dynamic, recursive data ....
....ideas between different techniques. Our results are related to previous work on partial evaluation and the CBV CPS translation. In [Con91, Dan91] it was explained how CBV CPS can improve the specialization of programs by allowing static information to propagate across dynamic contexts. Later work [Bon92, Bon94, Law94] describes an extension of standard partial evaluation called CPS specialization; CPS specialization of a program achieves the same effect as plain partial evaluation of the CBV CPS translated program. This paper explains the analogous situation for the CBN CPS translation; CBN CPS is to ....
A. Bondorf. Improving Binding Times without Explicit CPS-Conversion. In ACM Lisp and Functional Programming Conference. San Francisco, California, June 1992.
....Essence of Compiling with Continuations Cormac Flanagan Amr Sabry Bruce F. Duba Matthias Felleisen Department of Computer Science Rice University Houston, TX 77251 1892 Abstract In order to simplify the compilation process, many compilers for higher order languages use the continuationpassing style (CPS) transformation in a first phase to generate an intermediate representation of the source program. The salient aspect of this intermediate form is that ....
....the language of continuation passing style (CPS) terms as their intermediate representation for programs [2, 14, 18, 19] This strategy apparently offers two major advantages. First, Plotkin [16] showed that the value calculus based on Supported in part by NSF grants CCR 89 17022 and CCR 91 22518 and Texas ATP grant 91 003604014. To appear in: 1993 Conference on Programming Language Design and Implementation. June 21 25, 1993 Albuquerque, New Mexico the fi value rule is an operational semantics for the source language, that the conventional full calculus is a semantics for the ....
[Article contains additional citation context not shown here]
Bondorf, A. Improving binding times without explicit CPS-conversion. In Proceedings of the 1992 ACM Conference on Lisp and Functional Programming (1992), pp. 1--10.
....We gratefully thank Cormac Flanagan for implementing this experiment. 119 Chapter 6 Correspondence of Data Flow Analyzers The final component of compilers that we will study is data flow analysis. The literature generally supports the idea that CPS improves the precision of data flow analysis [10, 15, 33, 34, 58, 92]. Although much of the evidence is informal, investigations by Nielson [72] and Burn Filho [33, 34] support, to some degree, the idea with formal results. 16 However, their results do not pinpoint the source of increased abstract information and do not explain the observation of many people that ....
Bondorf, A. Improving binding times without explicit CPS-conversion. In Proceedings of the ACM Conference on Lisp and Functional Programming (1992) 1--10. 149
.... standpoint [29] In practice, this decision created the need for source binding time improvements in offline partial evaluation [36, Chapter 12] In contrast, binding time coercions improve binding times without explicit eta conversion , to paraphrase the title of Bondorf s LFP 92 paper [7] a property which should prove crucial for multi level binding time analyses since it eliminates the need for (unfathomed) multilevel binding time improvements [26] Thus Mix like partial evaluation [36] and type directed partial evaluation fundamentally contrast when it comes to dynamic ....
Anders Bondorf. Improving binding times without explicit cps-conversion. In William Clinger, editor, Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, LISP Pointers, Vol. V, No. 1, pages 1--10, San Francisco, California, June 1992. ACM Press.
....back into the direct style world. As a consequence, the source program remains in the familiar direct style. Alternatively, this binding time improvement can be integrated into the specializer. Then the source program is completely unchanged. Bondorf develops such a specializer in two steps [3]. First, the specializer (PEd) is rewritten in CPS by hand (PEc ) to make its continuations explicitly accessible. Then, the continuations are manipulated in non standard ways (PE 0 c ) so that, in effect, static values reach their consumer statically, i.e. at partial evaluation time. ....
.... specializer PE 0 c precisely correspond to the effect of the control operators shift and reset [13, 14] and that inserting shift and reset at a few selected places (PE 0 d ) and then converting the specializer into CPS (PE 0 c ) automatically yields Similix s continuationbased specializer [3]. This makes it possible to keep both the source program and the specializer in the familiar direct style. Our approach is characterized by the following diagram: PEd PE 0 d PE 0 c manual binding time improvement (Section 2) F NaN F NaN automatic CPS transformation F NaN F NaN fflffl ....
[Article contains additional citation context not shown here]
Anders Bondorf. Improving binding times without explicit CPS-conversion. In Clinger [4], pages 1--10.
....10, 11, 17] Compiler writers believe that the intermediate representation based on CPS eases the production of code and facilitates optimizations. Numerous people also argue that the CPS transformation increases the precision of the data flow analysis that is necessary for advanced optimizations [2, 3, 5, 6, 16]. 1 Even though CPS programs are widely accepted as an advantageous intermediate representation, few compiler writers can pinpoint the advantages of the CPS representation over other intermediate representations. In an attempt to understand the principles of compiling with continuations and to ....
Bondorf, A. Improving binding times without explicit CPS-conversion. In Proceedings of the ACM Conference on Lisp and Functional Programming (1992) 1--10.
....code. Additionally, there is a lift construct that coerces first order values to code. Underlining indicates code generation. The superscript 3 produces fresh variables. Multiple occurrences of, say, x 3 denote the same variable. The specializer employs continuation based partial evaluation [3, 7, 38] to generate code in ANF. Whenever a piece of code denoting a serious computation (a non value) is constructed, it is wrapped in a let expression with a fresh variable which is used in place of the piece of code. This happens in the rules for primitive operations and applications. The let ....
....is also a suitable candidate for composition with a compiler in the same way as shown in this work. Partial evaluation [8,30] is an automatic program transformation that specializes programs with respect to parts of the input which are known in advance. Continuationbased partial evaluation [3, 38] is the enabling technology that makes our specializer suited to generate code in ANF. The partial evaluator that we use is the ANF version of Consel and Danvy s [7] initial approach to improve the results of partial evaluation by CPS transformation. The original application of our specializer is ....
Anders Bondorf. Improving binding-times without explicit CPS conversion. In Symp. Lisp and Functional Programming '92, pages 1--10, San Francisco, Ca., June 1992. ACM.
....under call by name: let y 3 ( let y 1 ( tick in let y 2 ( tick in unit p5q) in succ y 3 : 6) 3. 3 Control based binding time improvements Not all programs specialize equally well, and there has been a good deal of work dealing with how programs may be rearranged to yield better specialization [2, 3, 11]. The metalanguage elegantly captures a common pattern of rearrangements (called control based binding time improvements) via the monadic laws. As illustration, consider the example at line (4) in a situation where we are deciding not to execute the tick operation at specialization time. In this ....
....evaluation. Hatcliff and Danvy [9] present a detailed formalization of partial evaluation using the computational metalanguage as an intermediate language. The correctness of binding time analysis and soundness of specialization are proven, a formalization of continuation based specialization [2, 11] is given, and it is proven that the monadic laws can capture the same effect as continuation based specialization without introducing continuations. Dussart, Hughes, and Thiemann [5] use the computational metalanguage as a foundation for extending type specialization [10] to functional languages ....
Anders Bondorf. Improving binding times without explicit CPS-conversion. In William Clinger, editor, Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, LISP Pointers, Vol. V, No. 1, pages 1--10, San Francisco, California, June 1992. ACM Press.
....state this code duplication explicitly by garnishing one s source programs with eta redexes (see Section 10.1. 4, Item (2) and Section 12.4 of Jones, Gomard, and Sestoft s textbook [15] for two separate explanations) This solution has been consistently maintained in the later versions of Similix [3], 5] and adopted in Lambda Mix [12] 15] It seems that this decision, together with the forward nature of binding time analysis [9] have created the need for binding time improvements: ffl Eta expansion prevents the dynamization of higher order values and contexts. Delta expansion prevents ....
Anders Bondorf. Improving binding times without explicit CPS-conversion. In William Clinger, editor, Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, LISP Pointers, Vol. V, No. 1, pages 1--10, San Francisco, California, June 1992. ACM Press.
....compilers that spend much of their time on coding and decoding. By writing cogen by hand, the coding problem is eliminated [HL91, BW93] Specializers written in continuation passing style (abbreviated cps ) perform better than specializers written in direct style (abbreviated ds ) [Bon92]. For example, a specializer written in cps straightforwardly handles nonunfoldable let expressions with static body. The contribution of this paper is to combine the idea of hand writing cogen with cps based specialization. We develop a handwritten cps cogen which is superior to a ds cogen for ....
....a (handwritten) cps specializer Scp . See the horizontal arrows in Figure 1. ds specializer S d Gamma ds cogen C d # # cps specializer Scp Gamma cps cogen Ccp Figure 1: Overview The cps specializer Scp can be derived from the dsspecializer S d (the leftmost vertical arrow in Figure 1) [Bon92]. We shall derive the cps cogen Ccp from the cpsspecializer Scp . In Section 4 we briefly discuss how to derive Ccp from C d instead (rightmost vertical arrow) this derivation is relevant if one is to hand write a cps cogen for a language where a handwritten ds cogen already exists. We shall ....
[Article contains additional citation context not shown here]
Anders Bondorf. Improving binding times without explicit cps-conversion. In 1992 ACM Conference on Lisp and Functional Programming. San Francisco, California. LISP Pointers V, 1, pages 1--10, June 1992.
No context found.
Anders Bondorf. Improving binding times without explicit CPS-conversion. In 1992.
No context found.
Anders Bondorf. Improving binding times without explicit CPS-conversion. In ACM Conference on Lisp and Functional Programming, pages 1-- 10. ACM Press, 1992.
No context found.
Anders Bondorf. Improving binding times without explicit CPS-conversion. In LFP'92 [21], pages 1--10.
No context found.
Anders Bondorf. Improving binding times without explicit CPS-conversion. In William Clinger, editor, Proceedings of the 1992 ACM Conference on Lisp and Functional Programming, LISP Pointers, Vol. V, No. 1, pages 1--10, San Francisco, California, June 1992. ACM Press.
First 50 documents
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