scholarly journals CPS Transformation of Flow Information, Part II: Administrative Reductions

2001 ◽  
Vol 8 (40) ◽  
Author(s):  
Daniel Damian ◽  
Olivier Danvy

We characterize the impact of a linear beta-reduction on the result of a control-flow analysis. (By ``a linear beta-reduction'' we mean the beta-reduction of a linear lambda-abstraction, i.e., of a lambda-abstraction whose parameter occurs exactly once in its body.)<br /> <br /> As a corollary, we consider the administrative reductions of a Plotkin-style transformation into continuation-passing style (CPS), and how they affect the result of a constraint-based control-flow analysis and in particular the least element in the space of solutions. We show that administrative reductions preserve the least solution. Since we know how to construct least solutions, preservation of least solutions solves a problem that was left open in Palsberg and Wand's paper ``CPS Transformation of Flow Information.''<br /> <br />Therefore, together, Palsberg and Wand's article ``CPS Transformation of Flow Information'' and the present article show how to map, in linear time, the least solution of the flow constraints of a program into the least solution of the flow constraints of the CPS counterpart of this program, after administrative reductions. Furthermore, we show how to CPS transform control-flow information in one pass.<br /> <br />Superseded by BRICS-RS-02-36.

2002 ◽  
Vol 9 (36) ◽  
Author(s):  
Daniel Damian ◽  
Olivier Danvy

We characterize the impact of a linear beta-reduction on the result of a control-flow analysis. (By "a linear beta-reduction'' we mean the beta-reduction of a linear lambda-abstraction, i.e., of a lambda-abstraction whose parameter occurs exactly once in its body.)<br /> <br />As a corollary, we consider the administrative reductions of a Plotkin-style transformation into continuation-passing style (CPS), and how they affect the result of a constraint-based control-flow analysis and, in particular, the least element in the space of solutions. We show that administrative reductions preserve the least solution. Preservation of least solutions solves a problem that was left open in Palsberg and Wand's article "CPS Transformation of Flow Information.''<br /> <br />Together, Palsberg and Wand's article and the present article show how to map in linear time the least solution of the flow constraints of a program into the least solution of the flow constraints of the CPS counterpart of this program, after administrative reductions. Furthermore, we show how to CPS transform control-flow information in one pass.<br /><br />Supersedes BRICS-RS-01-40.


2000 ◽  
Vol 7 (15) ◽  
Author(s):  
Daniel Damian ◽  
Olivier Danvy

We show that a non-duplicating CPS transformation has no effect on control-flow analysis and that it has a positive effect on binding-time analysis: a monovariant control-flow analysis yields equivalent results on a direct-style program<br />and on its CPS counterpart, and a monovariant binding-time analysis yields more precise results on a CPS program than on its direct-style counterpart. Our proof technique amounts to constructing the continuation-passing style (CPS) counterpart of flow information and of binding times.<br />Our results confirm a folklore theorem about binding-time analysis, namely<br />that CPS has a positive effect on binding times. What may be more surprising is that this benefit holds even if contexts or continuations are not duplicated. The present study is symptomatic of an unsettling property of program analyses: their quality is unpredictably vulnerable to syntactic accidents in source programs, i.e., to the way these programs are written. More reliable program analyses require a better understanding of the effect of syntactic change.


2001 ◽  
Vol 8 (54) ◽  
Author(s):  
Daniel Damian ◽  
Olivier Danvy

We show that a non-duplicating transformation into continuation-passing style (CPS) has no effect on control-flow analysis, a positive effect on binding-time analysis for traditional partial evaluation, and no effect on binding-time analysis for continuation-based partial evaluation: a monovariant control-flow analysis yields equivalent results on a direct-style program and on its CPS counterpart, a monovariant binding-time analysis yields less precise results on a direct-style program than on its CPS counterpart, and an enhanced monovariant binding-time analysis yields equivalent results on a direct-style program and on its CPS counterpart. Our proof technique amounts to constructing the CPS counterpart of flow information and of binding times.<br /> <br />Our results formalize and confirm a folklore theorem about traditional binding-time analysis, namely that CPS has a positive effect on binding times. What may be more surprising is that the benefit does not arise from a standard refinement of program analysis, as, for instance, duplicating continuations.<br /> <br />The present study is symptomatic of an unsettling property of program analyses: their quality is unpredictably vulnerable to syntactic accidents in source programs, i.e., to the way these programs are written. More reliable program analyses require a better understanding of the effect of syntactic change.


2001 ◽  
Vol 8 (55) ◽  
Author(s):  
Daniel Damian ◽  
Olivier Danvy

We build on Danvy and Nielsen's first-order program transformation into continuation-passing style (CPS) to design a new CPS transformation of flow information that is simpler and more efficient than what has been presented in previous work. The key to simplicity and efficiency is that our CPS transformation constructs the flow information in one go, instead of first computing an intermediate result and then exploiting it to construct the flow information.<br /> <br />More precisely, we show how to compute control-flow information for CPS-transformed programs from control-flow information for direct-style programs and vice-versa. As a corollary, we confirm that CPS transformation has no effect on the control-flow information obtained by constraint-based control-flow analysis. The transformation has immediate applications in assessing the effect of the CPS transformation over other analyses such as, for instance, binding-time analysis.


1997 ◽  
Vol 32 (5) ◽  
pp. 261-272 ◽  
Author(s):  
Nevin Heintze ◽  
David McAllester

2000 ◽  
Vol 26 (7) ◽  
pp. 617-634 ◽  
Author(s):  
P. di Blasio ◽  
K. Fisher ◽  
C. Talcott

Sign in / Sign up

Export Citation Format

Share Document