The Anatomy of Analysis Tools (EVO 2008)

2,202 views

Published on

I used this set of slides for a lecture I gave at the University of Berne.

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

No Downloads
Views
Total views
2,202
On SlideShare
0
From Embeds
0
Number of Embeds
46
Actions
Shares
0
Downloads
79
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

The Anatomy of Analysis Tools (EVO 2008)

  1. The anatomy of analysis tools Tudor Gîrba www.tudorgirba.com
  2. 003 , Du casse 2 Lanza
  3. mplem ented? ow is it i H 003 , Du casse 2 Lanza
  4. But, why should you care?
  5. a natomy nd our rocess ndersta ealing p n we u r the h Whe d bette we un derstan
  6. Terminology
  7. what is a model?
  8. exemplar example good example simulation role model poser fashion model model variety manakin sort mannikin manikin form mannequin theoretical account kind modeling framework modelling
  9. a model is a simplification of the subject, and its purpose is to answer some particular questions aimed towards the subject. in, Ger be 2001 Beziv
  10. what does meta mean?
  11. μετά = beyond
  12. Aristotle 384 BC - 322 BC
  13. what is a meta-model?
  14. a meta-model is a model that makes statements about what can be expressed in valid models. Seidew itz 2003
  15. meta-model model subject
  16. meta-model model representedBy subject
  17. meta-model instanceOf model representedBy subject
  18. schema instanceOf database representedBy subject
  19. class instanceOf object representedBy subject
  20. meta-model instanceOf model representedBy subject
  21. Terminology Analysis and meta-models
  22. What is an analysis?
  23. TCC = ?
  24. method pairs accessing common attributes TCC = total number of pairs TCC = 2 / 10 = 0.2 5 man, K ang, 199 Bie
  25. What is an analysis?
  26. analysis |əˈnaləsis| noun (pl. -ses |-ˌsēz|) Detailed examination of the elements or structure of something, typically as a basis for discussion or interpretation. The process of separating something into its constituent elements. Often contrasted with synthesis. y D ictionar Oxford
  27. synthesis |ˈsinθəsis| noun ( pl. -ses |-ˌsēz|) Combination or composition. Often contrasted with analysis. y D ictionar Oxford
  28. Analysis Data Information
  29. TCC = ?
  30. tightClassCohesion (classSource) count = 0 methodCount = methodBodies(classSource) attributes = attributes(classSource) methodsToAttributes = new Dictionary for (methodBody in methodBodies(classSource)) accessedAttributes = new Set for (statement in methodBody) accessedAttributes.add(attributesIn(statement)) end methodsToAttributes.put(methodBody, accessedAttributes) end for (methodToAttributes in methodsToAttributes) for (attribute in methodToAttributes.value) for (methodToAttributes2 in methodsToAttributes) if (methodToAttributes.value.contains(attribute) & methodToAttributes ~= methodToAttributes2) count++ end end end end return count / methodCount * (methodCount - 1) / 2 end
  31. tightClassCohesion (classSource) count = 0 methodCount = methodBodies(classSource) attributes = attributes(classSource) methodsToAttributes = new Dictionary for (methodBody in methodBodies(classSource)) accessedAttributes = new Set for (statement in methodBody) accessedAttributes.add(attributesIn(statement)) end methodsToAttributes.put(methodBody, accessedAttributes) end for (methodToAttributes in methodsToAttributes) for (attribute in methodToAttributes.value) for (methodToAttributes2 in methodsToAttributes) if (methodToAttributes.value.contains(attribute) & methodToAttributes ~= methodToAttributes2) count++ end end end end return count / methodCount * (methodCount - 1) / 2 end
  32. Class::tightClassCohesion () count = 0 methodCount = this.methods.size() for (attribute in this.attributes) temp = attribute.accessingMethods() count = count + temp * (temp - 1) / 2 end return count / methodCount * (methodCount - 1) / 2 end
  33. Class::tightClassCohesion () count = 0 methodCount = this.methods.size() for (attribute in this.attributes) temp = attribute.accessingMethods() count = count + temp * (temp - 1) / 2 end return count / methodCount * (methodCount - 1) / 2 end Class belongsTo belongsTo * * Method Attribute
  34. Class::tightClassCohesion () count = 0 methodCount = this.methods.size() for (attribute in this.attributes) temp = attribute.accessingMethods() count = count + temp * (temp - 1) / 2 end return count / methodCount * (methodCount - 1) / 2 end Class belongsTo belongsTo * ? * Method Attribute
  35. A good meta-model enables easy navigation Package Namespace packagedIn belongsTo * * superclass * Class Inheritance subclass * belongsTo belongsTo * * * invokedBy Invocation Method Attribute * candidate accessedIn accesses * * Access
  36. A meta-model offers a language
  37. A common meta-model offers a common language
  38. (FAMIX.Class (id: 100) (name 'Server') (container (ref: 82)) (isAbstract false) (isInterface false) (package (ref: 624)) (stub false) (NOM 9) (WLOC 124)) (FAMIX.Method (id: 101) (name 'accept') (signature 'accept(Visitor v)') (parentClass (ref: 100)) (accessControl 'public') (hasClassScope false) (stub false) (LOC 7) (CYCLO 3))
  39. a com mon t imple ment ange odels ools th a m T l can e xch (FAMIX.Class (id: 100) (name 'Server') meta-mode (container (ref: 82)) (isAbstract false) (isInterface false) (package (ref: 624)) (stub false) (NOM 9) (WLOC 124)) (FAMIX.Method (id: 101) (name 'accept') (signature 'accept(Visitor v)') (parentClass (ref: 100)) (accessControl 'public') (hasClassScope false) (stub false) (LOC 7) (CYCLO 3))
  40. ta-mo del can ified o n a me nalyse s spec lying m odel A ied onany comp b e appl
  41. Method Class Attribute Inheritance
  42. Method Class Attribute Inheritance File
  43. Method Class Attribute Inheritance File Symbol
  44. Author Method Class Attribute Inheritance File Symbol
  45. Duplication Author Method Class Attribute Inheritance File Symbol
  46. Class History Class Duplication Author Version Method Class Attribute Inheritance File Symbol
  47. Class History Class Duplication Author Version Method Class Attribute Event Inheritance File Trace Symbol
  48. ... Class History Class Duplication Author Version Method Class Attribute Event Inheritance File Trace Symbol
  49. A good meta-model makes things explicit
  50. Terminology Analysis and meta-models Analysis tools
  51. Analysis Analysis Analysis Model repository described by a meta-model Fact extractor Fact extractor
  52. Repository FAMIX Fame UI Mondrian EyeSee
  53. Repository FAMIX Fame UI Mondrian EyeSee MSE Smalltalk
  54. Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  55. Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  56. Yellow Chronia CodeCity DynaMoose Hapax SmallDude Submarine Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  57. CVS J-Wiretap MSE Source SVN Yellow Chronia CodeCity DynaMoose Hapax SmallDude Submarine Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  58. CVS J-Wiretap MSE Source SVN Softwarenaut BugsLife Clustering Metanool ... Yellow Chronia CodeCity DynaMoose Hapax SmallDude Submarine Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  59. Terminology Analysis and meta-models Analysis tools Analysis as transformation
  60. Analysis Data Information
  61. Analysis Meta-model Glue Technique
  62. e.g., Mondrian tal 2006 Meyer e
  63. Mondrian is about visualization
  64. Composition with Red,Yellow and Blue Piet Mondrian (1921)
  65. The simplest script is an empty view view := ViewRenderer new. view open.
  66. view = nodes, edges, layout view := ViewRenderer new. view nodes: classes. view edges: classes from: [:each | each superclass] to: [:each | each]. view treeLayout. view open.
  67. Shapes are responsible for drawing view := ViewRenderer new. view newShape rectangle; height: [:each | each numberOfMethods]; withBorder. view nodes: classes. view edges: classes from: [:each | each superclass] to: [:each | each]. view treeLayout. view open.
  68. Blocks can be replaced by symbols view := ViewRenderer new. view newShape rectangle; height: #numberOfMethods; withBorder. view nodes: classes. view edgesFrom: #superclass. view treeLayout. view open.
  69. Nesting is done through blocks view := ViewRenderer new. view newShape rectangle; withBorder. view nodes: classes forEach: [:each | view nodes: each methods. view gridLayout ]. view edgesFrom: #superclass. view treeLayout. view open.
  70. Mondrian is about visualization
  71. Mondrian is about interactive visualization
  72. Interaction is scriptable, too view := ViewRenderer new. view2 := ViewRenderer new. view interaction onSelect: [:each | each viewOn: view2]. view interaction popupView: [:each :aView | each viewOn: aView]. ... view open. view2 open.
  73. mplem ented? ow is it i H
  74. le; re ctang ds; new Shape Of Metho view : #n umber ibute s; de he ight rOf Attr ne sOfCo numbe e rOfLi s; wid th: # r: #numb : c lasse il lColo w ithin li nearF er. wit hBord s. c lasse s. no des: uperclas view ro m: #s e dgesF view ut. re eLayo v iew t
  75. Terminology Analysis and meta-models Analysis tools Analysis as transformation Issues
  76. meta-model What to model? model subject
  77. meta-model another meta-model model another model subject
  78. meta-model model What gets extracted? subject
  79. Is the technique suitable for your task?
  80. The meta-model dictates the problem decomposition
  81. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/

×