SlideShare a Scribd company logo
1 of 85
Download to read offline
The anatomy of analysis tools



Tudor Gîrba
www.tudorgirba.com
003
        , Du casse 2
Lanza
mplem ented?
 ow is   it i
H




                                                  003
                                     , Du casse 2
                             Lanza
But, why should you care?
a natomy
                           nd our rocess
                    ndersta ealing p
             n we u r the h
       Whe
                d bette
we   un derstan
Terminology
what is a   model?
exemplar
                               example
             good example
                                            simulation


    role model                                        poser




fashion model
                            model                                 variety
 manakin
                                                                        sort
  mannikin

      manikin                                                         form
       mannequin
                                         theoretical account   kind
                 modeling         framework
                        modelling
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
what does   meta mean?
μετά = beyond
Aristotle
384 BC - 322 BC
what is a   meta-model?
a meta-model is
a model that makes statements about

what can be expressed in valid models.




                                Seidew itz 2003
meta-model




  model



 subject
meta-model




  model

      representedBy
 subject
meta-model

      instanceOf
  model

      representedBy

 subject
schema
     instanceOf

database
     representedBy

 subject
class
    instanceOf

object
    representedBy

subject
meta-model

      instanceOf

  model

      representedBy

 subject
Terminology
Analysis and meta-models
What is an analysis?
TCC = ?
method pairs accessing common attributes
TCC =                        total number of pairs




        TCC = 2 / 10 = 0.2




                                                                       5
                                                        man, K ang, 199
                                                     Bie
What is an analysis?
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
synthesis |ˈsinθəsis|
noun ( pl. -ses |-ˌsēz|)

Combination or composition. Often contrasted with
analysis.




                                                                y
                                                   D ictionar
                                            Oxford
Analysis
Data              Information
TCC = ?
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
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
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::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
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
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
A  meta-model offers
a language
A common meta-model offers
a common language
(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))
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))
ta-mo  del can
                ified o n a me
  nalyse s spec                 lying m odel
A
           ied onany      comp
  b e appl
Method     Class       Attribute


         Inheritance
Method     Class       Attribute


         Inheritance     File
Method     Class       Attribute


         Inheritance     File


                       Symbol
Author



Method     Class       Attribute


         Inheritance     File


                       Symbol
Duplication                 Author



 Method         Class       Attribute


              Inheritance     File


                            Symbol
Class
               History

                Class
Duplication                 Author
               Version


 Method         Class       Attribute


              Inheritance     File


                            Symbol
Class
               History

                Class
Duplication                 Author
               Version


 Method         Class       Attribute


  Event       Inheritance     File


  Trace                     Symbol
...         Class
               History

                Class
Duplication                 Author
               Version


 Method         Class       Attribute


  Event       Inheritance     File


  Trace                     Symbol
A good meta-model makes things   explicit
Terminology
Analysis and meta-models
Analysis tools
Analysis           Analysis           Analysis



Model repository described by a meta-model



  Fact extractor              Fact extractor
Repository   FAMIX   Fame   UI   Mondrian   EyeSee
Repository   FAMIX   Fame   UI         Mondrian       EyeSee




                                 MSE              Smalltalk
Repository   FAMIX      Fame   UI         Mondrian       EyeSee




   Java
              iPlasma               MSE              Smalltalk
  C++
Repository   FAMIX      Fame   UI         Mondrian       EyeSee




   Java
              iPlasma               MSE              Smalltalk
  C++
Yellow
Chronia      CodeCity      DynaMoose   Hapax       SmallDude
                                                                  Submarine




Repository      FAMIX        Fame       UI          Mondrian       EyeSee




   Java
                 iPlasma                     MSE               Smalltalk
   C++
CVS         J-Wiretap        MSE             Source                  SVN




                                                                     Yellow
Chronia      CodeCity       DynaMoose   Hapax       SmallDude
                                                                   Submarine




Repository       FAMIX        Fame       UI          Mondrian       EyeSee




   Java
                  iPlasma                     MSE               Smalltalk
   C++
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++
Terminology
Analysis and meta-models
Analysis tools
Analysis as transformation
Analysis
Data              Information
Analysis

Meta-model   Glue   Technique
e.g., Mondrian




                         tal 2006
                 Meyer e
Mondrian is about
visualization
Composition with Red,Yellow and Blue
       Piet Mondrian (1921)
The simplest script is an empty view


view := ViewRenderer new.
view open.
view = nodes, edges, layout


view := ViewRenderer new.
view nodes: classes.
view edges: classes
     from: [:each | each superclass]
     to: [:each | each].
view treeLayout.
view open.
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.
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.
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.
Mondrian is about
visualization
Mondrian is about
interactive visualization
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.
mplem ented?
 ow is   it i
