Sei sulla pagina 1di 36

Moose, Roassal and

Visualizations
Alexandre Bergel
abergel@dcc.uchile.cl
26/03/2013

Tudor Grba

www.tudorgirba.com

Mooses pillars

Analysis environment for software systems


4 core actions
navigation: moving between things
selection: grouping things
inspection: inspecting things
presentation: rendering things

McCabe = 21
0

= 102

00
,
3

LO

Metrics

Queries

Visualizations

}
}

75

NOM

}
}

...

Software maps

McCabe = 21
{

}
}

NOM

= 102

00
0
,

75

LO

source
code

metrics

maps

Metrics compress the system into


numbers

NOM
LOC
TCC
WMC
CYCLO
ATFD
HNL

NOC
NOCmts
NOPA
WLOC
WNOC
WOC
MSG

DUPLINES
NAI
NOA
NI
...

Polymetric views shows up to 5


metrics
Width metric

Height metric
Position metrics
Color metric

System complexity shows class


hierarchy
System Complexity
shows class hierarchies

03

asse 20

Class blueprint
Class
Blueprint
shows
class internals
shows
class
internals

005
2
a
z
n
a
e, L
Ducass

More info

Michele Lanza and Stphane Ducasse. Polymetric ViewsA Lightweight


Visual Approach to Reverse Engineering. In Transactions on Software
Engineering (TSE) 29(9) p. 782795, September 2003
Stphane Ducasse and Michele Lanza. The Class Blueprint: Visually
Supporting the Understanding of Classes. In Transactions on Software
Engineering (TSE) 31(1) p. 7590, January 2005.

FAMIX
language
independent
metaFAMIX isisa alanguage
independent
meta-model
model
Package

Namespace

packagedIn

belongsTo
*

Class
belongsTo

Invocation

invokedBy

candidate

superclass

subclass

belongsTo
*

Method

Attribute

accessedIn

accesses
*

Access

Inheritance

Links about Moose

http://www.moosetechnology.org
http://www.moosetechnology.org/download
http://www.themoosebook.org/book

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

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

Scripting

System complexity

System complexity

Class blueprint

Class blueprint

Roassal Tutorial

Roassal Easel

Roassal Easel

Your visualization

Enter your script here

Variables
you can use

Script 1

view nodes: classGroup

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

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

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

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
].

script 6
view nodes:
(classGroup asArray sortedAs: #numberOfMethods) reversed
forEach: [ :cls |
view nodes: cls methods.
view gridLayout.
]

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.
]

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.
]

Roassal contains many examples

Tarea

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

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

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, Matas, Felippe

Potrebbero piacerti anche