36
Moose, Roassal and Visualizations Alexandre Bergel [email protected] 26/03/2013

03_MooseAndQualityTools

Embed Size (px)

DESCRIPTION

Moose

Citation preview

Page 1: 03_MooseAndQualityTools

Moose, Roassal and Visualizations

Alexandre [email protected]

26/03/2013

Page 2: 03_MooseAndQualityTools

Tudor Gîrbawww.tudorgirba.com

Page 3: 03_MooseAndQualityTools

Moose’s pillars

Analysis environment for software systems

4 core actions

navigation: moving between things

selection: grouping things

inspection: inspecting things

presentation: rendering things

Page 4: 03_MooseAndQualityTools

}

{

}

{

}

{}

{

}

{

McCabe = 21

LOC = 75

3,000NOM = 102

Metrics Queries Visualizations ...

Page 5: 03_MooseAndQualityTools

Software maps

Page 6: 03_MooseAndQualityTools

}

{

}

{

}

{}

{

}

{

McCabe = 21

LOC = 75

3,000NOM = 102

source code metrics maps

Page 7: 03_MooseAndQualityTools

Metrics compress the system into numbers

NOMLOCTCCWMCCYCLOATFDHNL

NOCNOCmtsNOPAWLOCWNOCWOCMSG

DUPLINESNAINOANI...

Page 8: 03_MooseAndQualityTools

Polymetric views shows up to 5 metrics

Position metrics

Height metric

Width metric

Color metric

Page 9: 03_MooseAndQualityTools

System Complexity shows class hierarchies

Lanza, Ducasse 2003

System complexity shows class hierarchy

Page 10: 03_MooseAndQualityTools

Class Blueprint shows class internals

Ducasse, Lanza 2005

Class blueprintshows class internals

Page 11: 03_MooseAndQualityTools

More info

Michele Lanza and Stéphane Ducasse. Polymetric Views—A Lightweight Visual Approach to Reverse Engineering. In Transactions on Software Engineering (TSE) 29(9) p. 782—795, September 2003

Stéphane Ducasse and Michele Lanza. The Class Blueprint: Visually Supporting the Understanding of Classes. In Transactions on Software Engineering (TSE) 31(1) p. 75—90, January 2005.

Page 12: 03_MooseAndQualityTools

Class

Method

Attribute

Access

Inheritance

Package

Namespace

*

belongsTo

*

belongsTo

belongsTopackagedIn

superclass

subclass

* *

InvocationinvokedBy

candidate

*

accessedIn

*

accesses

*

*

*

*

FAMIX is a language independent meta-modelFAMIX is a language independent meta-model

Page 13: 03_MooseAndQualityTools

Links about Moose

http://www.moosetechnology.org

http://www.moosetechnology.org/download

http://www.themoosebook.org/book

Page 14: 03_MooseAndQualityTools

Using Roassal

Roassal is part of Moose

You have nothing to install

A tutorial is available on u-cursos and online

http://bergel.eu/download/Mondrian.pdf

Page 15: 03_MooseAndQualityTools

Getting MSE file

MSE is the file format used to exchange meta-models

In order to load a Java application into Moose, you need first to translate your .java files into a MSE file

VerveineJ is a translator Java -> MSE

http://www.moosetechnology.org/tools/verveinej

Page 16: 03_MooseAndQualityTools

Scripting

Page 17: 03_MooseAndQualityTools

System complexity

Page 18: 03_MooseAndQualityTools

System complexity

Page 19: 03_MooseAndQualityTools

Class blueprint

Page 20: 03_MooseAndQualityTools

Class blueprint

Page 21: 03_MooseAndQualityTools

Roassal Tutorial

Page 22: 03_MooseAndQualityTools

Roassal Easel

Page 23: 03_MooseAndQualityTools

Roassal Easel

Enter your script here Variables you can use

Your visualization

Page 24: 03_MooseAndQualityTools

Script 1

view nodes: classGroup

Page 25: 03_MooseAndQualityTools

Script 2

view nodes: classGroup.view edgesFrom: #superclass.view treeLayout

Page 26: 03_MooseAndQualityTools

Script 3

view shape rectangle width: #numberOfAttributes; height: #numberOfMethods.view nodes: classGroup.view edgesFrom: #superclass.view treeLayout

Page 27: 03_MooseAndQualityTools

Script 4

view shape rectangle width: #numberOfAttributes; height: #numberOfMethods; linearFillColor: #numberOfLinesOfCode within: classGroup.view nodes: classGroup.view edgesFrom: #superclass.view treeLayout

Page 28: 03_MooseAndQualityTools

script 5

view nodes: classGroup forEach: [ :each | view shape rectangle if: [ :m | m numberOfLinesOfCode > 15 ] fillColor: Color red. view nodes: each methods. view gridLayout gapSize: 2].

Page 29: 03_MooseAndQualityTools

script 6

view nodes: (classGroup asArray sortedAs: #numberOfMethods) reversed forEach: [ :cls |

view nodes: cls methods. view gridLayout.]

Page 30: 03_MooseAndQualityTools

script 7

view nodes: (classGroup asArray sortedAs: #numberOfMethods) reversed forEach: [ :cls | view nodes: cls methods. view edges: cls methods from: #yourself toAll: [:m | m queryAllIncomingInvocations opposites withinClass: cls ]. view gridLayout.]

Page 31: 03_MooseAndQualityTools

script 8

view nodes: (classGroup asArray sortedAs: #numberOfMethods) reversed forEach: [ :cls | view nodes: cls methods. view edges: cls methods from: #yourself toAll: [:m | m queryAllIncomingInvocations opposites withinClass: cls ]. view treeLayout.]

Page 32: 03_MooseAndQualityTools

Roassal contains many examples

Page 33: 03_MooseAndQualityTools

Tarea

Page 34: 03_MooseAndQualityTools

Tarea A

You will conduct an analyze of an application

You need to hand in a small report on Thursday 11 April

This time using the tools we introduced today

You need to provide a report that contains:

a description of a software

analysis of the software using the visualizations and tools we have seen today

use Roassal / Mondrian to do a personal visualization

suggestion for code improvement

Page 35: 03_MooseAndQualityTools

Tarea A

EyeSee

http://www.moosetechnology.org/tools/vw/eyesee

Eduardo, Daniel, Hernan, Tamara, Alonso

Metacello

http://code.google.com/p/metacello/

https://gforge.inria.fr/frs/download.php/28462/Metacello.pdf

Juan Pablo, Gabriel, Diego, Elias, Erika

Page 36: 03_MooseAndQualityTools

Tarea A

Roassal

www.pharocasts.com/2012/09/roassal.html

http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/Roassal.pdf

http://pharobooks.gforge.inria.fr/PharoByExampleTwo-Eng/latest/Mondrian.pdf

Alfonso, Carlos, Kevin, José, Alejandro

Zinc

http://zn.stfx.eu

http://zn.stfx.eu/zn/zinc-http-components-paper.html

Tomas, Narbor, Matías, Felippe