Skip to main content

Transformational Derivation of an Improved Alias Analysis Algorithm

  • Chapter
Book cover Automatic Program Development
  • 328 Accesses

Summary

In this paper we use a program transformational approach to obtain an asymptotically improved may-alias analysis algorithm. We derive an O(N 3) time algorithm for computing an intraprocedural flow sensitive may-alias analysis, where N denotes the number of edges in the program control flow graph (CFG). Our algorithm improves the previous O(N 5) time algorithm by Hind et al. [20]. Our time complexity improvement comes without any deterioration in space complexity. We also show that for a large subclass of programs in which the in-degree and out-degree of all CFG nodes is bounded by a constant, our algorithm is linear in the sum of the number of edges in the CFG of the program and the size of the output, i.e., the size of the computed alias information, and is therefore asymptotically optimal. Our transformational algorithm derivation technique also leads to a simplified yet precise analysis of time complexity.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover 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. A. Aho, J. Hopcroft, and J. Ullman: Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.

    MATH  Google Scholar 

  2. A. V. Aho, R. Sethi, and J. D. Ullman: Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1988.

    Google Scholar 

  3. G. Birkhoff: Lattice Theory. American Mathematical Society, Providence, 1966.

    Google Scholar 

  4. B. Bloom: Ready Simulation, Bisimulation, and the Semantics of CCS-like Languages. Ph.D. thesis, Massachusets Institute of Technology, 1989.

    Google Scholar 

  5. M. Burke: An interval-based approach to exhaustive and incremental interprocedural data-flow analysis. ACM Transactions on Programming Languages and Systems, 12(3):341–395, July 1990.

    Article  Google Scholar 

  6. J. Cai: Fixed point computation and transformational programming. Technical Report DCS-TR-217, The State University of New Jersey, Rutgers. Ph.D. Thesis, 1987.

    Google Scholar 

  7. J. Cai and R. Paige: Binding performance at language design time. In Proc. Fourteenth ACM Symp. on Principles of Programming Languages, 85–97, Jan. 1987.

    Google Scholar 

  8. J. Cai and R. Paige: Program derivation by fixed point computation. Science of Computer Programming, 11:3, 197–261, 1989.

    Article  MathSciNet  Google Scholar 

  9. D. R. Chase, M. Wegman, and F. K. Zadeck: Analysis of pointers and structures. In SIGPLAN’90 Conference on Programming Language Design and Implementation, 296–310, 1990.

    Google Scholar 

  10. J. D. Choi, M. Burke, and P. Carini: Automatic construction of sparse data flow evaluation graphs. In 18th annual ACM symposium on Principles of Programming Languages, 55–66, 1991.

    Google Scholar 

  11. J. D. Choi, M. Burke, and P. Carini: Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side-effects. In 20th SIGACT-SIGPLAN ACM Symposium on the Principles of Programming Languages, 232–245, 1993.

    Google Scholar 

  12. J. D. Choi, M. Gupta, M. Serrano, V. C. Sreedhar, and S. Midkiff: Escape analysis for Java. In Conference on Object-Oriented Programming Systems, Languages, and Applications, Nov. 1999.

    Google Scholar 

  13. P. Cousot: Asynchronous iterative methods for solving a fixed point system of monotone equations in a complete lattice. Res. rep. R.R. 88, Laboratoire IMAG, Université scientifique et médicale de Grenoble, Grenoble, France, 15 pages, Sept. 1977.

    Google Scholar 

  14. R. Dewar, A. Grand, S. Liu, and J. Schwartz: Programming by refinement, as exemplified by the SETL representation sublanguage. TOPLAS, 1(1):27–49, July 1979.

    Article  MATH  Google Scholar 

  15. J. R. Driscoll, N. Sarnak, D. D. Sleator, and R. E. Tarjan: Making data structures persistent. Journal of Computer and System Sciences, 38(1), Feb. 1989.

    Google Scholar 

  16. J. Earley: High level iterators and a method for automatically designing data structure representation. J. of Computer Languages, 1(4):321–342, 1976.

    Article  Google Scholar 

  17. D. Goyal: A Language-Theoretic Approach to Algorithms. Ph.D. thesis, Computer Science Dept., New York University, January 2000. http://cs.nyu.edu/deepak/ ThinThesis.ps.

  18. D. Goyal: Transformational derivation of an improved alias analysis algorithm. Higher Order And Symbolic Computation, 18(1–2):15–49, 2005.

    Article  MATH  Google Scholar 

  19. M. Hind: Pointer analysis: Haven’t we solved this problem yet? In 2001 ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE’01), Snowbird, Utah, June 2001.

    Google Scholar 

  20. M. Hind, M. Burke, P. Carini, and J. D. Choi: Interprocedural pointer alias analysis. ACM TOPLAS, 21(4):848–894, July 1999.

    Article  Google Scholar 

  21. S. Horwitz, P. Pfeiffer, and T. Reps: Dependence analysis for pointer variables. In Programming Language Design and Implementation, 28–40, 1989.

    Google Scholar 

  22. J. B. Kam and J. D. Ullman: Monotone data flow analysis frameworks. Acta Informatica, 7:305–317, 1977.

    Article  MATH  MathSciNet  Google Scholar 

  23. G. A. Kildall: A unified approach to global program optimization. In ACM Symp. on Principles of Prog. Lang., 194–206, 1973.

    Google Scholar 

  24. W. Landi: Undecidability of static analysis. ACM Letters on Programming Languages and Systems, 1(4):323–337, Dec. 1992.

    Article  Google Scholar 

  25. J. R. Larus and P. N. Hilfinger: Detecting conflicts between structure accesses. In Programming Language Design and Implementation, 21–34, 1988.

    Google Scholar 

  26. J.-L. Lassez, V. L. Nguyen, and L. Sonenberg: Fixed point theorems and semantics: A folk tale. Information Processing Letters, 14(3):112–116, 1982.

    Article  MATH  MathSciNet  Google Scholar 

  27. R. Paige: Formal Differentiation: A Program Synthesis Technique. UMI Research Press, 1981. Revision of Ph.D. thesis, NYU, June 1979.

    Google Scholar 

  28. R. Paige and S. Koenig: Finite differencing of computable expressions. ACM Trans. on Programming Languages and Systems, 4(3):401–454, 1982.

    Article  Google Scholar 

  29. R. Paige, R. Tarjan, and R. Bonic: A linear time solution to the single function coarsest partition problem. Theoretical Computer Science, 40(1):67–84, Sept. 1985.

    Article  MATH  MathSciNet  Google Scholar 

  30. G. Ramalingam: The undecidability of aliasing. ACM Transactions on Programming Languages and Systems, 16(6):1467–1471, Nov. 1994.

    Article  Google Scholar 

  31. E. Schonberg, J. Schwartz, and M. Sharir: An automatic technique for selection of data representations in SETL programs. ACM TOPLAS, 3(2):126–143, Apr. 1981.

    Article  MATH  Google Scholar 

  32. J. Schwartz: On Programming: An Interim Report on the SETL Project, Installments I and II. New York University, New York, 1974.

    Google Scholar 

  33. J. Schwartz, R. Dewar, E. Dubinsky, and E. Schonberg: Programming with Sets: An Introduction to SETL. Springer-Verlag, New York, 1986.

    MATH  Google Scholar 

  34. B. Steensgaard. Points-to analysis in almost linear time: In 23rd SIGACT-SIGPLAN ACM Symposium on the Principles of Programming Languages, 32–41, 1996.

    Google Scholar 

  35. P. Suppes: Axiomatic Set Theory. Dover, 1972.

    Google Scholar 

  36. A. Tarski: A lattice-theoretical fixpoint theorem and its application. Pacific J. of Mathematics, 5:285–309, 1955.

    MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer

About this chapter

Cite this chapter

Goyal, D. (2008). Transformational Derivation of an Improved Alias Analysis Algorithm. In: Danvy, O., Mairson, H., Henglein, F., Pettorossi, A. (eds) Automatic Program Development. Springer, Dordrecht. https://doi.org/10.1007/978-1-4020-6585-9_8

Download citation

  • DOI: https://doi.org/10.1007/978-1-4020-6585-9_8

  • Publisher Name: Springer, Dordrecht

  • Print ISBN: 978-1-4020-6584-2

  • Online ISBN: 978-1-4020-6585-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics