Detecting Cycles with DSM

1,675 views
1,448 views

Published on

Detecting Cycles with DSM by J. Laval, ESUG09, Brest, France.

Published in: Technology, Sports
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,675
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
34
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Detecting Cycles with DSM

  1. 1. DETECTING SYSTEM CYCLES WITH DSM Jannik Laval PhD Student - RMod Team http://rmod.lille.inria.fr !"#$
  2. 2. DSM? • Dependency Structural Matrix • How to organize tasks based on their dependencies?
  3. 3. ROADMAP •A cycle? • What is DSM? • Using color for cycle detection • DSM at Work • Advanced features (research)
  4. 4. ROADMAP •A cycle? • What is DSM? • Using color for cycle detection • DSM at Work • Advanced features (research)
  5. 5. A CYCLE •a path which comes back to its origin • between 2 or more elements A B C D
  6. 6. CYCLE PROBLEMS • Dependency logic • Modular? A B • Build dependencies C D
  7. 7. YOU SAID GRAPH?
  8. 8. ROADMAP •A cycle? • What is DSM? • Using color for cycle detection • DSM at Work • Advanced features (research)
  9. 9. DEPENDENCY MATRIX • Origin: process optimization A B C D A x • Appliedto dependency in software B x x reengineering C x x D x • Compact • Support cycle and layer identification
  10. 10. A DEPENDENCY MATRIX A B C D A B A X B X X C X X C D D X A B C D A 0 1 0 0 B 1 0 1 0 C 1 0 0 1 D 0 0 1 0
  11. 11. PACKAGE STRUCTURE WITH DSM A B C D •a cell is a dependency A 2 • information in a cell B 1 2 C 4 8 •a column represents used packages D 1 •a line represents using packages
  12. 12. DEPENDENCIES • Inheritances • Direct class references • Invocations • Extensions
  13. 13. EXTENSIONS • reverse dependencies • structure packages by concerns Network Core Network Core Url String Url asUrl String String asUrl ^ Url new ^ Url new path: self path: self
  14. 14. ROADMAP •A cycle? • What is DSM? • detecting cycles • Using color for cycle detection • DSM at Work • Advanced features (research)
  15. 15. 2 METHODS TO DETECT CYCLES • Squared adjacency matrix • Path searching
  16. 16. SQUARED ADJACENCY MATRIX
  17. 17. SQUARED ADJACENCY MATRIX • Pros • mathematical approach • Cons • blurry cycles • no information about path
  18. 18. PATH SEARCHING
  19. 19. PATH SEARCHING • Pros • information about path • Cons • slow
  20. 20. BLACK AND WHITE NETWORK x x x x x x x x x x x x x 71 3 x 2 1 8 7 6 x 3 • what do we see? x 4 51 2 2 2 x 4 10 4 34 3 x 15 1 x 30 x 2 2 6
  21. 21. ROADMAP •A cycle? • What is DSM? • what about cycles ? • Using color for cycle detection • DSM at Work • Advanced features (research)
  22. 22. FOLDING CYCLES TO FIND LAYERS • When we have cycles we can consider the packages as a single one and continue...
  23. 23. FOLDING ... 1 2 3 4 5 6 7 8 9 10 1 2 3+ 9 10 1 1 2 2 3 71 3 3+ 10 67 4 2 1 8 7 6 9 30 5 3 10 2 8 6 4 51 2 2 2 7 4 10 4 34 3 8 15 1 Layer3 1 2 9 30 Layer2 3+ 10 2 2 6 Layer1 9 10
  24. 24. DSM... • Pros • Cycle spotting • Layer • Cons • Reading • Where to fix first?
  25. 25. ROADMAP •A cycle? • What is DSM? • Using color for cycle detection • DSM at Work • Advanced features (research)
  26. 26. ENHANCEMENT ONE: COLOR A B C D • Direct Cycle in red A X B X X • Indirect cycle in yellow C X 8 • Complexe cycle in pale blue D 1
  27. 27. ENHANCEMENT TWO: DEPENDENCIES • Inheritances • Direct class references • Invocations • Extensions
  28. 28. 1 AN EXAMPLE 2 3 4 5 6 7 8 9 10 1 2 3 71 3 4 2 1 8 7 6 5 3 6 4 51 2 2 2 7 4 10 4 34 3 8 15 1 9 30 10 2 2 6
  29. 29. CLARIFY DEPENDENCIES NetworkTest
  30. 30. DETECT CYCLES
  31. 31. OFFER PROGNOSTIC
  32. 32. DISYMMETRIC • Remove ? • Reverse links ? • ???
  33. 33. SYMMETRIC • Merge ? • Make two different packages ? • ???
  34. 34. ROADMAP •A cycle? • What is DSM? • Using color for cycle detection • DSM at Work • Seaside 2.9 (no cycle....) • Pharo • Advanced features (research)
  35. 35. SEASIDE 2.9
  36. 36. PHARO
  37. 37. ROADMAP •A cycle? • What is DSM? • Using color for cycle detection • DSM at Work • Advanced features (research)
  38. 38. EDSM P3 Tot Inh Acc Msg Ext Source P1 C A B D' P1 B A C D' P2 Z X Y D X Y Z D Target P2 P4 Background color: cycle
  39. 39. EXAMPLE OF A CELL
  40. 40. DETAILED INFORMATION Classes in Morphic-Basic Classes in Morphic-Widgets use classes in Morphic-Widgets use classes in Morphic-Basic
  41. 41. DSM IN SOFTWARE REENGINEERING • Clarify dependencies • Detect cycles • Offer prognostic (pink/red) • Lattix (www.lattix.com) • http://moose.unibe.ch/

×