Advertisement

Journal of Computer Science and Technology

, Volume 16, Issue 3, pp 242–250 | Cite as

A new approach to pointer analysis for assignments

  • Huang Bo 
  • Zang Binyu 
  • Li Jing 
  • Zhu Chuanqi 
Correspondence
  • 24 Downloads

Abstract

Pointer analysis is a technique to identify at compile-time the potential values of the pointer expressions in a program, which promises significant benefits for optimizing and parallelizing compilers. In this paper, a new approach to pointer analysis for assignments is presented. In this approach, assignments are classified into three categories: pointer assignments, structure (union) assignments and normal assignments which don’t affect the point-to information. Pointer analyses for these three kinds of assignments respectively make up the integrated algorithm. When analyzing a pointer assignment, a new method called expression expansion is used to calculate both the left targets and the right targets. The integration of recursive data structure analysis into pointer analysis is a significant originality of this paper, which uniforms the pointer analysis for heap variables and the pointer analysis for stack variables. This algorithm is implemented in Agassiz, an analyzing tool for C programs developed by Institute of Parallel Processing, Fudan University Its accuracy and effectiveness are illustrated by experimental data.

Keywords

pointer analysis pointer assignment point-to information recursive data structure 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    Wilson R P, Lam M S. Efficient context-sensitive pointer analysis for C programs. InProceedings of the ACM SIGPLAN’95 Conference on Programming Language Design and Implementation, La Jolla, CA, June 18–21, 1995, pp.1–12.Google Scholar
  2. [2]
    Emami M, Ghiya R, Hendren L. Context-sensitive interprocedural point-to analysis in the presence of function pointers. InProceedings of the ACM SIGPLAN’94 Conference on Programming Language Design and Implementation, Orlando, Flor., June, 1994, pp.242–256.Google Scholar
  3. [3]
    Ghiya R, Hendren L J. Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C. InProceedings of the 23rd Annual ACM Symposium on Principles of Programming Languages, St. Petersburg Beach, Florida, 1996, pp.1–15.Google Scholar
  4. [4]
    Ghiya R, Hendren L J. Connection analysis: A practical interprocedural heap analysis for C.International Journal of Parallel Programming, 1996, 24(6): 547–578.Google Scholar
  5. [5]
    Ghiya R, Hendren L J. Putting pointer analysis to work. InProceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, California, Jan. 19–21, 1998, pp.121–133.Google Scholar
  6. [6]
    Alain Deutsch. Interprocedural may-alias analysis for pointers: Beyond-k-limiting. InProceedings of the ACM SIGPLAN’94 Conference on Programming Language Design and Implementation, Orlando, Flor., June, 1994, pp.230–241.Google Scholar
  7. [7]
    John Lu. Interprocedural pointer analysis for C [dissertation]. Rice University, Apr., 1998.Google Scholar
  8. [8]
    Huang Bo, Zang Binyuet al. Context-sensitive interprocedural pointer analysis.Chinese Journal of Computers, 2000, 23(5): 477–485.Google Scholar

Copyright information

© Science Press, Beijing China and Allerton Press Inc. 2001

Authors and Affiliations

  • Huang Bo 
    • 1
  • Zang Binyu 
    • 1
  • Li Jing 
    • 1
  • Zhu Chuanqi 
    • 1
  1. 1.Institute of Parallel ProcessingFudan UniversityShanghaiP.R. China

Personalised recommendations