Efficient and Precise Dynamic Impact Analysis Using Execute-After - - PowerPoint PPT Presentation

efficient and precise dynamic impact analysis using
SMART_READER_LITE
LIVE PREVIEW

Efficient and Precise Dynamic Impact Analysis Using Execute-After - - PowerPoint PPT Presentation

Efficient and Precise Dynamic Impact Analysis Using Execute-After Sequences Taweesup (Term) Apiwattanapong Alessandro Orso Mary Jean Harrold College of Computing Georgia Institute of Technology National Science Foundation awards CCR-0306372,


slide-1
SLIDE 1

Efficient and Precise Dynamic Impact Analysis Using Execute-After Sequences Taweesup (Term) Apiwattanapong

Alessandro Orso Mary Jean Harrold College of Computing Georgia Institute of Technology

National Science Foundation awards CCR-0306372, CCR-0205422, CCR-0209322, SBE- 0123532, and EIA-0196145 to Georgia Tech, Tata Consultancy Services

ICSE 2005

slide-2
SLIDE 2

Development and Maintenance

Modify P Select subset

  • f T to rerun

P correct for T? Identify faults Augment T for untested parts of P Release P

T T F

Develop P Develop T for P T adequate?

F

Impact analysis results

slide-3
SLIDE 3

Outline

  • Dynamic Impact Analysis
  • Existing Techniques
  • Our Technique
  • Empirical Studies
  • Related Work
  • Conclusion
slide-4
SLIDE 4

Impact Analysis

Change = {C} Static Impact Analysis Impact Set = {M, A, B, C, D} M B A C D

calls returns

Dynamic Impact Analysis Impact Set = {M, A, B, C}

slide-5
SLIDE 5

Dynamic Impact Analysis

Impact-analysis techniques that

  • Are based on dynamic information (e.g., test suites,

field executions)

  • Are conservative w.r.t. dynamic information

Quality of the dynamic information is key!

  • representativeness of actual usage

 collect actual usage  efficiency is important

Two existing dynamic impact-analysis techniques

  • PathImpact
  • CoverageImpact
slide-6
SLIDE 6

Existing Techniques

Change = {C} PathImpact CoverageImpact

Impact Set = {M, B, C} Impact Set = {M, A, B, C} M A r … A r B C r r B x 1 1 1 1 D C B A M

M B A C D

slide-7
SLIDE 7

Execute-After (EA) Relation

Essential information is

“Execute-After Relation”

Definition

Given a program P, a set of executions E, and two methods X and Y in P, (X,Y) ∈ EA for E if and only if, in at least

  • ne execution in E,
  • 1. Y calls X (directly or transitively (d/t)),
  • 2. Y returns into X (d/t), or
  • 3. Y returns into a method Z (d/t), and

Z later calls X (d/t).

Y X M Z N

slide-8
SLIDE 8

Computing EA Relation

Use method-entry and method-return-into events

Me Ae Mi … Ae Mi Be Ce Bi Mi Be Me Ae Ae Be Ce Mi Be Mf Af Al Bf Cf Cl Ml Bl

Use only the first and last events of each method M B A C D Execute-After (EA) Sequence

slide-9
SLIDE 9

Our Technique

M B A C D

L F 1 1 2 2 Current Timestamp: 3

slide-10
SLIDE 10

Our Technique

M B A C D

L F 1 2 Current Timestamp: 8 9 10

slide-11
SLIDE 11

Our Technique

M B A C D

L F 1 2 8 10 11 11

Mf Af Al Bf Cf Cl Ml Bl Sort the entries to obtain an Execute-After (EA) Sequence

Current Timestamp: 14 13 15

slide-12
SLIDE 12

Analytical Complexity

t = the size of the trace m = the number of methods O(1) 2m integers Execute-After O(1) m bits CoverageImpact O(t) O(t) PathImpact Time (per method call) Space Techniques

Program size: 30 KLOC Trace size: 2 GB

slide-13
SLIDE 13

Outline

  • Dynamic Impact Analysis
  • Existing Techniques
  • Our Technique
  • Empirical Studies
  • Related Work
  • Conclusion
slide-14
SLIDE 14

Empirical Studies

Studies

– Efficiency – Precision

Experimental Setup

Tool: EAT (Execute-After Tool) Subject Programs:

125 33183 2695 355 11 Jaba 90 33183 2695 355 11 Jaba-long 564 3674 219 24 8 Siena Test Cases LOC Methods Classes Versions Program

slide-15
SLIDE 15

EAT (Execute-After Tool) Collecting method-return-into events

Normal return Exceptional return into a catch block Exceptional return into a finally block

Program Instrumented Program EA sequence (arrays F and L) Impact Set

Instrumentation module Runtime monitors Analysis module EAT

instrument execute analyze

slide-16
SLIDE 16

Study 1: Efficiency

Goal: To evaluate relative execution costs for Execute-After

(EA) wrt CoverageImpact (CI) and PathImpact (PI)

Method: Measure time to execute programs on test cases,

gather dynamic data, and output information to disk.

11.49 12.50 108 EA Overhead (%) Running time (ms)

  • ~54,000

~263 PI

  • 6.85

5861 5617 5257 Jaba-long ~12,400 7.18 486 463 432 Jaba ~396 104 110 108 53 Siena PI CI EA CI Uninst. Program

slide-17
SLIDE 17

Study 2: Precision

Goal: To compare the

precision of the three techniques

Method: Measure the

relative sizes of impact sets computed by the techniques.

10 20 30 40 50 60 v0 v1 v2 v3 v4 v5 v6 v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 Siena Jaba Jaba-long CoverageImpact PathImpact Execute-After

50% smaller (250 methods)

slide-18
SLIDE 18

Related Work PathImpact (Law and Rothermel)

based on lightweight dynamic forward slicing

CoverageImpact (Orso et al.)

based on compressed program traces

Online impact analysis (Breech et al.)

compute impact sets online space complexity: x2 time complexity (per method call): O(x)

( x is the number of methods executed)

slide-19
SLIDE 19

Conclusion

Summary

  • identify essential information for dynamic impact analysis
  • present a new, efficient, and precise technique to collect

and analyze that information

  • present a set of empirical studies which show the

efficiency and effectiveness of our technique

Future directions

  • perform studies using the technique in the field
  • perform client-analysis
  • generalization of the technique

– levels of granularity – programming languages

  • apply the technique to other dynamic analyses

– reverse-engineering – recovery of feature interaction

slide-20
SLIDE 20

Thank you. Questions?