Advertisement

Experiments in Context-Sensitive Analysis of Modular Programs

  • Jesús Correas
  • Germán Puebla
  • Manuel V. Hermenegildo
  • Francisco Bueno
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3901)

Abstract

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Besson, F., Jensen, T.: Modular class analysis with datalog. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)CrossRefGoogle Scholar
  2. 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/
  3. 3.
    Bueno, F., Cabeza, D., Hermenegildo, M., Puebla, G.: Global Analysis of Standard Prolog Programs. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 108–124. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  4. 4.
    Bueno, F., García de la Banda, M., Hermenegildo, M., Marriott, K., Puebla, G., Stuckey, P.: A Model for Inter-module Analysis and Optimizing Compilation. In: Lau, K.-K. (ed.) LOPSTR 2000. LNCS, vol. 2042, pp. 86–102. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  5. 5.
    Cabeza, D., Hermenegildo, M.: A New Module System for Prolog. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 131–148. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  6. 6.
    Cousot, P., Cousot, R.: Modular Static Program Analysis. In: Horspool, R.N. (ed.) CC 2002 and ETAPS 2002. LNCS, vol. 2304, pp. 159–178. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  7. 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. 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
  9. 9.
    Hermenegildo, M.V., Puebla, G., Bueno, F., López-García, P.: Integrated Program Debugging, Verification, and Optimization Using Abstract Interpretation (and The Ciao System Preprocessor). Science of Computer Programming 58(1–2), 115–140 (2005)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 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. 11.
    Nethercote, N.: The Analysis System of HAL. Master’s thesis, Monash University (2002)Google Scholar
  12. 12.
    Puebla, G., Bueno, F., Hermenegildo, M.: An Assertion Language for Constraint Logic Programs. In: Deransart, P., Małuszyński, J. (eds.) DiSCiPl 1999. LNCS, vol. 1870, pp. 23–61. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  13. 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. 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

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Jesús Correas
    • 1
  • Germán Puebla
    • 2
  • Manuel V. Hermenegildo
    • 2
    • 3
  • Francisco Bueno
    • 2
  1. 1.School of Computer ScienceComplutense University of Madrid (UCM)Spain
  2. 2.School of Computer ScienceTechnical University of Madrid (UPM)Spain
  3. 3.Depts. of Computer Science and Electrical and Computer EngineeringUniversity of New Mexico (UNM)USA

Personalised recommendations