1 / 92

Impact Analysis

University of Saarland Department of Computer Science. Impact Analysis. Yury Chebiryak urriy@wjpserver.cs.uni-sb.de. Impact Analysis. is often used to assess the effects of a change after change has been made is rarely used to predict the effect of change before it is instantiated.

jadon
Download Presentation

Impact Analysis

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. University of SaarlandDepartment of Computer Science Impact Analysis Yury Chebiryak urriy@wjpserver.cs.uni-sb.de

  2. Impact Analysis • is often used to assess the effects of a change after change has been made • is rarely used to predict the effect of change before it is instantiated

  3. Techniques

  4. Dependency-based IA

  5. Whole Program Path-Based Dynamic Impact Analysis James Law Gregg Rothermel

  6. PathImpact • Dynamic • Call-based • Works on binaries • Relatively low cost • Relatively low overhead

  7. Call Graph

  8. Call Graph B is changed

  9. Call Graph Assumption: change in B has a potential impact on nodes reachable from B

  10. Execution Traces (ET) Run M() ET: M

  11. Execution Traces Run B() ET: MB

  12. Execution Traces Return ET: MBr

  13. Execution Traces Run A() ET: MBrA

  14. Execution Traces Run C() ET: MBrAC

  15. Execution Traces Run D() ET: MBrACD

  16. Execution Traces Return ET: MBrACDr

  17. Execution Traces Run E() ET: MBrACDrE

  18. Execution Traces Return ET: MBrACDrEr

  19. Execution Traces Return ET: MBrACDrErr

  20. Execution Traces Return ET: MBrACDrErrr

  21. Execution Traces Return ET: MBrACDrErrrrx

  22. Execution Traces II • Single • Multiple MBrACDrErrrrx MBrACDrErrrrxMBGrrrrxMBCFrrrrx Programs with loops => very long trace

  23. SEQUITUR algorithm Data compression algorithm by Larus: • Online • Created grammar reproduces trace exactly • O(N) running time • O(N) size in the worst case • O(log N) size in the best case • e.g. 2GB trace → 100 MB

  24. SEQUITUR algorithm algorithm SEQUITUR( S ) input Execution Trace S output Grammar G Grammar G Rule T 1. for each token in S 2. append token to end of production for T 3. if duplicate digram appears 4. if other occurrence is a rule g in G 5. replace new digram with non-terminal of g. 6. else 7. form a new rule and replace duplicate 8. digrams with the new non-terminal. 9. if any rule in G is used only once 10. remove the rule by substituting the production. 11. return G

  25. SEQUITUR: example ET: MBrACDrErrrrxMBGrrrrxMBCFrrrrx

  26. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → MBrACDrErrrrx

  27. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → MBrACDrE x 1 → rr 1 1

  28. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → MBrACDrE11x 1 → rr

  29. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → MBrACDrE11xM 1 → rr

  30. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → rACDrE11x 1 → rr MB MB

  31. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → rACDrE11x 1 → rr 2 → MB 2 2

  32. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → 2rACDrE11x2 1 → rr 2 → MB

  33. SEQUITUR: example ET:MBrACDrErrrrxMBGrrrrxMBCFrrrrx T → 2rACDrE113G43CF4rx 1 → rr 2 → MB 3 → x2 4 → 1r grammar => whole path DAG

  34. Whole path DAG

  35. PathImpact

  36. PathImpact

  37. PathImpact PathImpact(E): I {E} Returns=0 I = {}

  38. PathImpact PathImpact(E): up(T, E) Returns=0 I = {E}

  39. PathImpact PathImpact(E): forward(1) Returns=0 I = {E}

  40. PathImpact PathImpact(E): forward(r) Returns=0 I = {E}

  41. PathImpact PathImpact(E): Returns++ Returns=0 I = {E}

  42. PathImpact PathImpact(E): forward(r) Returns=1 I = {E}

  43. PathImpact PathImpact(E): Returns++ Returns=1 I = {E}

  44. PathImpact PathImpact(E): after forward(1) Returns=4 I = {E}

  45. PathImpact PathImpact(E): forward(3) -> x Returns=4 I = {E}

  46. PathImpact PathImpact(E): backward(r) Returns=4 I = {E} Skip=0

  47. PathImpact PathImpact(E): Skip++ Returns=4 I = {E} Skip=0

  48. PathImpact PathImpact(E): backward(D)->Skip-- Returns=4 I = {E} Skip=1

  49. PathImpact PathImpact(E): backward(C)-> I := I U {C}, Returns-- Returns=4 I = {E} Skip=0

  50. PathImpact PathImpact(E): backward(A)-> I := I U {A}, Returns-- Returns=3 I = {E, C} Skip=0

More Related