Skip to main content

Experiments in Context-Sensitive Analysis of Modular Programs

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Besson, F., Jensen, T.: Modular class analysis with datalog. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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 

  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)

    Article  MathSciNet  MATH  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 

  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)

    Chapter  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)

    Chapter  Google 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 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2006 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Correas, J., Puebla, G., Hermenegildo, M.V., Bueno, F. (2006). Experiments in Context-Sensitive Analysis of Modular Programs. In: Hill, P.M. (eds) Logic Based Program Synthesis and Transformation. LOPSTR 2005. Lecture Notes in Computer Science, vol 3901. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11680093_11

Download citation

  • DOI: https://doi.org/10.1007/11680093_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-32654-0

  • Online ISBN: 978-3-540-32656-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics