Hang Su, Husheng Liao. A Two-Phase Binding-Time Analysis in Partial Evaluation for XQuery. In Mark Burgin, Masud H. Chowdhury, Chan H. Ham, Simone A. Ludwig, Weilian Su, Sumanth Yenduri, editors, CSIE 2009, 2009 WRI World Congress on Computer Science and Information Engineering, March 31 - April 2, 2009, Los Angeles, California, USA, 7 Volumes. pages 454-461, IEEE Computer Society, 2009.
Since a binding-time analysis determines how an off-line partial evaluation system will specialize a program, the accuracy of the binding-time analysis directly determines the degree of specialization. In this paper, a binding-time analysis for the partial evaluation for XQuery is presented, and it has been implemented and integrated into an XQuery partial evaluation system. This binding-time analysis has two phase: the first phase only determinates and annotates expressions that depend only on the values of configuration parameters and the static information; the second phase re-annotates the binding-time analysis states for expressions according to both the information of binding-time given by the first phase and the information of reference-sensitivity, which can be used to improve the precise of the binding-time analysis in the partial evaluation for XQuery. After doing some experiments, the results show that our binding-time analysis is a practical and effectual technique for the partial evaluation for XQuery programs.