Skip to main content
QUICK REVIEW

[論文レビュー] Optimal and Perfectly Parallel Algorithms for On-demand Data-flow Analysis

Krishnendu Chatterjee, Amir Kafshdar Goharshady|arXiv (Cornell University)|Jan 29, 2020
Advanced Data Storage Technologies参考文献 84被引用数 14
ひとこと要約

本稿では、プログラムフローグラフの低木幅の性質を活用することで、IFDSフレームワークにおけるオンデマンドの相互関数的データフロー解析の最適かつ完全並列化可能なアルゴリズムを提示する。この手法は、線形時間の事前処理と定数時間のクエリを実現し、ほぼ完全な並列性を達成しており、実世界のベンチマークにおいて、従来手法と比較して事前処理およびクエリの両方の速度で顕著な向上を示している。

ABSTRACT

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.

研究の動機と目的

  • 大規模なプログラムにおける包括的相互関数的データフロー解析の高い計算コストを低減すること。
  • 事前処理段階とクエリ段階を分離することで、プログラム解析における高速なオンデマンドクエリを可能にすること。
  • プログラムフローグラフの低木幅の性質を活用し、最適かつ並列化可能なアルゴリズムを設計すること。
  • 一般的なデータフロー解析において時間的・空間的最適性を達成すること。
  • 各スレッドが定数時間の作業しか行わない、容易に並列化可能なクエリ処理を実現すること。

提案手法

  • プログラムフローグラフの低木幅の性質を活用し、時間的・空間的最適性を達成するアルゴリズムの設計。
  • 木分解を用いて、軽量な事前処理段階で分析要約を事前に計算・保存すること。
  • スレッド間で作業を均等に分割するクエリアルゴリズムを設計し、各スレッドが定数時間の作業しか行わないようにすること。
  • 提案されたアルゴリズムに基づく静的解析器を実装し、実験的評価を実施すること。
  • 理論的分析とDaCapoベンチマークを用いた実験を組み合わせて、性能を検証すること。
  • ワードレベルの最適化と並列化技術を適用し、クエリ実行におけるほぼ完全な並列性を達成すること。

実験結果

リサーチクエスチョン

  • RQ1フローグラフの構造的性質を活用することで、オンデマンドIFDS解析を時間的・空間的最適化可能か?
  • RQ2事前処理段階を軽量に保ちつつ、定数時間クエリを可能にできるか?
  • RQ3クエリ段階を、各スレッドが定数時間の作業しか行わない、容易に並列化可能な形にできるか?
  • RQ4木幅を活用することで、従来手法と比較して顕著な実用的性能向上が得られるか?
  • RQ5提案されたアルゴリズムは、木幅が小さい実世界のJavaプログラムを効果的に処理できるか?

主な発見

  • 提案されたアルゴリズムは、事前処理時間計算量が O(n·|D|³) であり、これは最適かつ手続きのサイズに依存しない。
  • すべてのクエリが O(1) 時間で回答され、重い完全事前処理と同等の性能を達成している。
  • 並列版では12スレッドで11.3倍の高速化が達成され、ほぼ完全な並列性が実証された。
  • すべての110のベンチマークについて、事前処理段階は5分以内に完了したが、CPPは25%のインスタンスでタイムアウトした。
  • 実世界のプログラムの木幅は小さく(最大9、最小1)であり、本手法の実用的妥当性が確認された。
  • 本手法は、特に大規模なプログラムにおいて、事前処理およびクエリの両段階で、すべての先行手法を上回った。

より良い研究を、今すぐ始めましょう

論文の読解から最終レビューまで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。