Experiments in Context-Sensitive Analysis of Modular Programs
Several models for context-sensitive analysis of modular programs have been proposed, each with different characteristics and representing different trade-offs. The advantage of these context-sensitive analyses is that they provide information which is potentially more accurate than that provided by context-free analyses. Such information can then be applied to validating/debugging the program and/or to specializing the program in order to obtain important performance improvements. Some very preliminary experimental results have also been reported for some of these models, providing some initial evidence on their potential. However, further experimentation, needed in order to understand the many issues left open and to show that the proposed modes scale and are usable in the context of large, real-life modular programs, was left as future work. The aim of this paper is twofold. On one hand we provide an empirical comparison of the different models proposed in previous work, as well as experimental data on the different choices left open in those designs. On the other hand we explore the scalability of these models by using larger modular programs as benchmarks. The results have been obtained from a realistic implementation of the models, integrated in a production-quality compiler (CiaoPP/Ciao). Our experimental results shed light on the practical implications of the different design choices and of the models themselves. We also show that context-sensitive analysis of modular programs is indeed feasible in practice, and that in certain critical cases it provides better performance results than those achievable by analyzing the whole program at once. This is specially the case regarding memory consumption and when reanalyzing after making changes to a program, as is often the case during program development.
Unable to display preview. Download preview PDF.
- 2.Bueno, F., Cabeza, D., Carro, M., Hermenegildo, M., López-García, P., Puebla, G. (eds.): The Ciao System. Reference Manual (v1.10). The ciao system documentation series–TR, School of Computer Science, Technical University of Madrid (UPM) (June 2004), system and on-line version of the manual available at http://clip.dia.fi.upm.es/Software/Ciao/
- 7.García de la Banda, M., Hermenegildo, M.: A Practical Approach to the Global Analysis of Constraint Logic Programs. In: 1993 International Logic Programming Symposium, pp. 437–455. MIT Press, Cambridge (1993)Google Scholar
- 8.María, J., de la Banda, G., Demoen, B., Marriott, K., Stuckey, P.J.: To the Gates of HAL: A HAL Tutorial. In: International Symposium on Functional and Logic Programming, pp. 47–66 (2002)Google Scholar
- 10.Muthukumar, K., Hermenegildo, M.: Combined Determination of Sharing and Freeness of Program Variables Through Abstract Interpretation. In: 1991 International Conference on Logic Programming, pp. 49–63. MIT Press, Cambridge (1991)Google Scholar
- 11.Nethercote, N.: The Analysis System of HAL. Master’s thesis, Monash University (2002)Google Scholar
- 13.Puebla, G., Correas, J., Hermenegildo, M., Bueno, F., García de la Banda, M., Marriott, K., Stuckey, P.J.: A Generic Framework for Context-Sensitive Analysis of Modular Programs. In: Bruynooghe, M., Lau, K. (eds.) Program Development in Computational Logic. LNCS, vol. 3049, pp. 234–261. Springer, Heidelberg (2004)CrossRefGoogle Scholar
- 14.Puebla, G., Hermenegildo, M.: Some Issues in Analysis and Specialization of Modular Ciao-Prolog Programs. In: Special Issue on Optimization and Implementation of Declarative Programming Languages, Electronic Notes in Theoretical Computer Science, vol. 30, Elsevier, North Holland (2000)Google Scholar