论文标题
最佳且完美的并行算法,用于按需数据流分析
Optimal and Perfectly Parallel Algorithms for On-demand Data-flow Analysis
论文作者
论文摘要
概要数据流分析构成了许多静态分析应用的表达和有用的范式,例如实时变量分析,别名分析和无指针分析。概要数据流分析最广泛使用的框架是IFD,它涵盖了有限域上的分布数据流函数。按需数据流分析限制了分析对特定程序位置和数据事实的重点。该设置在(i)离线(或预处理)阶段之间提供了自然分配,在该阶段进行了部分分析和分析摘要,以及(ii)在线(或查询)阶段,在线分析查询按需到达,摘要用于加快答案的询问。 在这项工作中,我们考虑按需IFD分析相同过程(又称相同文本查询)的查询涉及程序位置的位置。我们利用这样一个事实,即程序的流图具有较低的树宽,以开发更快的算法,这些算法是在预处理和查询阶段中的许多常见数据流分析的最佳空间和时间。我们还使用TreeWidth来开发可尴尬地平行的查询解决方案,即回答每个查询的总工作量分为多个线程,以使每个线程仅执行恒定的工作量。最后,我们基于算法实现了静态分析仪,并对标准基准测试进行了一系列按需分析实验。我们的实验结果表明,仅在轻巧的预处理阶段之后,查询的加快速度急剧,这显着优于现有技术。
Interprocedural data-flow analyses form an expressive and useful paradigm of numerous static analysis applications, such as live variables analysis, alias analysis and null pointers analysis. The most widely-used framework for interprocedural data-flow analysis is IFDS, which encompasses distributive data-flow functions over a finite domain. On-demand data-flow analyses restrict the focus of the analysis on specific program locations and data facts. This setting provides a natural split between (i) an offline (or preprocessing) phase, where the program is partially analyzed and analysis summaries are created, and (ii) an online (or query) phase, where analysis queries arrive on demand and the summaries are used to speed up answering queries. In this work, we consider on-demand IFDS analyses where the queries concern program locations of the same procedure (aka same-context queries). We exploit the fact that flow graphs of programs have low treewidth to develop faster algorithms that are space and time optimal for many common data-flow analyses, in both the preprocessing and the query phase. We also use treewidth to develop query solutions that are embarrassingly parallelizable, i.e. the total work for answering each query is split to a number of threads such that each thread performs only a constant amount of work. Finally, we implement a static analyzer based on our algorithms, and perform a series of on-demand analysis experiments on standard benchmarks. Our experimental results show a drastic speed-up of the queries after only a lightweight preprocessing phase, which significantly outperforms existing techniques.