Skip to main content
Log in

Transformational Derivation of an Improved Alias Analysis Algorithm

  • Published:
Higher-Order and Symbolic Computation

Abstract

In this paper we use a program transformational approach to obtain an asymptotically improved may-alias analysis algorithm. We derive an O(N3) time algorithm for computing an intra-procedural 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(N5) time algorithm by Hind et al. [19]. 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 article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Aho, A., Hopcroft, J., and Ullman, J. Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.

    Google Scholar 

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

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

    Google Scholar 

  4. Bloom, B. Ready simulation, bisimulation, and the semantics of CCS-like languages. PhD thesis, Massachusets Institute of Technology, 1989.

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

    Article  Google Scholar 

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

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

  8. Cai, J. and Paige, R. Program derivation by fixed point computation. Science of Computer Programming, 11 (1988/89) 197–261.

    Article  Google Scholar 

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

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

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

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

  13. Cousot, P. 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, Sep. 1977. 15 p.

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

    Article  Google Scholar 

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

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

    Article  Google Scholar 

  17. Goyal, D. A language-theoretic approach to algorithms. PhD thesis, Computer Science Department, New York University, January 2000. available at http://cs.nyu.edu/deepak/ThinThesis.ps.

  18. Hind, M. 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.

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

    Article  Google Scholar 

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

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

    Article  Google Scholar 

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

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

    Article  Google Scholar 

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

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

    Article  Google Scholar 

  26. Paige, R. Formal differentiation: A program synthesis technique. UMI Research Press, 1981. Revision of Ph.D. thesis, NYU, Jun 1979.

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

    Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Article  Google Scholar 

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

    Google Scholar 

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

    Google Scholar 

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

  34. Suppes, P. Axiomatic Set Theory. Dover, 1972.

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

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Deepak Goyal.

Additional information

The work in this paper was done when the author was a graduate student at New York University. This paper was originally submitted when the author was a Research Staff Member at the IBM T.J. Watson Research Center.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Goyal, D. Transformational Derivation of an Improved Alias Analysis Algorithm. Higher-Order Symb Comput 18, 15–49 (2005). https://doi.org/10.1007/s10990-005-7005-6

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-005-7005-6

Keywords

Navigation