Skip to main content
QUICK REVIEW

[論文レビュー] Computation of WCET using Program Slicing and Real-Time Model-Checking

Jean-Luc Béchennec, Franck Cassez|arXiv (Cornell University)|May 9, 2011
Formal Methods in Verification参考文献 20被引用数 12
ひとこと要約

本稿では、プログラムスライシングおよびUppaalを用いたリアルタイムモデルチェックを用いて、完全自動のWorst-Case Execution Time(WCET)計算手法を提示する。バイナリコードから制御フローダイアグラムを構築し、ハードウェア(例:ARM920T)をタイムドオートマトンとしてモデル化し、プログラムと同期化することで、WCET解析を到達可能性問題に還元する。実ハードウェア測定と比較した結果、相対誤差5%未満の高い正確性を達成した。

ABSTRACT

Computing accurate WCET on modern complex architectures is a challenging task. This problem has been devoted a lot of attention in the last decade but there are still some open issues. First, the control flow graph (CFG) of a binary program is needed to compute the WCET and this CFG is built using some internal knowledge of the compiler that generated the binary code; moreover once constructed the CFG has to be manually annotated with loop bounds. Second, the algorithms to compute the WCET (combining Abstract Interpretation and Integer Linear Programming) are tailored for specific architectures: changing the architecture (e.g. replacing an ARM7 by an ARM9) requires the design of a new ad hoc algorithm. Third, the tightness of the computed results (obtained using the available tools) are not compared to actual execution times measured on the real hardware. In this paper we address the above mentioned problems. We first describe a fully automatic method to compute a CFG based solely on the binary program to analyse. Second, we describe the model of the hardware as a product of timed automata, and this model is independent from the program description. The model of a program running on a hardware is obtained by synchronizing (the automaton of) the program with the (timed automata) model of the hardware. Computing the WCET is reduced to a reachability problem on the synchronised model and solved using the model-checker UPPAAL. Finally, we present a rigorous methodology that enables us to compare our computed results to actual execution times measured on a real platform, the ARM920T.

研究の動機と目的

  • パイプライン化やキャッシュを有する複雑なアーキテクチャを有する現代の埋め込みシステムに対して、正確なWCETを計算する課題に対処すること。
  • ソースコードやコンパイラの内部構造を必要とせず、バイナリコードから制御フローダイアグラム(CFG)を自動的に導出することで、手動によるCFG構築やループ境界のアノテーションを排除すること。
  • プロセッサのモジュラーなタイムドオートマトンモデルを用いることで、ハードウェアモデルの構築とプログラム解析を分離すること。
  • 実プラットフォームでの実測実行時間と照合することで、正確なWCET推定を可能にすること。
  • ハードウェアモデルを変更するだけで、分析アルゴリズムを再実装せずとも、異なるプロセッサへの容易な適合性を実現すること。

提案手法

  • ソースコードやコンパイラの内部構造を必要とせず、プログラムスライシングを用いてバイナリコードから制御フローダイアグラム(CFG)を自動的に推論する。
  • ターゲットハードウェア(例:ARM920T)を、パイプライン段階、キャッシュ動作、メモリアクセス時間といった要因を捉えたタイムドオートマトンの積としてモデル化する。
  • プログラムの実行モデルとハードウェアモデルを同期化し、そのプロセッサ上で実行されるプログラムの複合タイムドオートマトンを構築する。
  • WCET計算をUppaalにおける到達可能性クエリに還元し、最長パスがWorst-Case Execution Timeに対応するようにする。
  • シンボリック実行とモデルチェックを用いて、データ依存的な命令実行時間を持つ複雑なプログラムパスでさえも、効率的に探索する。
  • 実際のARM920Tハードウェア上で実行時間を測定するきめ細やかな実験プロrotocolを適用して検証を行う。

実験結果

リサーチクエスチョン

  • RQ1手動によるCFG構築やループ境界のアノテーションなしに、完全自動の手法で正確なWCETを計算できるか?
  • RQ2パイプライン化やキャッシュなどのハードウェア固有のタイミング挙動を独立してモデル化し、プログラムモデルと合成することで、正確なWCET解析が可能か?
  • RQ3モデルチェックを用いて計算されたWCETは、実ハードウェア上で測定された実際の実行時間とどのように比較されるか?
  • RQ4ハードウェアモデルを変更するだけで、異なるプロセッサに容易に適合できるか?
  • RQ5データ依存的な命令実行時間を持つ複雑なプログラムに対して、シンボリックモデルチェックを用いた場合、WCETの境界の絞り込みはどの程度達成可能か?

主な発見

  • 本手法はバイナリコードから制御フローダイアグラムを自動的に構築し、手動によるアノテーションやコンパイラ固有の知識の必要性を排除した。
  • 18のプログラム全体を通じて、計算値と測定値の平均相対誤差は2.4%であり、最高でmatmult-O2で5.4%であった。
  • 単一パスプログラムでは、相対誤差が0.42%から3.8%の範囲に収まり、予測可能な実行環境での高い精度を示した。
  • insertsort-O0 や ns-O0 のような複数パスプログラムに対しても、それぞれ0.8%および0.8%の低誤差を維持し、複雑な制御フローへのスケーラビリティを示した。
  • ハードウェアモデルを単に置き換えることで、ARM920T上で異なる最適化レベルでも一貫した結果を得られたことから、ハードウェアのリターゲティングをサポートしている。
  • モデルチェック手法は、1000万ステートを超えるプログラム(例:matmult-O0で1050万ステート)に対してもWCETを正しく計算でき、大規模な状態空間へのスケーラビリティを示した。

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

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

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

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