H
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
Terminology
Analysis and meta-models
Analysis tools
Analysis as transformation
Issues
meta-model   What to model?


  model



 subject
meta-model   another meta-model




  model        another model




 subject
meta-model




  model

             What gets extracted?
 subject
Is the technique suitable for your task?
The meta-model dictates the problem decomposition
Tudor Gîrba
       www.tudorgirba.com




creativecommons.org/licenses/by/3.0/

More Related Content

What's hot

Refactoring-ch7 moving feature btw objects
Refactoring-ch7 moving feature btw objectsRefactoring-ch7 moving feature btw objects
Refactoring-ch7 moving feature btw objectsfungfung Chen
 
object oriented programming language by c++
object oriented programming language by c++object oriented programming language by c++
object oriented programming language by c++Mohamad Al_hsan
 
Clojure Interoperability
Clojure InteroperabilityClojure Interoperability
Clojure Interoperabilityrik0
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Guillaume Laforge
 
Metaprogramming
MetaprogrammingMetaprogramming
Metaprogrammingjoshbuddy
 
Active Support Core Extensions (1)
Active Support Core Extensions (1)Active Support Core Extensions (1)
Active Support Core Extensions (1)RORLAB
 
Lecture 4_Java Method-constructor_imp_keywords
Lecture   4_Java Method-constructor_imp_keywordsLecture   4_Java Method-constructor_imp_keywords
Lecture 4_Java Method-constructor_imp_keywordsmanish kumar
 
Maintainable code
Maintainable codeMaintainable code
Maintainable codeRiverGlide
 
Unit3 jwfiles
Unit3 jwfilesUnit3 jwfiles
Unit3 jwfilesmrecedu
 
If2036 class based-modeling
If2036 class based-modelingIf2036 class based-modeling
If2036 class based-modelingmetciankcemuah
 
Overcoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And ArchitectureOvercoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And ArchitecturePeter Friese
 
Clean code - Agile Software Craftsmanship
Clean code - Agile Software CraftsmanshipClean code - Agile Software Craftsmanship
Clean code - Agile Software CraftsmanshipYukti Kaura
 
Pitfalls In Aspect Mining
Pitfalls In Aspect MiningPitfalls In Aspect Mining
Pitfalls In Aspect Miningkim.mens
 
Decaf language specification
Decaf language specificationDecaf language specification
Decaf language specificationSami Said
 
An Introduction to SPL, the Standard PHP Library
An Introduction to SPL, the Standard PHP LibraryAn Introduction to SPL, the Standard PHP Library
An Introduction to SPL, the Standard PHP LibraryRobin Fernandes
 

What's hot (20)

Refactoring-ch7 moving feature btw objects
Refactoring-ch7 moving feature btw objectsRefactoring-ch7 moving feature btw objects
Refactoring-ch7 moving feature btw objects
 
Python lecture 8
Python lecture 8Python lecture 8
Python lecture 8
 
object oriented programming language by c++
object oriented programming language by c++object oriented programming language by c++
object oriented programming language by c++
 
Clojure Interoperability
Clojure InteroperabilityClojure Interoperability
Clojure Interoperability
 
Object oriented programming in python
Object oriented programming in pythonObject oriented programming in python
Object oriented programming in python
 
Object-oriented Basics
Object-oriented BasicsObject-oriented Basics
Object-oriented Basics
 
Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007Groovy Update - JavaPolis 2007
Groovy Update - JavaPolis 2007
 
Metaprogramming
MetaprogrammingMetaprogramming
Metaprogramming
 
Active Support Core Extensions (1)
Active Support Core Extensions (1)Active Support Core Extensions (1)
Active Support Core Extensions (1)
 
Lecture 4_Java Method-constructor_imp_keywords
Lecture   4_Java Method-constructor_imp_keywordsLecture   4_Java Method-constructor_imp_keywords
Lecture 4_Java Method-constructor_imp_keywords
 
Maintainable code
Maintainable codeMaintainable code
Maintainable code
 
Unit3 jwfiles
Unit3 jwfilesUnit3 jwfiles
Unit3 jwfiles
 
C Language Unit-3
C Language Unit-3C Language Unit-3
C Language Unit-3
 
If2036 class based-modeling
If2036 class based-modelingIf2036 class based-modeling
If2036 class based-modeling
 
Ruby Internals
Ruby InternalsRuby Internals
Ruby Internals
 
Overcoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And ArchitectureOvercoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And Architecture
 
Clean code - Agile Software Craftsmanship
Clean code - Agile Software CraftsmanshipClean code - Agile Software Craftsmanship
Clean code - Agile Software Craftsmanship
 
Pitfalls In Aspect Mining
Pitfalls In Aspect MiningPitfalls In Aspect Mining
Pitfalls In Aspect Mining
 
