Assessing the Effects of Flow-Sensitivity on Pointer Alias Analyses

  • Michael Hind
  • Anthony Pioli
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1503)

Abstract

This paper describes an empirical comparison of four contextinsensitive pointer alias analysis algorithms that use varying degrees of flow-sensitivity: a flow-insensitive algorithm that tracks variables whose addresses were taken and stored; a flow-insensitive algorithm that computes a solution for each function; a variant of this algorithm that uses precomputed kill information; and a flow-sensitive algorithm. In addition to contrasting the precision and efficiency of these analyses, we describe implementation techniques and quantify their analysis-time speed-up.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994. Available at ftp.diku.dk/pub/diku/semantics/papers/D-203.dvi.Z.
  2. [2]
    Todd Austin. Pointer-intensive benchmark suite, version 1.1. http://www.cs.wisc.edu/~austin/ptr-dist.html, 1995.
  3. [3]
    Subra Balan and Walter Bays. Spec announces new benchmark suites cint92 and cfp92. Technical report, Systems Performance Evaluation Cooperative, March 1992. SPEC Newsletter 4(1).Google Scholar
  4. [4]
    Michael Burke, Paul Carini, Jong-Deok Choi, and Michael Hind. Flow-insensitive interprocedural alias analysis in the presence of pointers. In K. Pingali, U. Banerjee, D. Gelernter, A. Nicolau, and D. Padua, editors, Lecture Notes in Computer Science, 892, pages 234–250. Springer-Verlag, 1995. Proceedings from the 7th Workshop on Languages and Compilers for Parallel Computing. Extended version published as Research Report RC 19546, IBM T. J. Watson Research Center, September 1994.Google Scholar
  5. [5]
    Michael Burke, Paul Carini, Jong-Deok Choi, and Michael Hind. Interprocedural pointer alias analysis. Research Report RC 21055, IBM T. J. Watson Research Center, December 1997.Google Scholar
  6. [6]
    Paul Carini, Michael Hind, and Harini Srinivasan. Flow-sensitive interprocedural type analysis for C++. Research Report RC 20267, IBM T. J. Watson Research Center, November 1995.Google Scholar
  7. [7]
    David R. Chase, Mark Wegman, and F. Kenneth Zadeck. Analysis of pointers and structures. In SIGPLAN’ 90 Conference on Programming Language Design and Implementation, pages 296–310, June 1990. SIGPLAN Notices 25(6).Google Scholar
  8. [8]
    Jong-Deok Choi, Michael Burke, and Paul Carini. Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side effects. In 20th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 232–245, January 1993.Google Scholar
  9. [9]
    Jong-Deok Choi, Ron Cytron, and Jeanne Ferrante. Automatic construction of sparse data flow evaluation graphs. In 18th Annual ACM Symposium on the Principles of Programming Languages, pages 55–66, January 1991.Google Scholar
  10. [10]
    Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, pages 451–490, October 1991.Google Scholar
  11. [11]
    Alain Deutsch. Interprocedural may-alias analysis for pointers: Beyond k-limiting. In SIGPLAN’ 94 Conference on Programming Language Design and Implementation, pages 230–241, June 1994. SIGPLAN Notices, 29(6).Google Scholar
  12. [12]
    Amer Diwan. Personal communication, August 1997.Google Scholar
  13. [13]
    Amer Diwan, Kathryn S. McKinley, and J. Elliot, B. Moss. Type-based alias analysis. In SIGPLAN’ 98 Conference on Programming Language Design and Implementation, pages 106–117, June 1998. SIGPLAN Notices, 33(5).Google Scholar
  14. [14]
    Maryam Emami, Rakesh Ghiya, and Laurie J. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In SIGPLAN’ 94 Conference on Programming Language Design and Implementation, pages 242–256, June 1994. SIGPLAN Notices, 29(6).Google Scholar
  15. [15]
    Rakesh Ghiya and Laurie J. Hendren. Connection analysis: A practical interprocedural heap analysis for C. In Lecture Notes in Computer Science, 1033, pages 515–533, August 1995. Proceedings from the 8th Workshop on Languages and Compilers for Parallel Computing.Google Scholar
  16. [16]
    Rakesh Ghiya and Laurie J. Hendren. Is it a tree, a dag or a cyclic graph? A shape analysis for heap-directed pointers in C. In 23rd Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 1–15, January 1996.Google Scholar
  17. [17]
    Rakesh Ghiya and Laurie J. Hendren. Putting pointer analysis to work. In 25th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 121–133, January 1998.Google Scholar
  18. [18]
    Rebecca Hasti and Susan Horwitz. Using static single assignment form to improve flow-insensitive pointer analysis. In SIGPLAN’ 98 Conference on Programming Language Design and Implementation, pages 97–105, June 1998. SIGPLAN Notices, 33(5).Google Scholar
  19. [19]
    Laurie J. Hendren and Alexandru Nicolau. Parallelizing programs with recursive data structures. IEEE Transactions on Parallel and Distributed Systems, 1(1):35–47, January 1990.Google Scholar
  20. [20]
    Michael Hind and Anthony Pioli. An empirical comparison of interprocedural pointer alias analyses. Research Report RC 21058, IBM T. J. Watson Research Center, December 1997.Google Scholar
  21. [21]
    Michael Hind and Anthony Pioli. Assessing the effects of the flow-sensitivity on pointer alias analyses (extended version). Technical Report 98-104, SUNY at New Paltz, June 1998.Google Scholar
  22. [22]
    S. Horwitz, P. Pfeiffer, and T. Reps. Dependence analysis for pointer variables. In SIGPLAN’ 89 Conference on Programming Language Design and Implementation, pages 28–40, June 1989. SIGPLAN Notices 24(6).Google Scholar
  23. [23]
    Susan Horwitz. Precise flow-insensitive may-alias analysis is NP-Hard. ACM Transactions on Programming Languages and Systems, 19(1):1–6, January 1997.Google Scholar
  24. [24]
    John B. Kam and Jeffrey D. Ullman. Global data flow analysis and iterative algorithms. Journal of the ACM, 23(1):158–171, January 1976.Google Scholar
  25. [25]
    William Landi. Undecidability of static analysis. ACM Letters on Programming Languages and Systems, 1(4):323–337, December 1992.Google Scholar
  26. [26]
    William Landi. Personal communication, October 1997.Google Scholar
  27. [27]
    William Landi and Barbara Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In SIGPLAN’ 92 Conference on Programming Language Design and Implementation, pages 235–248, June 1992. SIGPLAN Notices 27(6).Google Scholar
  28. [28]
    William Landi, Barbara Ryder, and Sean Zhang. Interprocedural modification side effect analysis with pointer aliasing. In SIGPLAN’ 93 Conference on Programming Language Design and Implementation, pages 56–67, June 1993. SIGPLAN Notices 28(6).Google Scholar
  29. [29]
    James R. Larus and Paul N. Hilfinger. Detecting conflicts between structure accesses. In SIGPLAN’ 88 Conference on Programming Language Design and Implementation, pages 21–34, 1988. SIGPLAN Notices, 23(7).Google Scholar
  30. [30]
    Thomas Marlowe, William Landi, Barbara Ryder, Jong-Deok Choi, Michael Burke, and Paul Carini. Pointer-induced aliasing: A clarification. SIGPLAN Notices, 28(9):67–70, September 1993.Google Scholar
  31. [31]
    Thomas J. Marlowe, Barbara G. Ryder, and Michael G. Burke. Defining flow sensitivity in data flow problems. Technical Report RC 20138, IBM T. J. Watson Research Center, July 1995.Google Scholar
  32. [32]
    Lee R. Nackman. Codestore and incremental C++. Dr. Dobbs Journal, pages 92–95, December 1997.Google Scholar
  33. [33]
    Anthony Pioli. Conditional pointer aliasing and constant propagation. Master’s thesis, SUNY at New Paltz, 1998. In preparation.Google Scholar
  34. [34]
    G. Ramalingam. The undecidability of aliasing. ACM Transactions on Programming Languages and Systems, 16(6):1467–1471, November 1994.Google Scholar
  35. [35]
    G. Ramalingam. On sparse evaluation representations. In Pascal Van Hentenryck, editor, Lecture Notes in Computer Science, 1302, pages 1–15. Springer-Verlag, 1997. Proceedings from the 4th International Static Analysis Symposium.Google Scholar
  36. [36]
    Erik Ruf. Context-insensitive alias analysis reconsidered. In SIGPLAN’ 95 Conference on Programming Language Design and Implementation, pages 13–22, June 1995. SIGPLAN Notices, 30(6).Google Scholar
  37. [37]
    Erik Ruf. Partitioning dataflow analyses using types. In 24th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 15–26, January 1997.Google Scholar
  38. [38]
    Erik Ruf. Personal communication, October 1997.Google Scholar
  39. [39]
    Mooly Sagiv, Thomas Reps, and Reinhard Wilhelm. Solving shape-analysis problems in languages with destructive updating. In 23rd Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 16–31, January 1996.Google Scholar
  40. [40]
    Mooly Sagiv, Thomas Reps, and Reinhard Wilhelm. Solving shape-analysis problems in languages with destructive updating. ACM Transactions on Programming Languages and Systems, 20(1):1–50, January 1998.Google Scholar
  41. [41]
    Marc Shapiro and Susan Horwitz. The effects of the precision of pointer analysis. In Pascal Van Hentenryck, editor, Lecture Notes in Computer Science, 1302, pages 16–34. Springer-Verlag, 1997. Proceedings from the 4th International Static Analysis Symposium.Google Scholar
  42. [42]
    Marc Shapiro and Susan Horwitz. Fast and accurate flow-insensitive point-to analysis. In 24th Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 1–14, January 1997.Google Scholar
  43. [43]
    D. Soroker, M. Karasick, J. Barton, and D. Streeter. Extension mechanisms in Montana. In 8th IEEE Israeli Conference on Software and Systems, pages 119–128, June 1997.Google Scholar
  44. [44]
    SPEC. SPEC CPU95, Version 1.0. Standard Performance Evaluation Corporation, http://www.specbench/org, August 1995.
  45. [45]
    Bjarne Steensgaard. Points-to analysis in almost linear time. In 23rd Annual ACM SIGACT-SIGPLAN Symposium on the Principles of Programming Languages, pages 32–41, January 1996.Google Scholar
  46. [46]
    Philip A. Stocks, Barbara G. Ryder, William A. Landi, and Sean Zhang. Comparing flow and context sensitivity on the modifications-side-effects problem. In International Symposium on Software Testing and Analysis, pages 21–31, March 1998.Google Scholar
  47. [47]
    Robert P. Wilson. Effcient Context-Sensitive Pointer Analysis for C Programs. PhD thesis, Stanford University, December 1997.Google Scholar
  48. [48]
    Robert P. Wilson and Monica S. Lam. Efficient context-sensitive pointer analysis for C programs. In SIGPLAN’ 95 Conference on Programming Language Design and Implementation, pages 1–12, June 1995. SIGPLAN Notices, 30(6).Google Scholar
  49. [49]
    Sean Zhang, Barbara G. Ryder, and William Landi. Program decomposition for pointer aliasing: A step toward practical analyses. In 4th Symposium on the Foundations of Software Engineering, pages 81–92, October 1996.Google Scholar
  50. [50]
    Sean Zhang, Barbara G. Ryder, and William Landi. Experiments with combined analysis for pointer aliasing. In ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 11–18, June 1998.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Michael Hind
    • 1
  • Anthony Pioli
    • 1
  1. 1.State University of New York at New PaltzUSA

Personalised recommendations