Collaborative and practical reverse engineering research with Moose

3,123 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
3,123
On SlideShare
0
From Embeds
0
Number of Embeds
65
Actions
Shares
0
Downloads
44
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Collaborative and practical reverse engineering research with Moose

  1. 1. Collaborative and practical reverse engineering research with Moose Tudor Gîrba www.tudorgirba.com
  2. 2. fo rw g rin ar ee d gin en gin en ee se rin erv g re { { { { { { } { { } } actual development } } } { } } }
  3. 3. Moose is built in Bern
  4. 4. Moose is built in Bern
  5. 5. used for research in several universities ~100 men years of effort >130 publications since 1997
  6. 6. an analysis tool
  7. 7. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  8. 8. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  9. 9. Metrics compress systems into numbers. NOM number of methods LOC number of lines of code CYCLO McCabe cyclomatic complexity TCC tight class cohesion ... Lorentz, Kidd, 1994 Chidamber, 1994 McCabe 1977
  10. 10. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  11. 11. Queries reduce the analysis space.
  12. 12. Detection Strategies are metric-based queries to detect design flaws. Lanza, Marinescu 2006 Rule 1 METRIC 1 > Threshold 1 AND Quality problem Rule 2 METRIC 2 < Threshold 2
  13. 13. Example: a God Class centralizes too much intelligence in the system. Class uses directly more than a few attributes of other classes ATFD > FEW Functional complexity of the class is very high AND GodClass WMC ! VERY HIGH Class cohesion is low TCC < ONE THIRD Lanza, Marinescu, 2006
  14. 14. We can always resort to Smalltalk for querying.
  15. 15. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  16. 16. Visualization compresses the system into pictures.
  17. 17. Polymetric views show up to 5 metrics. Lanza, 2003 Width metric Height metric Position metrics Color metric
  18. 18. System Complexity shows class hierarchies. Lanza, Ducasse, 2003 attributes methods lines
  19. 19. Class Blueprint shows class internals. Ducasse, Lanza, 2005 twin classes schizophrenic class
  20. 20. Package Blueprint shows how classes are used across packages. Ducasse etal, 2007 a sumo package
  21. 21. Distribution Map shows properties over structure. Ducasse etal, 2006 31 parts, 394 elements and 9 properties
  22. 22. Semantic Clustering reveals implementation topics. Kuhn etal 2006 user, run, load, message, file, buffer, util property, AWT, edit, show, update, sp, set start, buffer, end, text, length, line, count action, box, component, event, button, layout, GUI start, length, integer, end, number, pre, count XML, dispatch, microstar, reader, XE, register, receive current, buffer, idx, review, archive, endr, TAR BSH, simple, invocation, assign, untype, general, arbitrary maximum, label, link, item, code, put, vector 9 concepts spread over 394 classes
  23. 23. Softwarenaut explores the package structure. Lungu etal, 2006
  24. 24. Code City shows where your code lives. Wettel, Lanza, 2007 classes are buildings grouped in quarters of packages
  25. 25. Trace Signals reveal similar execution traces. Kuhn, Greevy 2006 lines show traces and colors denote concepts
  26. 26. Feature Views show how features cover classes. Greevy etal, 2006 boxes are features and squares are classes colored by activity addFolder addPage
  27. 27. Object Dependencies show how features depend on each other. Lienhard etal, 2007 Open Join Channel Connect Send Message dependencies between objects and their age measured in features
  28. 28. Object Flow shows how objects move through the system. Lienhard etal, 2007 objects flowing through other objects
  29. 29. Hierarchy Evolution reveals evolution patterns. Girba etal, 2005 histories of classes and of their inheritances
  30. 30. Evolution Radar shows co-change relationships. D’Ambros, Lanza 2006 one package and its co-change relationships
  31. 31. Ownership Map reveals patterns in CVS. Girba etal, 2006
  32. 32. Clone Evolution shows who copied from whom. Balint etal, 2006 colors represent authors
  33. 33. McCabe = 21 NOM 0 = 102 3 ,00 75 = C LO Metrics Queries Visualizations ... { { { { } } } } { }
  34. 34. McCabe = 21 NOM 0 = 102 3 ,00 75 = C ... LO Metrics Queries Visualizations { { { { } } } } { }
  35. 35. an analysis tool
  36. 36. an analysis tool a platform for modeling
  37. 37. FAMIX is a language independent meta-model. Package Namespace packagedIn belongsTo * * superclass Class Inheritance subclass belongsTo belongsTo * * invokedBy Invocation Method Attribute candidate accessedIn accesses * * Access
  38. 38. FAMIX ... Class Method
  39. 39. Dynamix ... Instance Activation FAMIX ... Class Method
  40. 40. Dynamix ObjectFlow ... Instance Activation ... Alias FAMIX ... Class Method
  41. 41. Dynamix ObjectFlow ... Instance Activation ... Alias FAMIX Dude ... Class Method ... Duplication
  42. 42. Dynamix ObjectFlow ... Instance Activation ... Alias CVS FAMIX Dude File File ... ... Class Method ... Duplication History Version
  43. 43. BugsLife Dynamix ObjectFlow ... Bug Activity ... Instance Activation ... Alias CVS FAMIX Dude File File ... ... Class Method ... Duplication History Version
  44. 44. BugsLife Dynamix ObjectFlow ... Bug Activity ... Instance Activation ... Alias CVS FAMIX Dude File File ... ... Class Method ... Duplication History Version Hismo Class Method ... History History
  45. 45. BugsLife Dynamix ObjectFlow ... Bug Activity ... Instance Activation ... Alias CVS FAMIX Dude File File ... ... Class Method ... Duplication History Version Subversion Hismo File File Class Method ... ... History Version History History
  46. 46. BugsLife Dynamix ObjectFlow ... Bug Activity ... Instance Activation ... Alias CVS FAMIX Dude File File ... ... Class Method ... Duplication History Version Subversion Hismo ... File File Class Method ... ... ... History Version History History
  47. 47. BugsLife Dynamix ObjectFlow ... Bug Activity FAMIX is now ... more than a Instance Activation ... Alias language independent meta-model CVS FAMIX Dude File File ... ... Class Method ... Duplication History Version Subversion Hismo ... File File Class Method ... ... ... History Version History History
  48. 48. BugsLife Dynamix ObjectFlow ... Bug Activity ... Instance Activation ... Alias CVS FAMIX Core Dude File File ... ... Class Method ... Duplication History Version Subversion Hismo ... File File Class Method ... ... ... History Version History History
  49. 49. FAMIX BugsLife Dynamix ObjectFlow ... Bug Activity ... Instance Activation ... Alias CVS FAMIX Core Dude File File ... ... Class Method ... Duplication History Version Subversion Hismo ... File File Class Method ... ... ... History Version History History
  50. 50. FAMIX BugsLife Dynamix ObjectFlow ... Bug Activity ... Instance Activation ... Alias We are now working on FAMIX 3.0. CVS FAMIX Core Dude File File ... ... Class Method ... Duplication History Version Would you like to join? Subversion Hismo ... File File Class Method ... ... ... History Version History History
  51. 51. MSE is the exchange file format.
  52. 52. Moose is based on Fame :)
  53. 53. Where to get Fame from? VisualWorks just download Moose Java http://smallwiki.unibe.ch/fame/ Python http://smallwiki.unibe.ch/fame/
  54. 54. an analysis tool a platform for modeling
  55. 55. an analysis tool a platform for modeling a platform for visualization
  56. 56. Mondrian is an engine for scripting graph visualizations. Meyer etal 2006 view := ViewRenderer new. view nodes: classes forEach: [:each | view nodes: each methods. view gridLayout]. view edgesFrom: #superclass. view treeLayout. view open.
  57. 57. EyeSee is an engine for scripting charts. Junker, Hofstetter 2007
  58. 58. CodeCity is an engine for 3D visualizations. Wettel, Lanza, 2007
  59. 59. an analysis tool a platform for modeling a platform for visualization
  60. 60. an analysis tool a platform for modeling a platform for visualization a platform for building tools
  61. 61. FAMIX Repository Meta UI Mondrian EyeSee Core
  62. 62. FAMIX Repository Meta UI Mondrian EyeSee Core Java External MSE Smalltalk Parser C++
  63. 63. Chronia Cook CodeCity DynaMoose Hapax Softwarenaut SmallDude FAMIX Repository Meta UI Mondrian EyeSee Core Java External MSE Smalltalk Parser C++
  64. 64. CVS J-Wiretap MSE Source Chronia Cook CodeCity DynaMoose Hapax Softwarenaut SmallDude FAMIX Repository Meta UI Mondrian EyeSee Core Java External MSE Smalltalk Parser C++
  65. 65. CVS J-Wiretap MSE Source BugsLife Clustering Concept Analysis Yellow Submarine ... Chronia Cook CodeCity DynaMoose Hapax Softwarenaut SmallDude FAMIX Repository Meta UI Mondrian EyeSee Core Java External MSE Smalltalk Parser C++
  66. 66. an analysis tool a platform for modeling a platform for visualization a platform for building tools
  67. 67. an analysis tool a platform for modeling a platform for visualization a platform for building tools a collaboration
  68. 68. Current Team Previous Team Stéphane Ducasse Serge Demeyer Tudor Gîrba Michele Lanza Adrian Kuhn Sander Tichelaar Toon Verwaest Current Contributors Previous Contributors Hani Abdeen Ilham Alloui Tobias Aebi Frank Buchli Gabriela Arevalo Mihai Balint Thomas Bühler Calogero Butera Philipp Bunge Marco D’Ambros Daniel Frey Georges Golomingi Orla Greevy Markus Hofstetter David Gurtner Reinout Heeck Matthias Junker Adrian Lienhard Markus Kobel Michael Locher Martin von Löwis Mircea Lungu Pietro Malorgio Michael Meer Michael Meyer Damien Pollet Laura Ponisio Daniel Ratiu Sara Sellos Lucas Streit Matthias Rieger Azadeh Razavizadeh Toon Verwaest Roel Wuyts Andreas Schlapbach Daniel Schweizer Richard Wettel Mauricio Seeberger Lukas Steiger Daniele Talerico Herve Verjus Violeta Voinescu.
  69. 69. Current Team Previous Team Stéphane Ducasse Serge Demeyer Tudor Gîrba Michele Lanza Adrian Kuhn Sander Tichelaar Toon Verwaest Current Contributors menPrevious Contributors ~ 100 years Hani Abdeen Ilham Alloui Tobias Aebi Frank Buchli Gabriela Arevalo Mihai Balint Thomas Bühler Calogero Butera Philipp Bunge Marco D’Ambros Daniel Frey Georges Golomingi Orla Greevy Markus Hofstetter David Gurtner Reinout Heeck Matthias Junker Adrian Lienhard Markus Kobel Michael Locher Martin von Löwis Mircea Lungu Pietro Malorgio Michael Meer Michael Meyer Damien Pollet Laura Ponisio Daniel Ratiu Sara Sellos Lucas Streit Matthias Rieger Azadeh Razavizadeh Toon Verwaest Roel Wuyts Andreas Schlapbach Daniel Schweizer Richard Wettel Mauricio Seeberger Lukas Steiger Daniele Talerico Herve Verjus Violeta Voinescu.
  70. 70. an analysis tool a platform for modeling a platform for visualization a platform for building tools a collaboration
  71. 71. id ea an analysis tool an a platform for modeling a platform for visualization a platform for building tools a collaboration
  72. 72. id ea an analysis tool an a platform for modeling a platform for visualization a platform for building tools a collaboration
  73. 73. moose.unibe.ch
  74. 74. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/

×