Efficient Interprocedural Data-Flow Analysis Using Treedepth and Treewidth

被引:6
作者
Goharshady, Amir Kafshdar [1 ]
Zaher, Ahmed Khaled [1 ]
机构
[1] Hong Kong Univ Sci & Technol, Clear Water Bay, Hong Kong, Peoples R China
来源
VERIFICATION, MODEL CHECKING, AND ABSTRACT INTERPRETATION, VMCAI 2023 | 2023年 / 13881卷
关键词
Static analysis; Data-flow analysis; IFDS; Parameterized algorithms; POINTS-TO ANALYSIS; TREE-WIDTH; GRAPH MINORS; ALGORITHMS; VERIFICATION;
D O I
10.1007/978-3-031-24950-1_9
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We consider interprocedural data-flow analysis as formalized by the standard IFDS framework, which can express many widelyused static analyses such as reaching definitions, live variables, and nullpointer. We focus on the well-studied on-demand setting in which queries arrive one-by-one in a stream and each query should be answered as fast as possible. While the classical IFDS algorithm provides a polynomialtime solution for this problem, it is not scalable in practice. More specifically, it will either require a quadratic-time preprocessing phase or takes linear time per query, both of which are untenable for modern huge codebases with hundreds of thousands of lines. Previous works have already shown that parameterizing the problem by the treewidth of the program's control-flow graph is promising and can lead to significant gains in efficiency. Unfortunately, these results were only applicable to the limited special case of same-context queries. In this work, we obtain significant speedups for the general case of on-demand IFDS with queries that are not necessarily same-context. This is achieved by exploiting a new graph sparsity parameter, namely the treedepth of the program's call graph. Our approach is the first to exploit the sparsity of control-flow graphs and call graphs at the same time and parameterize by both the treewidth and the treedepth. We obtain an algorithm with a linear preprocessing phase that can answer each query in constant time wrt the size of the input. Finally, our experimental results demonstrate that our approach significantly outperforms the classical IFDS and its on-demand variant.
引用
收藏
页码:177 / 202
页数:26
相关论文
共 50 条
  • [1] CONTEXT-DEPENDENT FLOW-SENSITIVE INTERPROCEDURAL DATA-FLOW ANALYSIS
    JOHMANN, KR
    LIU, SS
    YAU, SS
    JOURNAL OF SOFTWARE MAINTENANCE-RESEARCH AND PRACTICE, 1995, 7 (03): : 177 - 202
  • [2] Automatic generation of interprocedural data-flow analyzers and optimizers
    Ruiqi Lian
    Zhaoqing Zhang
    Ruliang Qiao
    Journal of Computer Science and Technology, 2002, 17 : 708 - 717
  • [3] Automatic generation of interprocedural data-flow, analyzers and optimizers
    Lian, RQ
    Zhang, ZQ
    Qiao, RL
    JOURNAL OF COMPUTER SCIENCE AND TECHNOLOGY, 2002, 17 (06) : 708 - 717
  • [4] EFFICIENT DATA-FLOW ANALYSIS OF LOGIC PROGRAMS
    DEBRAY, SK
    JOURNAL OF THE ACM, 1992, 39 (04) : 949 - 984
  • [5] Compiler analysis for cache coherence: Interprocedural array data-flow analysis and its impact on cache performance
    Choi, L
    Yew, PC
    IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 2000, 11 (09) : 879 - 896
  • [6] Optimal and Perfectly Parallel Algorithms for On-demand Data-flow Analysis
    Chatterjee, Krishnendu
    Goharshady, Amir Kafshdar
    Ibsen-Jensen, Rasmus
    Pavlogiannis, Andreas
    PROGRAMMING LANGUAGES AND SYSTEMS ( ESOP 2020): 29TH EUROPEAN SYMPOSIUM ON PROGRAMMING, 2020, 12075 : 112 - 140
  • [7] TRACTABLE DATA-FLOW ANALYSIS FOR DISTRIBUTED SYSTEMS
    CHEUNG, SC
    KRAMER, J
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1994, 20 (08) : 579 - 593
  • [8] Dynamic Data-Flow Analysis with Dacite: Evaluating an Integrated Data-Flow Visualization Approach
    Troost, Laura
    Neugebauer, Jonathan
    Kuchen, Herbert
    EVALUATION OF NOVEL APPROACHES TO SOFTWARE ENGINEERING, ENASE 2023, 2024, 2028 : 251 - 270
  • [9] May/must analysis and the DFAGen data-flow analysis generator
    Stone, Andrew
    Strout, Michelle
    Behere, Shweta
    INFORMATION AND SOFTWARE TECHNOLOGY, 2009, 51 (10) : 1440 - 1453
  • [10] Data-flow bending: On the effectiveness of data-flow integrity
    Lu, Tingting
    Wang, Junfeng
    COMPUTERS & SECURITY, 2019, 84 : 365 - 375