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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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.
L. Cardelli. Program fragments, linking and modularization. In Proc. Symp. on Principles of Prog. Lang., pages 266–277, 1997.
R. Chatterjee and B. G. Ryder. Data-flow-based testing of object-oriented libraries. Technical Report DCS-TR-382, Rutgers University, 1999.
R. Chatterjee, B. G. Ryder, and W. Landi. Relevant context inference. In Proc. Symp. on Principles of Prog. Lang., pages 133–146, 1999.
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.
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.
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.
M. J. Harrold and G. Rothermel. Separate computation of alias information for reuse. IEEE Transactions on Software Engineering, 22(7):442–460, July 1996.
O. Kupferman and M. Y. Vardi. Modular model checking. In Proc. Symp. on Compositionality, LNCS 1536, pages 381–401, 1997.
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.
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.
T. Marlowe and B. G. Ryder. Properties of data flow frameworks: A unified model. Acta Informatica, 28:121–163, 1990.
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.
D. Schmidt. Data flow analysis is model checking of abstract interpretations. In Proc. Symp. on Principles of Prog. Lang., pages 38–48, 1998.
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.
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.
B. Steensgaard. Points-to analysis in almost linear time. In Proc. Symp. on Principles of Prog. Lang., pages 32–41, 1996.
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.
R. Wilhelm and D. Maurer. Compiler Design. Addison-Wesley, 1995.
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.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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