1 / 18

Leveraging Existing Instrumentation to Automatically Infer Invariant-Constrained Models

Leveraging Existing Instrumentation to Automatically Infer Invariant-Constrained Models. Ivan Beschastnikh 1 , Yuriy Brun 1 , Sigurd Schneider 2 , Michael Sloan 1 and Michael D. Ernst 1 1 University of Washington 2 Saarland University 担当 : NTT サイバースペース 研究所 岡田敏. 目的と貢献. 目的

lyn
Download Presentation

Leveraging Existing Instrumentation to Automatically Infer Invariant-Constrained Models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Leveraging Existing Instrumentation toAutomatically Infer Invariant-Constrained Models Ivan Beschastnikh1, YuriyBrun1,SigurdSchneider2 , Michael Sloan1 and Michael D. Ernst1 1University of Washington 2Saarland University 担当:NTTサイバースペース研究所 岡田敏

  2. 目的と貢献 • 目的 • システムのログを利用して、システムのデバックや理解を簡単に行える仕組みを作る • 主要な貢献 • 従来のログを使ったデバッグ・システム理解よりも、開発者に要求する手順・入力を削減 • 既存の動作ログ と 解析するための数行の正規表現 • 簡単・明確にシステムモデルを推測する。 • モデルを見ることにより、ログの解析を容易にする。 • 研究成果をツール化(名称:Synoptic) • ツールはOSSとして提供中: http://code.google.com/p/synoptic/

  3. 利用イメージ 174.15.155.103 [06/Jan/2011:07:24:13] "GET HTTP/1.1 /check-out.php" 213.15.232.201 [06/Jan/2011:07:24:19] "GET HTTP/1.1 /check-out.php" 313.15.232.201 [06/Jan/2011:07:25:33] "GET HTTP/1.1 /invalid-coupon.php" 474.15.155.103 [06/Jan/2011:07:27:05] "GET HTTP/1.1 /valid-coupon.php" 574.15.155.199 [06/Jan/2011:07:28:43] "GET HTTP/1.1 /check-out.php" 674.15.155.103 [06/Jan/2011:07:28:14] "GET HTTP/1.1 /reduce-price.php" 774.15.155.199 [06/Jan/2011:07:29:02] "GET HTTP/1.1 /get-credit-card.php" 813.15.232.201 [06/Jan/2011:07:30:22] "GET HTTP/1.1 /reduce-price.php" 974.15.155.103 [06/Jan/2011:07:30:55] "GET HTTP/1.1 /check-out.php" 10 13.15.232.201 [06/Jan/2011:07:31:17] "GET HTTP/1.1 /check-out.php" 11 13.15.232.201 [06/Jan/2011:07:31:20] "GET HTTP/1.1 /get-credit-card.php" 12 74.15.155.103 [06/Jan/2011:07:31:44] "GET HTTP/1.1 /get-credit-card.php" Log: 入力 ログ解析するために利用: 開発者が準備 Regular Expressions : Line parsing: (?<ip>) .+ /(?<TYPE>.+).php" Execution mapping: \k<ip> Synoptic 遷移確率 valid-coupon 1 1/3 1 check-out 9, 10 4 reduce-price 1 check-out 終点 1, 2, 5 始点 6,8 invalid-coupon 1/3 1 get-credit-card 不正な遷移 ⇒バグ発見!! 3 7, 11, 12 行番号 1/3 Ivan Beschastnikh, YuriyBrun, Sigurd Schneider, Michael Sloan, Michael D. Ernst "Leveraging Existing Instrumentation to Automatically Infer Invariant-Constrained Models" (ESEC/FSE’11) Figure1より引用

  4. 手法の概要 (モデル生成の流れ) ログを解析 解析用正規表現により、三つの系列に分割 (2)初期モデルの生成 同じ名前のノードを集約 (4)ノードの分割・集約 順序性が正しくなるようにノードを分割し、まとめられる部分を集約 (3)不正ルートの検出 (1)からvalid-couponの後にinvalid-couponは来ないので不正 Ivan Beschastnikh, YuriyBrun, Sigurd Schneider, Michael Sloan, Michael D. Ernst "Leveraging Existing Instrumentation to Automatically Infer Invariant-Constrained Models" (ESEC/FSE’11) Figure3, 4, 5, 6より引用

  5. 評価 • 二つのケーススタディを実施: • 実システム: • reverse tracerouteシステムの開発者 • 900,000のイベントログを対象 • モデルを見ながら、インタビューを実施 ⇒ モデル提示から数分でバグを発見 • 学生実験: • ワシントン大学、分散システムコースの学部生。2-4人からなる18のグループ • peer-to-peerのソーシャルネットワークの設計・実装で評価 • 3グループで実装バグを発見 • 実験(インタビュー、レポートを含む)により、Synopticが以下に貢献していることを確認 • コード中のバグ発見 : これまで見つけづらかったバグの発見を容易に • 開発者の信頼性向上 : バグがないことをモデルとして示すことができる。 • システム理解 : モデルを観察することにより、システム理解ができる。

  6. Path Exploration based on Symbolic Output Dawei Qi, Hoang D.T. Nguyen, AbhikRoychoudhury School of Computing, National University of Singapore 担当:NTTサイバースペース研究所 大島剛志

  7. 目的と貢献 • 本論文の目的 • より効率的なプログラムの経路探索手法の構築 • 主要な貢献 • 効率的なパス探索手法を提案した • 記号実行を行った際の出力ベースの手法 • 従来の全経路探索を採用しているツールよりも効率的な経路の探索を可能にした • テストスイート作成の際に当手法が有用であることを実験で確認した

  8. 手法 • Motivating Example 上のプログラムの例では分岐が3つ存在→経路が8通り存在 しかし,出力変数”out”に着目すると,経路は3通り Dawei Qi, Hoang D.T. Nguyen, AbhikRoychoudhury "Path Exploration based on Symbolic Outpit" (ESEC/FSE’11) Figure1, 4より引用

  9. 手法と評価 • 手法 Reordered Relevant-Slice Condition(RSC) による経路探索 • 評価 提案手法とDART(Directed Automated Random Testing)で経路抽出の効率を比較した Dawei Qi, Hoang D.T. Nguyen, AbhikRoychoudhury "Path Exploration based on Symbolic Outpit" (ESEC/FSE’11) Figure5, Table 4より引用

  10. 評価つづき • 提案手法とDART(全経路探索)で経路抽出の効率を比較した • 提案手法(赤線)において,よりよい結果が得られた Dawei Qi, Hoang D.T. Nguyen, AbhikRoychoudhury "Path Exploration based on Symbolic Outpit" (ESEC/FSE’11) Figure7より引用

  11. Synthesizing Data-structure Manipulations from Storyboards Rishabh Singh1, Armando Solar-Lezama1 1 MIT CSAIL 担当:NTTサイバースペース研究所 神谷慎吾

  12. 1. 背景、目的 • 背景 • 複雑なデータ構造を操作するプログラムの作成は難しい。 • プログラマは操作前後のデータ構造を白板等に図示して考察するが、実際のプログラムは考察の図とはかなり違う。 • 簡単な例として、二重リンクリストのノードを削除する場合: 認識 GAP 実際に作らなければならないプログラム 白板に書くプログラマの発想 • 目的 • 操作前後でデータ構造がどう変わるかの図 (Storyboard) を基に操作プログラムを合成する。 Rishabh Singh, Armando Solar-Lezama “Synthesizing Data-structure Manipulations from Storyboards" (ESEC/FSE’11) Figure 1より引用 (一部修正有り)

  13. 2. 提案手法、既存手法との違い • 提案手法 • PBE: Programming by Example の一種 • データ構造の変化を示す図に相当するテキスト記法でシナリオ例(複数可)を書く。(現時点では図的な入力にはなっていない。) • Constraint-based synthesis + abstract-interpretation-based shape analysis により操作プログラムを合成する。 • 既存の PBE 手法との違いを下表に示す。

  14. 3. 記法その1: シナリオ記述の基本 • リンクリストの反転を題材として例示的に示す。 局所変数の使用数を予想? Environment varsNode head, temp1, temp2, temp3 selectors (Node, Node) next locationsNode a, f, e, b, f’, e’ summaryNode (mid, f, e), (mid’, f’, e’) invariant next(f, mid)=1/2, next(f’, mid’)=1/2 Scenario 1 input head(a) // vars next(a, f), next(e, b), next(b, null) // sels output head(b) // vars next(b, f’), next(e’, a), next(a, null) // sels Node の属性 省略箇所 一般 省略箇所 3-valued logic 左図の一般の場合に対応 長さ2 長さ1 長さ0 図で書くとこうなる。 提案記法で書くとこうなる。 Rishabh Singh, Armando Solar-Lezama “Synthesizing Data-structure Manipulations from Storyboards" (ESEC/FSE’11) Figure 3より引用 (一部修正有り)

  15. 4. 記法その2: 省略箇所記述の補足 • リンクリストの反転を題材として例示的に示す。 • 省略箇所にも構造があるので、unfold と fold を指定する。 unfold(f, {(f, in, x’), (e, out, x’)}, [true]); unfold(f, {(f, in, x’), (e, out, e’)}, [x’.next=f’]); fold(x, {(x, in, f’), (x, out, e’)}, [true]); fold(x, {(x, in, f’), (e, out, e’)}, [x.next=f]); 図で書くとこうなる。 提案記法で書くとこうなる。 Rishabh Singh, Armando Solar-Lezama “Synthesizing Data-structure Manipulations from Storyboards" (ESEC/FSE’11) Figure 4より引用 (一部修正有り)

  16. 5. 記法その3: 生成プログラム制約 • リンクリストの反転を題材として例示的に示す。 • 生成されるプログラムのスケルトンを指定して制約をかける。 NodellReverse(Node head) { /* 1 */ while ( /* 2 */ ) { /* 3 */ } /* 4 */ return head; } この箇所には任意の処理があってよい。 /* 2 */ 以下も同様 この箇所には Boolean 型の式が来るべきといった構文上の制約条件は認識する模様 Rishabh Singh, Armando Solar-Lezama “Synthesizing Data-structure Manipulations from Storyboards" (ESEC/FSE’11) Figure 5より引用 (一部修正有り)

  17. 6. 生成されたプログラムの例 • リンクリストの反転を題材として例示的に示す。 • 前頁までの記述(+アルファ)から生成されたプログラムが下記: コメントも自動生成したのかは謎 スケルトンには書かれていた Return 文が抜けている感触 Rishabh Singh, Armando Solar-Lezama “Synthesizing Data-structure Manipulations from Storyboards" (ESEC/FSE’11) Figure 7より引用

  18. 7. ケーススタディ • 実用的な事例でも比較的短い時間で答えが出る。 • 実験には Pentium Core-i7 1.87GHz CPU & 4GB memory を使用 • サイトで追加詳細情報を公開中 必要最小限の例示に加えて ヒント条件も追加指定したもの シナリオ数 展開された制約式の数 ll: リンクリスト dll: 二重リンクリスト bst: 二分探索木 (赤黒木) aig: And Inverter Graph Rishabh Singh, Armando Solar-Lezama “Synthesizing Data-structure Manipulations from Storyboards" (ESEC/FSE’11) Table 1より引用

More Related