skip to main content
article
Free Access

An improved bound for call strings based interprocedural analysis of bit vector frameworks

Published:01 October 2007Publication History
Skip Abstract Section

Abstract

Interprocedural data flow analysis extends the scope of analysis across procedure boundaries in search of increased optimization opportunities. Call strings based approach is a general approach for performing flow and context sensitive interprocedural analysis. It maintains a history of calls along with the data flow information in the form of call strings, which are sequences of unfinished calls. Recursive programs may need infinite call strings for interprocedural data flow analysis. For bit vector frameworks this method is believed to require all call strings of lengths up to 3K, where K is the maximum number of distinct call sites in any call chain.

We combine the nature of information flows in bit-vector data flow analysis with the structure of interprocedurally valid paths to bound the call strings. Instead of bounding the length of call strings, we bound the number of occurrences of any call site in a call string. We show that the call strings in which a call site appears at most three times, are sufficient for convergence on interprocedural maximum fixed point solution. Though this results in the same worst case length of call strings, it does not require constructing all call strings up to length 3K. Our empirical measurements on recursive programs show that our bound reduces the lengths and the number of call strings, and hence the analysis time, significantly.

References

  1. Aho, A. V., Sethi, R., and Ullman, J. D. 1986. Compilers: Principles, Techniques, and Tools. Addison-Wesley Longman Publishing Co., Inc., Boston, MA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Alt, M. and Martin, F. 1995. Generation of Efficient Interprocedural Analyzers with PAG. In Proceedings of Static Analysis Symposium (SAS'95), Lecture Notes in Computer Science, vol. 983, Springer, 33--50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Alt, M., Martin, F., and Wilhelm, R. 1995. Generating Dataflow Analyzers with PAG. Tech. rep. A 10/95, Universität des Saarlandes.Google ScholarGoogle Scholar
  4. Callahan, D., Cooper, K. D., Kennedy, K., and Torczon, L. 1986. Interprocedural constant propagation. In Proceedings of the 1986 SIGPLAN Symposium on Compiler Contruction (SIGPLA). 152--161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Emami, M., Ghiya, R., and Hendren, L. J. 1994. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation (PLDI). 242--256. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Graham, S. L. and Wegman, M. 1975. A fast and usually linear algorithm for global flow analysis. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 22--34. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Hecht, M. S. 1977. Flow Analysis of Computer Programs. Elsevier Science Inc. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Kam, J. B. and Ullman, J. D. 1977. Monotone data flow analysis frameworks. Acta Informatica. 7, 3, 305--318.Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Kanade, A., Khedker, U. P., and Sanyal, A. 2005. Heterogeneous fixed points with application to points-to analysis. In APLAS. 298--314. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Khedker, U. P. 2002. Data flow analysis. In The Compiler Design Handbook. CRC Press, 1--59.Google ScholarGoogle Scholar
  11. Khedker, U. P. and Dhamdhere, D. M. 1994. A generalized theory of bit vector data flow analysis. ACM Trans. Program. Lang. Syst. 16, 5, 1472--1511. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Kildall, G. A. 1973. A unified approach to global program optimization. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 194--206. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Muchnick, S. S. 1997. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Myers, E. M. 1981. A precise inter-procedural data flow algorithm. In Proceedings of the 8th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). ACM Press, 219--230. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Pande, H., Landi, W., and Ryder, B. 1992. Interprocedural reaching definitions in the presence of single level pointers. Tech. rep. lost-tr-193, Laboratory for Computer Science Research Rutgers University.Google ScholarGoogle Scholar
  16. Reps, T., Horwitz, S., and Sagiv, M. 1995. Precise interprocedural dataflow analysis via graph reachability. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL). 49--61. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Sharir, M. and Pnueli, A. 1981. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications, S. S. Muchnick and N. D. Jones, Eds. Prentice-Hall Inc.Google ScholarGoogle Scholar
  18. Whaley, J. and Lam, M. S. 2004. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (PLDI). ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An improved bound for call strings based interprocedural analysis of bit vector frameworks

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!