Skip to main content

Data-Flow Analysis of Program Fragments

  • Conference paper
  • First Online:
Software Engineering — ESEC/FSE ’99 (ESEC 1999, SIGSOFT FSE 1999)

Abstract

Traditional interprocedural data-flow analysis is performed on whole programs; however, such whole-program analysis is not feasible for large or incomplete programs. We propose fragment data-flow analysis as an alternative approach which computes data-flow information for a specific program fragment. The analysis is parameterized by the additional information available about the rest of the program. We describe two frameworks for interprocedural flow-sensitive fragment analysis, the relationship between fragment analysis and whole-program analysis, and the requirements ensuring fragment analysis safety and feasibility. We propose an application of fragment analysis as a second analysis phase after an inexpensive flow-insensitive whole-program analysis, in order to obtain better information for important program fragments. We also describe the design of two fragment analyses derived from an already existing whole-program flow- and context-sensitive pointer alias analysis for C programs and present empirical evaluation of their cost and precision. Our experiments show evidence of dramatically better precision obtainable at a practical cost.

This research was supported, in part, by NSF grants CCR-9501761 and CCR-9804065, and Edison Design Group.

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

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. D. Atkinson and W. Griswold. Effective whole-program analysis in the presence of pointers. In Proc. Symp. on the Foundations of Software Engineering, pages 46–55, 1998.

    Google Scholar 

  2. L. Cardelli. Program fragments, linking and modularization. In Proc. Symp. on Principles of Prog. Lang., pages 266–277, 1997.

    Google Scholar 

  3. R. Chatterjee and B. G. Ryder. Data-flow-based testing of object-oriented libraries. Technical Report DCS-TR-382, Rutgers University, 1999.

    Google Scholar 

  4. R. Chatterjee, B. G. Ryder, and W. Landi. Relevant context inference. In Proc. Symp. on Principles of Prog. Lang., pages 133–146, 1999.

    Google Scholar 

  5. M. Codish, S. Debray, and R. Giacobazzi. Compositional analysis of modular logic programs. In Proc. Symp. on Principles of Prog. Lang., pages 451–464, 1993.

    Google Scholar 

  6. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixed points. In Proc. Symp. on Principles of Prog. Lang., pages 238–252, 1977.

    Google Scholar 

  7. M. Emami, R. Ghiya, and L. J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proc. Conf. on Prog. Lang. Design and Implementation, pages 242–257, 1994.

    Google Scholar 

  8. M. J. Harrold and G. Rothermel. Separate computation of alias information for reuse. IEEE Transactions on Software Engineering, 22(7):442–460, July 1996.

    Article  Google Scholar 

  9. O. Kupferman and M. Y. Vardi. Modular model checking. In Proc. Symp. on Compositionality, LNCS 1536, pages 381–401, 1997.

    Google Scholar 

  10. W. Landi and B. G. Ryder. A safe approximation algorithm for interprocedural pointer aliasing. In Proc. Conf. on Prog. Lang. Design and Implementation, pages 235–248, 1992.

    Google Scholar 

  11. T. Marlowe and B. G. Ryder. An efficient hybrid algorithm for incremental data flow analysis. In Proc. Symp. on Principles of Prog. Lang., pages 184–196, 1990.

    Google Scholar 

  12. T. Marlowe and B. G. Ryder. Properties of data flow frameworks: A unified model. Acta Informatica, 28:121–163, 1990.

    Article  MathSciNet  Google Scholar 

  13. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In Proc. Symp. on Principles of Prog. Lang., pages 49–61, 1995.

    Google Scholar 

  14. D. Schmidt. Data flow analysis is model checking of abstract interpretations. In Proc. Symp. on Principles of Prog. Lang., pages 38–48, 1998.

    Google Scholar 

  15. M. Shapiro and S. Horwitz. Fast and accurate flow-insensitive points-to analysis. In Proc. Symp. on Principles of Prog. Lang., pages 1–14, 1997.

    Google Scholar 

  16. M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In S. Muchnick and N. Jones, editors, Program Flow Analysis: Theory and Applications, pages 189–234. Prentice Hall, 1981.

    Google Scholar 

  17. B. Steensgaard. Points-to analysis in almost linear time. In Proc. Symp. on Principles of Prog. Lang., pages 32–41, 1996.

    Google Scholar 

  18. P. Stocks, B.G. Ryder, W. Landi, and S. Zhang. Comparing flow-and context-sensitivity on the modification side-effects problem. In Proc. International Symposium on Software Testing and Analysis, pages 21–31, 1998.

    Google Scholar 

  19. R. Wilhelm and D. Maurer. Compiler Design. Addison-Wesley, 1995.

    Google Scholar 

  20. R. Wilson and M. Lam. Efficient context-sensitive pointer analysis for C programs. In Proc. Conf. on Prog. Lang. Design and Implementation, pages 1–12, 1995.

    Google Scholar 

  21. S. Zhang, B. G. Ryder, and W. Landi. Program decomposition for pointer aliasing: A step towards practical analyses. In Proc. Symp. on the Foundations of Software Engineering, pages 81–92, 1996.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Rountev, A., Ryder, B.G., Landi, W. (1999). Data-Flow Analysis of Program Fragments. In: Nierstrasz, O., Lemoine, M. (eds) Software Engineering — ESEC/FSE ’99. ESEC SIGSOFT FSE 1999 1999. Lecture Notes in Computer Science, vol 1687. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48166-4_15

Download citation

  • DOI: https://doi.org/10.1007/3-540-48166-4_15

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-48166-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics