Demand-driven alias analysis for C

被引:28
|
作者
Zheng, Xin [1 ]
Rugina, Radu [1 ]
机构
[1] Cornell Univ, Dept Comp Sci, Ithaca, NY 14853 USA
关键词
algorithms; languages; pointer analysis; alias analysis; memory disambiguation; demand-driven analysis; CFL reachability;
D O I
10.1145/1328897.1328464
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper presents a demand-driven, flow-insensitive analysis algorithm for answering may-alias queries. We formulate the computation of alias queries as a CFL-reachability problem, and use this formulation to derive a demand-driven analysis algorithm. The analysis uses a worklist algorithm that gradually explores the program structure and stops as soon as enough evidence is gathered to answer the query. Unlike existing techniques, our approach does not require building or intersecting points-to sets. Experiments show that our technique is effective at answering alias queries accurately and efficiently in a demand-driven fashion. For a set of alias queries from the SPEC2000 benchmarks, an implementation of our analysis is able to accurately answer 96% of the queries in 0.5 milliseconds per query on average, using only 65 KB of memory. Compared to a demand-driven points-to analysis that constructs and intersects points-to sets on the fly, our alias analysis can achieve better accuracy while running more than 30 times faster. The low run-time cost and low memory demands of the analysis make it a very good candidate not only for compilers, but also for interactive tools, such as program understanding tools or integrated development environments (IDEs).
引用
收藏
页码:197 / 208
页数:12
相关论文
共 50 条
  • [1] Demand-Driven Alias Analysis for C
    Zheng, Xin
    Rugina, Radu
    POPL'08: PROCEEDINGS OF THE 35TH ANNUAL ACM SIGPLAN-SIGACT SYMPOSIUM ON PRINCIPLES OF PROGRAMMING LANGUAGES, 2008, : 197 - 208
  • [2] An Improved Demand-Driven Pointer Alias Analysis Algorithm
    Liu, Peng
    Zhao, Rong-cai
    Gao, Wei
    Meng, Xiang-jie
    INTERNATIONAL CONFERENCE ON COMPUTER, NETWORK SECURITY AND COMMUNICATION ENGINEERING (CNSCE 2014), 2014, : 82 - 88
  • [3] Layered Region Based Flow-Sensitive Demand-Driven Alias Analysis
    Pang Long
    Su Xiaohong
    Ma Peijun
    Zhao Lingling
    APPLIED DECISIONS IN AREA OF MECHANICAL ENGINEERING AND INDUSTRIAL MANUFACTURING, 2014, 577 : 917 - 920
  • [4] Demand-driven pointer analysis
    Heintze, N
    Tardieu, O
    ACM SIGPLAN NOTICES, 2001, 36 (05) : 24 - 34
  • [5] A demand-driven adaptive type analysis
    Dubé, D
    Feeley, M
    ACM SIGPLAN NOTICES, 2002, 37 (09) : 84 - 97
  • [6] Demand-driven less-than analysis
    da Silva, Junio Cezar R.
    Pereira, Fernando Magno Q.
    PROCEEDINGS OF THE 21ST BRAZILIAN SYMPOSIUM ON PROGRAMMING LANGUAGES (SBLP 2017), 2017,
  • [7] Static Analysis with Demand-Driven Value Refinement
    Stein, Benno
    Nielsen, Benjamin Barslev
    Chang, Bor-Yuh Evan
    Moller, Anders
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (OOPSLA):
  • [8] Demand-Driven Refinement of Points-to Analysis
    Sun, Chenguang
    Midkiff, Samuel
    2019 IEEE/ACM 41ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING: COMPANION PROCEEDINGS (ICSE-COMPANION 2019), 2019, : 264 - 265
  • [9] Value-Flow-Based Demand-Driven Pointer Analysis for C and C plus
    Sui, Yulei
    Xue, Jingling
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2020, 46 (08) : 812 - 835
  • [10] Research on flow sensitive demand driven alias analysis
    School of Computer Science and Technology, Harbin Institute of Technology, Harbin
    150001, China
    Jisuanji Yanjiu yu Fazhan, 7 (1620-1630):