extracting sequence diagrams from execution traces using interactive visualization

Post on 01-Jan-2016

40 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Extracting Sequence Diagrams from Execution Traces using Interactive Visualization. Hassen Grati, Houari Sahraoui, Pierre Poulin DIRO, Université de Montréal. Example of Design Diagram. Corresponding Automated- RE Diagram. Presentation Agenda. Context and motivation Overview - PowerPoint PPT Presentation

TRANSCRIPT

Hassen Grati, Houari Sahraoui, Pierre Poulin

DIRO, Université de Montréal

Extracting Sequence Diagrams from Execution Traces using Interactive Visualization

2

Example of Design Diagram

3

Corresponding Automated- RE Diagram

4

Presentation Agenda

• Context and motivation

• Overview

• Trace generation and combination

• Sequence diagram extraction

• Evaluation

5

Context and Motivation

• Reverse engineering of analysis and design models– Comprehension– Migration– Maintenance

• Mature work on static model extraction– Integrated in commercial tools– Still few challenges

• Relationship recovery and scope definition

6

Context and Motivation

• Difficulty to extract behavioral models– Static analysis

• Dynamic language features

– Dynamic analysis• Implementation details• Specificity to an execution trace

• Proposal– Semi-automated reverse engineering with

interactive visualization

7

Overview• Objective and working hypothesis

– Extraction of sequence diagrams for the purpose of redocumentation for existing use case scenarios

Use−caseScenarios

SourceCode

UserInput

Combined Trace

Generation of Execution Traces

T1

T3T2

Combination of Execution Traces

Interactive Visualization

SequenceDiagram

8

Trace Generation and Combination

• Generating traces from a scenario– Determination of execution variants – Code Instrumentation

• Method body, loop block, conditional block

– Example1 _, PanelDraw [21668571], _, StartDraw [T1M1], _

2 PanelDraw [21668571], Figure [3916193], StartDraw [T1M1], Figure [T1M2], _

9 PanelDraw [21668571], Circle [17282414], StartDraw [T1M1], Circle [T1M9], <%(State.getFiguretype()==MODE_CERCLE)%>

9

Trace Generation and Combination

• Combining traces– Recursive alignment of call-tree nodes– For each pair of aligned methods, enclosed

sequence of method calls are compared– Sequence alignment using the Smith-

Waterman algorithm

10

Trace Generation and Combination

• Combining traces– Example

11

Trace Generation and Combination

• Combining traces– Example

12

Sequence Diagram Extraction

• Extraction = set of successive interaction cycles

• Each cycle – Automated basic transformations– User interactions using interaction views

13

Sequence Diagram Extraction

• Automated basic transformations– Messages = method calls– Participants = call sender and receiver– opt/alt/loop boxes = conditional/loop

stacks – Return messages extracted from the

tree structure

14

Sequence diagram Extraction

• User interactions using interaction views– Global view

• Messages

15

Sequence Diagram Extraction

• User interactions using interaction views– Global view

• Placement

16

Sequence Diagram Extraction

• User interactions using interaction views– Global view

• Placement

17

Sequence Diagram Extraction

• User interactions using interaction views– Diagram view

18

Sequence Diagram Extraction

• User interactions using interaction views– Interactions

• Navigation

19

Sequence Diagram Extraction

• User interactions using interaction views– Interactions

• Renaming objects and messages• Removing objects and messages

– Tree pruning– Node removal

• Recommending fragment merges– Finding recommendations during trace alignments– Based on polymorphism

20

Sequence Diagram Extraction

• User interactions using interaction views• Recommending fragment merges

21

Evaluation• Setting

– ATM simulation system• 24 Java classes• www.math-cs.gordon.edu/local/courses/cs211/ATMExample/

– Three use-case scenarios • Session, Deposit, and Withdraw

– Three sequence diagrams per scenario• Design diagram (DD)• Diagram extracted automatically (ATD) [Briand et al., 03]

• Diagram extracted using interactive visualization (IVD)

22

Evaluation• Results

– Participants

23

Evaluation• Results

– Messages

24

Conclusions

• Semi-automated approach– Dynamic analysis– Interactive visualization– Recommendations

• Evaluation on a benchmark– Concise diagrams with better precision

and less implementation details– Acceptable interaction time

25

Limitations & Future Work

• Improve scalability of the global view

• Improve the recommendation module– Incremental learning

• Apply IV to the reverse engineering of other dynamic models– State diagram– Activity diagram

26

Thank you

27

Additional Slides

28

Session Scenario

29

Session Scenario

30

Session Scenario

top related