Efficient Interprocedural Data-Flow Analysis Using Treedepth and Treewidth

被引:7
作者
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
相关论文
共 82 条
[1]   Efficient Approximations for Cache-Conscious Data Placement [J].
Ahmadi, Ali ;
Daliri, Majid ;
Goharshady, Amir Kafshdar ;
Pavlogiannis, Andreas .
PROCEEDINGS OF THE 43RD ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '22), 2022, :857-871
[2]  
Aiswarya C., 2022, ACM SIGLOG News, V9, P6, DOI 10.1145/3527540.3527542
[3]  
[Anonymous], 1999, P 1999 C CTR ADV STU
[4]  
Arzt S, 2014, ACM SIGPLAN NOTICES, V49, P259, DOI [10.1145/2594291.2594299, 10.1145/2666356.2594299]
[5]   Faster Algorithms for Quantitative Analysis of MCs and MDPs with Small Treewidth [J].
Asadi, Ali ;
Chatterjee, Krishnendu ;
Goharshady, Amir Kafshdar ;
Mohammadi, Kiarash ;
Pavlogiannis, Andreas .
AUTOMATED TECHNOLOGY FOR VERIFICATION AND ANALYSIS (ATVA 2020), 2020, 12302 :253-270
[6]   METHOD OF ATTRIBUTES FOR DATA FLOW ANALYSIS .2. DEMAND ANALYSIS [J].
BABICH, WA ;
JAZAYERI, M .
ACTA INFORMATICA, 1978, 10 (03) :265-272
[7]   SPUR: A Trace-Based JIT Compiler for CIL [J].
Bebenita, Michael ;
Brandner, Florian ;
Fahndrich, Manuel ;
Logozzo, Francesco ;
Schulte, Wolfram ;
Tillmann, Nikolai ;
Venter, Herman .
ACM SIGPLAN NOTICES, 2010, 45 (10) :708-725
[8]   The DaCapo benchmarks: Java']Java benchmarking development and analysis [J].
Blackburn, Stephen M. ;
Garner, Robin ;
Hoffmann, Chris ;
Khan, Asjad M. ;
McKinley, Kathryn S. ;
Bentzur, Rotem ;
Diwan, Amer ;
Feinberg, Daniel ;
Frampton, Daniel ;
Guyer, Samuel Z. ;
Hirzel, Martin ;
Hosking, Antony ;
Jump, Maria ;
Lee, Han ;
Moss, J. Eliot B. ;
Phansalkar, Aashish ;
Stefanovic, Darko ;
VanDrunen, Thomas ;
von Dincklage, Daniel ;
Wiedermann, Ben .
ACM SIGPLAN NOTICES, 2006, 41 (10) :169-190
[9]  
Bodden E., 2012, P INT WORKSHOP STATE, P3, DOI [DOI 10.1145/2259051.2259052, 10.1145/2259051.2259052]
[10]   SPLLIFT - Statically Analyzing Software Product Lines in Minutes Instead of Years [J].
Bodden, Eric ;
Toledo, Tarsis ;
Ribeiro, Marcio ;
Brabrand, Claus ;
Borba, Paulo ;
Mezini, Mira .
ACM SIGPLAN NOTICES, 2013, 48 (06) :355-364