Skip to main content
QUICK REVIEW

[論文レビュー] Optimal Dyck Reachability for Data-Dependence and Alias Analysis

Krishnendu Chatterjee, Bhavya Choudhary|arXiv (Cornell University)|Jan 1, 2017
Advanced Database Systems and Queries被引用数 10
ひとこと要約

本稿は、静的解析におけるDyck到達可能性の最適アルゴリズムを提示し、双方向グラフではO(m + n·α(n))時間で実行可能であり、従来の境界を改善するとともに、ブール行列乗算への還元を用いて条件的最適性を示している。事前処理後、クライアント側のコストが線形に抑えられ、実世界のベンチマークにおける実験では顕著な高速化とメモリ使用量の削減を達成した。

ABSTRACT

A fundamental algorithmic problem at the heart of static analysis is Dyck reachability. The input is a graphwhere the edges are labeled with different types of opening and closing parentheses, and the reachabilityinformation is computed via paths whose parentheses are properly matched. We present new results for Dyckreachability problems with applications to alias analysis and data-dependence analysis. Our main contributions,that include improved upper bounds as well as lower bounds that establish optimality guarantees, are asfollows:First, we consider Dyck reachability on bidirected graphs, which is the standard way of performing field-sensitive points-to analysis. Given a bidirected graph withnnodes andmedges, we present: (i) an algorithmwith worst-case running timeO(m+n·α(n)), whereα(n)is the inverse Ackermann function, improving thepreviously knownO(n2)time bound; (ii) a matching lower bound that shows that our algorithm is optimalwrt to worst-case complexity; and (iii) an optimal average-case upper bound ofO(m)time, improving thepreviously knownO(m·logn)bound.Second, we consider the problem of context-sensitive data-dependence analysis, where the task is to obtainanalysis summaries of library code in the presence of callbacks. Our algorithm preprocesses libraries in almostlinear time, after which the contribution of the library in the complexity of the client analysis is only linear,and only wrt the number of call sites.Third, we prove that combinatorial algorithms for Dyck reachability on general graphs with truly sub-cubic bounds cannot be obtained without obtaining sub-cubic combinatorial algorithms for Boolean MatrixMultiplication, which is a long-standing open problem. Thus we establish that the existing combinatorialalgorithms for Dyck reachability are (conditionally) optimal for general graphs. We also show that the samehardness holds for graphs of constant treewidth.Finally, we provide a prototype implementation of our algorithms for both alias analysis and data-dependenceanalysis. Our experimental evaluation demonstrates that the new algorithms significantly outperform allexisting methods on the two problems, over real-world benchmarks.

研究の動機と目的

  • 静的プログラム解析の基盤をなす、Dyck到達可能性の根本的課題に取り組むこと。
  • フィールドに依存するポイントツー解析をモデル化する双方向グラフにおけるDyck到達可能性の最悪計算量および平均計算量を改善すること。
  • Dyck到達可能性をブール行列乗算(BMM)に還元することで、一般グラフにおける既存の組み合わせ的アルゴリズムの条件的最適性を確立すること。
  • ライブラリの要約を用いた事前処理により、コンテキストに依存するデータ依存関係解析を効率化し、クライアント側の解析コストを線形時間に削減すること。
  • 実世界のベンチマークを用いたプロトタイプ実装を通じて、提案手法の実用的優位性を示すこと。

提案手法

  • パス圧縮およびランクによる結合の併合を用いたユニオン・ファインドデータ構造を活用し、双方向グラフにおけるDyck到達可能性のための新アルゴリズムを設計し、最悪計算量O(m + n·α(n))を達成した。
  • 3SUM問題への還元を用いて下界を証明し、O(m + n·α(n))の境界が漸近的に最適であることを示した。
  • データ依存関係解析におけるライブラリコードのほぼ線形時間の事前処理フェーズを導入し、ライブラリのサイズに依存せずクライアント側の解析を線形時間で行えるようにした。
  • プログラムグラフの定数木幅性質を活用し、データ依存関係解析においてほぼ線形時間計算量を達成した。
  • Dyck到達可能性をブール行列乗算(BMM)に還元することで、BMMにおける飛躍的進展がなければ、真にサブキュービックな組み合わせ的アルゴリズムは得られないことを示した。
  • プロトタイプを用いて実世界のベンチマークでアルゴリズムを実装・評価し、TALおよびCFL到達可能性アプローチと比較した。

実験結果

リサーチクエスチョン

  • RQ1双方向グラフにおけるDyck到達可能性はサブ二次時間で解けるか?また、その境界はタイトか?
  • RQ2ライブラリの事前処理とその振る舞いの要約により、コンテキストに依存するデータ依存関係解析を効率化できるか?
  • RQ3一般グラフにおけるDyck到達可能性に、組み合わせ的アルゴリズムで真にサブキュービック時間計算量を達成できるか?
  • RQ4提案手法は実際の応用において、時間的およびメモリ使用量の観点で既存手法を上回るか?
  • RQ5本アルゴリズムは、木幅が変動する実世界のプログラム、特にエッジケースで高木幅を示すものに対しても処理可能か?

主な発見

  • 双方向グラフにおける提案アルゴリズムはO(m + n·α(n))時間で実行され、従来のO(n²)の境界を改善し、新たな下界と一致することで最適性が証明された。
  • 平均計算量においても最適なO(m)を達成し、従来のO(m·log n)の境界を改善した。
  • データ依存関係解析において、ライブラリの事前処理をほぼ線形時間で行い、クライアント側の解析コストをコールサイト数に比例する線形時間にまで削減した。
  • シリアルベンチマークではCFL到達可能性に対して最大630倍、TAL到達可能性に対して30倍の高速化を達成した。これは、かつてメモリ不足で実行できなかったケースでも同様に有効であった。
  • メモリ使用量は著しく削減され、シリアルベンチマークでは130MBにまで抑えられ、CFL到達可能性の33倍、TALの90倍以上も改善された。
  • コールバックを多く含むコードに限らず、コールバックが少ない状況でもCFLおよびTALを上回る性能を示し、広範な適用可能性を実証した。

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

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

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

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