Parameterized Algorithms for Scalable Interprocedural Data-flow Analysis

09/20/2023
by   Ahmed Khaled Zaher, et al.
0

Data-flow analysis is a general technique used to compute information of interest at different points of a program and is considered to be a cornerstone of static analysis. In this thesis, we consider interprocedural data-flow analysis as formalized by the standard IFDS framework, which can express many widely-used static analyses such as reaching definitions, live variables, and null-pointer. 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 polynomial-time solution to this problem, it is not scalable in practice. Specifically, it either requires 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 treewidth and treedepth. We obtain an algorithm with a linear preprocessing phase that can answer each query in constant time with respect to the input size. Finally, we show experimental results demonstrating that our approach significantly outperforms the classical IFDS and its on-demand variant.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/29/2020

Optimal and Perfectly Parallel Algorithms for On-demand Data-flow Analysis

Interprocedural data-flow analyses form an expressive and useful paradig...
research
06/22/2021

On the Parameterized Complexity of the Connected Flow and Many Visits TSP Problem

We study a variant of Min Cost Flow in which the flow needs to be connec...
research
11/11/2022

Approximate Max-Flow Min-Multicut Theorem for Graphs of Bounded Treewidth

We prove an approximate max-multiflow min-multicut theorem for bounded t...
research
07/25/2022

Simple O(1) Query Algorithm for Level Ancestors

This note describes a very simple O(1) query time algorithm for finding ...
research
02/25/2023

Computing the Difference of Conjunctive Queries Efficiently

We investigate how to efficiently compute the difference result of two (...
research
05/04/2020

Learning Strong Substitutes Demand via Queries

This paper addresses the computational challenges of learning strong sub...
research
08/26/2022

Computing Maximum Fixed Point Solutions over Feasible Paths in Data Flow Analyses

The control flow graph (CFG) representation of a procedure used by virtu...

Please sign up or login with your details

Forgot password? Click here to reset