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 条
  • [21] Accelerating Data-Flow Analysis with Full-Partitioning
    Zhang, Yuantong
    Chen, Liwei
    Nie, Xiaofan
    Zhang, Zhijie
    Wei, Haolai
    Shi, Gang
    19TH IEEE INTERNATIONAL SYMPOSIUM ON PARALLEL AND DISTRIBUTED PROCESSING WITH APPLICATIONS (ISPA/BDCLOUD/SOCIALCOM/SUSTAINCOM 2021), 2021, : 1345 - 1352
  • [22] Checking Model Consistency using Data-Flow Testing
    Wang, Chen-Wei
    Cavarra, Alessandra
    APSEC 09: SIXTEENTH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE, PROCEEDINGS, 2009, : 414 - 421
  • [23] A GENERALIZED THEORY OF BIT VECTOR DATA-FLOW ANALYSIS
    KHEDKER, UP
    DHAMDHERE, DM
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1994, 16 (05): : 1472 - 1511
  • [24] DATA-FLOW ANOMALY DETECTION OF RECURSIVE PROCEDURES
    LIVADAS, PE
    TSAO, QQ
    INTERNATIONAL JOURNAL OF COMPUTER MATHEMATICS, 1994, 50 (1-2) : 11 - 22
  • [25] Comprehensive Path-sensitive Data-flow Analysis
    Thakur, Aditya
    Govindarajan, R.
    CGO 2008: SIXTH INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, PROCEEDINGS, 2008, : 55 - 63
  • [26] THE COMBINING DAG - A TECHNIQUE FOR PARALLEL DATA-FLOW ANALYSIS
    KRAMER, R
    GUPTA, R
    SOFFA, ML
    IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 1994, 5 (08) : 805 - 813
  • [27] A practical framework for demand-driven interprocedural data flow analysis
    Duesterwald, E
    Gupta, R
    Soffa, ML
    ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1997, 19 (06): : 992 - 1030
  • [28] A Survey on Data-Flow Testing
    Su, Ting
    Wu, Ke
    Miao, Weikai
    Pu, Geguang
    He, Jifeng
    Chen, Yuting
    Su, Zhendong
    ACM COMPUTING SURVEYS, 2017, 50 (01)
  • [29] Data-Flow Analysis-Based Approach of Database Watermarking
    Rani, Sapana
    Kachhap, Preeti
    Halder, Raju
    ADVANCED COMPUTING AND SYSTEMS FOR SECURITY, VOL 2, 2016, 396 : 153 - 171
  • [30] GENERATING DATA-FLOW ANALYSIS ALGORITHMS FROM MODAL SPECIFICATIONS
    STEFFEN, B
    SCIENCE OF COMPUTER PROGRAMMING, 1993, 21 (02) : 115 - 139