+ All Categories
Home > Technology > Understanding your code assets with Moose

Understanding your code assets with Moose

Date post: 29-May-2015
Category:
Upload: esug
View: 589 times
Download: 1 times
Share this document with a friend
Description:
Understanding your code assets with Moose. Stéphane Ducasse, Tudor Gîrba, Adrian Kuhn, Michele Lanza. ESUG 2005, Bruessels
Popular Tags:
22
8/18/05 © Tudor Gîrba Understanding your code assets with Moose Stéphane Ducasse, Tudor Gîrba, Adrian Kuhn Software Composition Group University of Bern, Switzerland Michele Lanza Faculty of Informatics University of Lugano, Switzerland
Transcript
Page 1: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

Understanding your code assetswith Moose

Stéphane Ducasse, Tudor Gîrba, Adrian KuhnSoftware Composition GroupUniversity of Bern, Switzerland

Michele LanzaFaculty of InformaticsUniversity of Lugano, Switzerland

Page 2: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

2

Context: Software development is more thanforward engineering

RequirementsAnalysis

Design

ImplementationTime

Page 3: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

3

Reverse engineering is creating high level viewsof the system …

For example:

It provides an overview, bystriping away details

Page 4: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

4

Reverse engineering is creating high level viewsof the system …

Large systems

Not an algorithm

Multiple techniques:UML diagramsMetricsVisualization…

Page 5: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

5

Moose is a reengineering tool which integratesmultiple techniques

Visualization

Evolution Analysis

Moose

Queries and Navigation

Number of classes = 382Number of methods = 4268…

Semantic Analysis

Metrics

word1 word2

Page 6: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

6

= 7Average number ofmethods per class

= 4268Number of methods= 382Number of classes

Metrics compress the system into numbers andenable comparisons

Metrics can answer questions:How big is the system?How is the complexity spread over the system?…

Page 7: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

7

Visualization compresses the system intopictures

Visualization can provide:Quick overviewSpatial orientation…

Page 8: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

8

Visualization: Polymetric views can display up to5 metrics on a 2D figure

ColorMetric

PositionMetrics

Width Metric

Height Metric System

Complexity View

Class Blueprint

Page 9: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

9

Queries reduce the analysis space

Queries reveal:Similar entitiesEntities which are out of ordinary

Queries make use of properties (e.g., metrics)

Page 10: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

10

Moose at work: analyzing the structure ofsoftware systems

Visualization

Queries and Navigation

Number of classes = 382Number of methods = 4268… Metrics

Page 11: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

11

Semantic analysis attaches semantics tostructure

word1

word3

word2

Applicability:Text SearchSemantic Clustering…

Page 12: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

12

Moose at work: analyzing the semantics ofsoftware systems

Semantic Analysis

word1 word2

Page 13: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

13

Time contains useful information for reverseengineering

Time

RequirementsAnalysis

Design

Implementation

Page 14: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

14

The evolution analysis compresses time throughmetrics, visualization …

History can answer questions:Which parts are change-prone?How did the system get in the current shape?…

Problem: Large amounts of data

Page 15: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

15

Our approach: History as a first class entityencapsulates the evolution

Vers.1 Vers.2 Vers.3 Vers.4 Vers.5

History

A

B

C

D

Page 16: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

16

History can be measured: How much was a classchanged in its history?

4 2 3 31

3 + 2 + 1 + 0Evolution of Number of Methods (E_NOM)

Stability of Number of Methods (S_NOM)

0 + 0 + 0 + 1

4

=

= = 0.25

= 6

Page 17: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

17

Moose at work: analyzing the history of softwaresystems

Evolution Analysis

Page 18: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

18

Actually, Moose is an environment forreengineering

Van

VW Smalltalk

Java

C/C++ Parser

Cobol

Tools integration mechanisms

Metrics

Language independent model repository

CodeCrawler

VisualizationEvolutionanalysis

…Semantic analysisConcept analysisDynamic analysisClusteringDuplication detection…

Page 19: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

19

Class

Namespace

Method

Attribute

InvocationAccess

Inheritance

Package…1

* *

*

*

1*

2

*21*

1

*

1*

Moose is language independent through theFAMIX meta-model

Java Parser: jFamix Eclipse Plugin (http://jfamix.sourceforge.net/)

C++ Parser: Columbus (http://www.frontendart.com/products.html#Columbus)

Java/C++ Parser: iPlasma (Loose Research Group)

Page 20: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

20

Moose has been validated on real life systemswritten in different languages

…………~1800260’000SmalltalkSqueak~4900300’000JavaJBoss~700135’000SmalltalkJun

~110001’000’000C/C++X~400120’000C++/JavaY

~23001’200’000C++ZClassesLines of CodeLanguageSystem

Page 21: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

21

Summary: Moose is an extensible andcollaborative reengineering environment

is research driven: metrics, visualization, evolution analysis …

is industrially validated

is free under BSD license

Accessibility:www.iam.unibe.ch/~scg/Research/Moose/VisualWorks distribution CD

Questions?

Page 22: Understanding your code assets with Moose

8/18/05 © Tudor Gîrba

22

Ownership Map reveals how developers drivesoftware evolution


Recommended