Decaf language specification
Decaf language specificationDecaf language specification
Decaf language specification
 
An Introduction to SPL, the Standard PHP Library
An Introduction to SPL, the Standard PHP LibraryAn Introduction to SPL, the Standard PHP Library
An Introduction to SPL, the Standard PHP Library
 

Similar to The Anatomy of Analysis Tools (EVO 2008)

Generic Programming
Generic ProgrammingGeneric Programming
Generic ProgrammingPingLun Liao
 
Using class and object java
Using class and object javaUsing class and object java
Using class and object javamha4
 
11 Using classes and objects
11 Using classes and objects11 Using classes and objects
11 Using classes and objectsmaznabili
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classesKumar
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesCoen De Roover
 
Recommending Method Invocation Context Changes
Recommending Method Invocation Context ChangesRecommending Method Invocation Context Changes
Recommending Method Invocation Context ChangesBeat Fluri
 
Metaprogramming in Scala 2.10, Eugene Burmako,
Metaprogramming  in Scala 2.10, Eugene Burmako, Metaprogramming  in Scala 2.10, Eugene Burmako,
Metaprogramming in Scala 2.10, Eugene Burmako, Vasil Remeniuk
 
Taxonomy of Scala
Taxonomy of ScalaTaxonomy of Scala
Taxonomy of Scalashinolajla
 
اسلاید جلسه ۹ کلاس پایتون برای هکر های قانونی
اسلاید جلسه ۹ کلاس پایتون برای هکر های قانونیاسلاید جلسه ۹ کلاس پایتون برای هکر های قانونی
اسلاید جلسه ۹ کلاس پایتون برای هکر های قانونیMohammad Reza Kamalifard
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in PythonSujith Kumar
 
The Dark Side of Objective-C
The Dark Side of Objective-CThe Dark Side of Objective-C
The Dark Side of Objective-CMartin Kiss
 
Dive into Python Class
Dive into Python ClassDive into Python Class
Dive into Python ClassJim Yeh
 
PythonOO.pdf oo Object Oriented programming
PythonOO.pdf oo Object Oriented programmingPythonOO.pdf oo Object Oriented programming
PythonOO.pdf oo Object Oriented programmingKhadijaKhadijaAouadi
 

Similar to The Anatomy of Analysis Tools (EVO 2008) (20)

Generic Programming
Generic ProgrammingGeneric Programming
Generic Programming
 
Talking to your IDE
Talking to your IDETalking to your IDE
Talking to your IDE
 
Go <-> Ruby
Go <-> RubyGo <-> Ruby
Go <-> Ruby
 
Using class and object java
Using class and object javaUsing class and object java
Using class and object java
 
11 Using classes and objects
11 Using classes and objects11 Using classes and objects
11 Using classes and objects
 
Php object orientation and classes
Php object orientation and classesPhp object orientation and classes
Php object orientation and classes
 
A recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templatesA recommender system for generalizing and refining code templates
A recommender system for generalizing and refining code templates
 
Recommending Method Invocation Context Changes
Recommending Method Invocation Context ChangesRecommending Method Invocation Context Changes
Recommending Method Invocation Context Changes
 
ASE02 DMP.ppt
ASE02 DMP.pptASE02 DMP.ppt
ASE02 DMP.ppt
 
Metaprogramming in Scala 2.10, Eugene Burmako,
Metaprogramming  in Scala 2.10, Eugene Burmako, Metaprogramming  in Scala 2.10, Eugene Burmako,
Metaprogramming in Scala 2.10, Eugene Burmako,
 
Taxonomy of Scala
Taxonomy of ScalaTaxonomy of Scala
Taxonomy of Scala
 
اسلاید جلسه ۹ کلاس پایتون برای هکر های قانونی
اسلاید جلسه ۹ کلاس پایتون برای هکر های قانونیاسلاید جلسه ۹ کلاس پایتون برای هکر های قانونی
اسلاید جلسه ۹ کلاس پایتون برای هکر های قانونی
 
Python Metaclasses
Python MetaclassesPython Metaclasses
Python Metaclasses
 
Ruby object model
Ruby object modelRuby object model
Ruby object model
 
Advance OOP concepts in Python
Advance OOP concepts in PythonAdvance OOP concepts in Python
Advance OOP concepts in Python
 
The Dark Side of Objective-C
The Dark Side of Objective-CThe Dark Side of Objective-C
The Dark Side of Objective-C
 
About Python
About PythonAbout Python
About Python
 
Dive into Python Class
Dive into Python ClassDive into Python Class
Dive into Python Class
 
PythonOO.pdf oo Object Oriented programming
PythonOO.pdf oo Object Oriented programmingPythonOO.pdf oo Object Oriented programming
PythonOO.pdf oo Object Oriented programming
 
Class
ClassClass
Class
 

