Upload
robson-pontin
View
214
Download
0
Tags:
Embed Size (px)
DESCRIPTION
Moose
Citation preview
Tudor Gîrbawww.tudorgirba.com
Moose’s pillars
Analysis environment for software systems
4 core actions
navigation: moving between things
selection: grouping things
inspection: inspecting things
presentation: rendering things
}
{
}
{
}
{}
{
}
{
McCabe = 21
LOC = 75
3,000NOM = 102
Metrics Queries Visualizations ...
Software maps
}
{
}
{
}
{}
{
}
{
McCabe = 21
LOC = 75
3,000NOM = 102
source code metrics maps
Metrics compress the system into numbers
NOMLOCTCCWMCCYCLOATFDHNL
NOCNOCmtsNOPAWLOCWNOCWOCMSG
DUPLINESNAINOANI...
Polymetric views shows up to 5 metrics
Position metrics
Height metric
Width metric
Color metric
System Complexity shows class hierarchies
Lanza, Ducasse 2003
System complexity shows class hierarchy
Class Blueprint shows class internals
Ducasse, Lanza 2005
Class blueprintshows class internals
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.
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
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
Enter your script here Variables you can use
Your visualization
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, Matías, Felippe