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.
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
A. Aho, J. Hopcroft, and J. Ullman: Design and Analysis of Computer Algorithms. Addison-Wesley, Reading, MA, 1974.
A. V. Aho, R. Sethi, and J. D. Ullman: Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1988.
G. Birkhoff: Lattice Theory. American Mathematical Society, Providence, 1966.
B. Bloom: Ready Simulation, Bisimulation, and the Semantics of CCS-like Languages. Ph.D. thesis, Massachusets Institute of Technology, 1989.
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.
J. Cai: Fixed point computation and transformational programming. Technical Report DCS-TR-217, The State University of New Jersey, Rutgers. Ph.D. Thesis, 1987.
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.
J. Cai and R. Paige: Program derivation by fixed point computation. Science of Computer Programming, 11:3, 197–261, 1989.
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.
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.
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.
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.
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.
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.
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.
J. Earley: High level iterators and a method for automatically designing data structure representation. J. of Computer Languages, 1(4):321–342, 1976.
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.
D. Goyal: Transformational derivation of an improved alias analysis algorithm. Higher Order And Symbolic Computation, 18(1–2):15–49, 2005.
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.
M. Hind, M. Burke, P. Carini, and J. D. Choi: Interprocedural pointer alias analysis. ACM TOPLAS, 21(4):848–894, July 1999.
S. Horwitz, P. Pfeiffer, and T. Reps: Dependence analysis for pointer variables. In Programming Language Design and Implementation, 28–40, 1989.
J. B. Kam and J. D. Ullman: Monotone data flow analysis frameworks. Acta Informatica, 7:305–317, 1977.
G. A. Kildall: A unified approach to global program optimization. In ACM Symp. on Principles of Prog. Lang., 194–206, 1973.
W. Landi: Undecidability of static analysis. ACM Letters on Programming Languages and Systems, 1(4):323–337, Dec. 1992.
J. R. Larus and P. N. Hilfinger: Detecting conflicts between structure accesses. In Programming Language Design and Implementation, 21–34, 1988.
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.
R. Paige: Formal Differentiation: A Program Synthesis Technique. UMI Research Press, 1981. Revision of Ph.D. thesis, NYU, June 1979.
R. Paige and S. Koenig: Finite differencing of computable expressions. ACM Trans. on Programming Languages and Systems, 4(3):401–454, 1982.
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.
G. Ramalingam: The undecidability of aliasing. ACM Transactions on Programming Languages and Systems, 16(6):1467–1471, Nov. 1994.
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.
J. Schwartz: On Programming: An Interim Report on the SETL Project, Installments I and II. New York University, New York, 1974.
J. Schwartz, R. Dewar, E. Dubinsky, and E. Schonberg: Programming with Sets: An Introduction to SETL. Springer-Verlag, New York, 1986.
B. Steensgaard. Points-to analysis in almost linear time: In 23rd SIGACT-SIGPLAN ACM Symposium on the Principles of Programming Languages, 32–41, 1996.
P. Suppes: Axiomatic Set Theory. Dover, 1972.
A. Tarski: A lattice-theoretical fixpoint theorem and its application. Pacific J. of Mathematics, 5:285–309, 1955.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)