More from Tudor Girba

Beyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismBeyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismTudor Girba
 
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Tudor Girba
 
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Tudor Girba
 
Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Tudor Girba
 
Humane assessment on cards
Humane assessment on cardsHumane assessment on cards
Humane assessment on cardsTudor Girba
 
Underneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingUnderneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingTudor Girba
 
1800+ TED talks later
1800+ TED talks later1800+ TED talks later
1800+ TED talks laterTudor Girba
 
Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Tudor Girba
 
Humane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomHumane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomTudor Girba
 
Moose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeMoose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeTudor Girba
 
Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Tudor Girba
 
The emergent nature of software systems
The emergent nature of software systemsThe emergent nature of software systems
The emergent nature of software systemsTudor Girba
 
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Tudor Girba
 
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Tudor Girba
 
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Tudor Girba
 
Demo-driven innovation teaser
Demo-driven innovation teaserDemo-driven innovation teaser
Demo-driven innovation teaserTudor Girba
 
Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Tudor Girba
 
Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Tudor Girba
 
Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Tudor Girba
 

More from Tudor Girba (20)

Beyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismBeyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalism
 
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
 
GT Spotter
GT SpotterGT Spotter
GT Spotter
 
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)
 
Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Don't demo facts. Demo stories!
Don't demo facts. Demo stories!
 
Humane assessment on cards
Humane assessment on cardsHumane assessment on cards
Humane assessment on cards
 
Underneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingUnderneath Scrum: Reflective Thinking
Underneath Scrum: Reflective Thinking
 
1800+ TED talks later
1800+ TED talks later1800+ TED talks later
1800+ TED talks later
 
Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)
 
Humane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomHumane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development room
 
Moose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeMoose: how to solve real problems without reading code
Moose: how to solve real problems without reading code
 
Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)
 
The emergent nature of software systems
The emergent nature of software systemsThe emergent nature of software systems
The emergent nature of software systems
 
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
 
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
 
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
 
Demo-driven innovation teaser
Demo-driven innovation teaserDemo-driven innovation teaser
Demo-driven innovation teaser
 
Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)
 
Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)
 
Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011
 

Recently uploaded

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

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
  • 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?
  • 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
  • 22. What is an analysis?
  • 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
  • 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.
  • 41.
  • 42. ta-mo del can ified o n a me nalyse s spec lying m odel A ied onany comp b e appl
  • 43. Method Class Attribute Inheritance
  • 44. Method Class Attribute Inheritance File
  • 45. Method Class Attribute Inheritance File Symbol
  • 46. Author Method Class Attribute Inheritance File Symbol
  • 47. Duplication Author Method Class Attribute Inheritance File Symbol
  • 48. Class History Class Duplication Author Version Method Class Attribute Inheritance File Symbol
  • 49. Class History Class Duplication Author Version Method Class Attribute Event Inheritance File Trace Symbol
  • 50. ... Class History Class Duplication Author Version Method Class Attribute Event Inheritance File Trace Symbol
  • 51. A good meta-model makes things explicit
  • 53. Analysis Analysis Analysis Model repository described by a meta-model Fact extractor Fact extractor
  • 54. Repository FAMIX Fame UI Mondrian EyeSee
  • 55. Repository FAMIX Fame UI Mondrian EyeSee MSE Smalltalk
  • 56. Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  • 57. Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  • 58. Yellow Chronia CodeCity DynaMoose Hapax SmallDude Submarine Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  • 59. CVS J-Wiretap MSE Source SVN Yellow Chronia CodeCity DynaMoose Hapax SmallDude Submarine Repository FAMIX Fame UI Mondrian EyeSee Java iPlasma MSE Smalltalk C++
  • 60. 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++
  • 61. Terminology Analysis and meta-models Analysis tools Analysis as transformation
  • 62. Analysis Data Information
  • 63. Analysis Meta-model Glue Technique
  • 64. e.g., Mondrian tal 2006 Meyer e
  • 66.
  • 67.
  • 68. Composition with Red,Yellow and Blue Piet Mondrian (1921)
  • 69. The simplest script is an empty view view := ViewRenderer new. view open.
  • 70. view = nodes, edges, layout view := ViewRenderer new. view nodes: classes. view edges: classes from: [:each | each superclass] to: [:each | each]. view treeLayout. view open.
  • 71. 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.
  • 72. 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.
  • 73. 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.
  • 76. 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.
  • 77. mplem ented? ow is it i H
  • 78. 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
  • 79. Terminology Analysis and meta-models Analysis tools Analysis as transformation Issues
  • 80. meta-model What to model? model subject
  • 81. meta-model another meta-model model another model subject
  • 82. meta-model model What gets extracted? subject
  • 83. Is the technique suitable for your task?
  • 84. The meta-model dictates the problem decomposition
  • 85. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/