Accurate Binding Time Analysis for Imperative Languages
WANG Ming wen 1, SUN Yong qiang 2 (1.Institute of Computer Science and Technology,Jiangxi Normal University, Nanchang 330027, China;2.Institute of Computer Science and Engineering, Shanghai Jiaotong University, Shanghai 200030, China)
The most important phase of partial evaluation is the binding time analysis(BTA), which works ahead to distinguish those computations which can be computed in partial evaluation time from which should be left to the running time, when the binding time information of the program's initial argument is given. However, we have discovered that existing partial evaluation technology can not effectively specialize existing realistic programs. This is due to that they are lack of accuracy of binding time analysis in dealing with typical features of imperative programs. In this paper, we introduce an approach that fundamentally differs from previous work in several respects, separate the different tasks performed by a binding time analysis into three distinct phases: binding time phase, recursive call analysis phase and sensitivity analysis phase. This separation simplifies the design of the analysis. Additionally, this approach allows us to express new program transformations, such as evaluating and residualizing the same program construct.