+ All Categories
Home > Education > 2014 01-ticosa

2014 01-ticosa

Date post: 11-May-2015
Category:
Upload: pharo
View: 377 times
Download: 0 times
Share this document with a friend
Description:
A presentation about reengineering tools for the TICOSA conference
Popular Tags:
82
Dr. S. Ducasse rmod.lille.inria.fr stephane.ducasse.free.fr Dedicated tools and research for Software Business intelligence @ Tisoca 2014 1
Transcript
Page 1: 2014 01-ticosa

����

Dr. S. Ducasse rmod.lille.inria.fr stephane.ducasse.free.fr

Dedicated tools and research for Software Business intelligence

@ Tisoca 2014

1

Page 2: 2014 01-ticosa

stephane.ducasse.free.fr• Leader of RMOD Inria team• Co-founder of http://www.synectique.eu

• Co-creator of Moose http://www.moosetechnology.org• Leader of http://www.pharo.org• Coder and object-designer• Traits co-father

Page 3: 2014 01-ticosa
Page 4: 2014 01-ticosa

Software is

Complex

Page 5: 2014 01-ticosa

Software is a living entity...•Early decisions were certainly good at that time•But the context changes•Customers change•Technology changes•People change

Page 6: 2014 01-ticosa

Maintenance = Success!!

Page 7: 2014 01-ticosa

We only maintain useful successful software

Page 8: 2014 01-ticosa

Maintenance is continuous Development

Between 50% and 90% of global effort is spent on

“maintenance” !

18% Corrective(fixing reported errors)

18% Adaptive(new platforms or OS)

60% Perfective(new functionality)

4% Other

80%

20%

60%18%

18%4%

“Maintenance”

Page 9: 2014 01-ticosa

50% of development time is lost trying to understand code !

80%

20%

We lose a lot of time with inappropriate and ineffective practices

40%

20%40%

Between 50% and 80% of the overall cost is spent in the

evolution

Page 10: 2014 01-ticosa

We need dedicated tools!

Page 11: 2014 01-ticosa

Pragmatic researchers in action

����

Page 12: 2014 01-ticosa

Dedicated tools tailored to your problems

Profitable in terms of cost

http://www.synectique.eu

Page 13: 2014 01-ticosa

RMODRMoD: code analysis, metamodeling, software metrics, program understanding, program visualization, evolution analysis,refactorings, legacy code, quality, ...

Current focus Remodularization analyses Quality models (PSA-Airfrance) Towards semantic merge Old and odd language analyses Rule and bug assessment

CollaborationsSoft-VUB (Belgium), Pleiad (Chile)UFMG (Brazil), SCG (Swiss), LIRMM

Representation Transformations

Reverse

Engineering

Analyses

Evolution

13

Page 14: 2014 01-ticosa

S.Ducasse LSE����

14

Representation Transformations

Reverse

Engineering

Analyses

Evolution

Language Independent Meta Model (FAMIX) An Extensible Reengineering Environment

Reengineering PatternsVersion Analyses HISMO metamodel

Understanding Large SystemsStatic/Dynamic Information Feature AnalysisClass Understanding Package BlueprintsDistribution Maps

Software Metrics Quality ModelsDuplicated Code IdentificationTest GenerationCycle and Layer IdentificationMerging technicsRules assessment

Language Independent Refactorings

Page 15: 2014 01-ticosa

Java C  /  C++ Smalltalk .NET

Page 16: 2014 01-ticosa

Data Model

Develop Analysis

Take decision

Dedicated Tools

Analysis

“an analysis should lead to a decision”

Page 17: 2014 01-ticosa

Example : Who is behind package X ?

(1) Extraction

(2) Modèle

(4) Visualisation

(3) Analyses

Page 18: 2014 01-ticosa

Step 1 - Model Creation/Import

(1) Extraction

(2) Modèle

(4) Visualisation

(3) Analyses

Definition of a model to represent entitiesData Extraction (CVS...)

Page 19: 2014 01-ticosa

Step 2 - Analyses

(1) Extraction

(2) Modèle

(4) Visualisation

(3) Analyses

Who wrote how many lines of code?

Page 20: 2014 01-ticosa

Step : 3 - Creating the Map

Page 21: 2014 01-ticosa
Page 22: 2014 01-ticosa
Page 23: 2014 01-ticosa
Page 24: 2014 01-ticosa
Page 25: 2014 01-ticosa
Page 26: 2014 01-ticosa
Page 27: 2014 01-ticosa

JBoss at a glance

Interactive tool Data in perspective

(1) Extraction

(2) Modèle

(4) Visualisation

(3) Analyses

Page 29: 2014 01-ticosa

Naviga3on  in  the  Model

Page 30: 2014 01-ticosa

Queries  reduce  the  analysis  

Query

Page 31: 2014 01-ticosa

So@ware  Metrics

Page 32: 2014 01-ticosa

Metrics  in  Moose

Page 33: 2014 01-ticosa

Metrics Dashboard

Page 34: 2014 01-ticosa

Evolution Dashboard

Page 35: 2014 01-ticosa

Evolution Matrix

Page 36: 2014 01-ticosa

Java Smalltalk C/C++ .NET

Moose  Meta-­‐ModelTo  represent  program  

informa3on

...

Page 37: 2014 01-ticosa

Custom rules can be captured and checkeddaily for you.

Page 38: 2014 01-ticosa

Dedicated Analysis reports with Moose provide pertinent analysis for software elements

Page 39: 2014 01-ticosa

Reports can integrated into software process: Automated, continuous reports with integration servers

Page 40: 2014 01-ticosa

Custom RulesRule followers and breakers

green: followersorange: break < 2 rules

Red: break > 2 rules

Page 41: 2014 01-ticosa

Tudor Gîrba

Page 42: 2014 01-ticosa

Tools  Design  With  Moose

Page 43: 2014 01-ticosa

Modeling of Eclipse Plugins

Page 44: 2014 01-ticosa

Contextual Visualization of Plugins

Core: BlueUml: Red

Page 45: 2014 01-ticosa

Visualization of Plugins& Dependencies

All incoming dependencies for a package in green

Page 46: 2014 01-ticosa

Analysisof bugs

Page 47: 2014 01-ticosa

...

Dedicated Analyses

Page 48: 2014 01-ticosa

Dedicated Tools Rich Compact Best Focus

Page 49: 2014 01-ticosa

b := GLMTabulator new.b column: #namespaces; column: #classes; column: #methods.b transmit to: #namespaces; andShow: [:a | a tree display: [ :model | model allNamespaces select: #isRoot ]; children: #childScopes; format: #name ].b transmit to: #classes; from: #namespaces; andShow: [:a | a list display: #classes; format: #name ].b transmit to: #methods; from: #classes; andShow: [:a | a list display: #methods; format: #signature ].

b transmit toOutsidePort: #class; from: #classes.b transmit to: #methods; from: #methods.B := GLMTabulator new.B title: 'Code Browser'.B row: #nav; row: #details.B transmit to: #nav; andShow: [:a | a custom: b ].B transmit to: #details; from: #nav port: #class; andShow: [:a | a text display: #sourceText ].B transmit to: #details; from: #nav port: #method; andShow: [:a | a text display: #sourceText ].

Page 50: 2014 01-ticosa

One picture is worth one thousand words

Which one?

How could it be that simple?

50

Page 51: 2014 01-ticosa

Program visualization is difficult

Limited number of colors: 12

Blur and color emergence

Limited screen size

Limited context, edges crossing

Limited short-term memory (three to nine)

Difficult to remember too many symbols/semantics

Culture, Colorblind

51

Page 52: 2014 01-ticosa

Our constraints

Lot of existing and advanced solutions

ICPC is full of them

HEB

Plenty of works on information visualization

Simple but not simplistic

Ideally, solutions that an engineer could reproduce in a

couple of days

52

Page 53: 2014 01-ticosa

Understanding large systems

• Understanding code is difficult!• Systems are large• Code is abstract• Should I really convinced you?

• Some existing approaches-Metrics: you often get meaningless results once combined-Visualization: often beautiful but with little meaning

• Polymetric view is an idea of M. Lanza [WCRE,TSE]

Page 54: 2014 01-ticosa

System  ComplexityClasses  and  their  hierarchy

Height  =  NOMWidth  =  NOAColor  =  LOC

Distribu2on  MapRectangles  =  A  reference  Par33on

(Example:  Packages)Color  =  Some  property

(words)

ChroniaX-­‐axis  =  3meY-­‐axis  =  files

Colors  =  authors

Code  CityDistricts  =  PackagesTowers  =  Classes

Tower  Height  =  NOMTower  width  =  NOA

Class  BlueprintOuter  Rectangles  =  Classes  Inner  =  methods/aVributesDemonstrates  class  layers  and  

class  interac3ons

Trace  SignalLines  =  execu3on  of  methods

Page 55: 2014 01-ticosa

System Complexity shows class hierarchies.

lines

attributes

methods

Page 56: 2014 01-ticosa

S.Ducasse LSE����

Polymetric views condense information

56

Classes+InheritanceW: # of Added Methods H: # of Overridden MethodsC: # of Method Extended

To get a feel of the inheritance semantics: adding vs. reusing

methods LOC # statements # parameters

Page 57: 2014 01-ticosa

Understanding Classes: Easier?

• Public and non public methods• No predefined reading order• Inheritance

• Class blueprint is an idea of M. Lanza [OOPSLA]

Page 58: 2014 01-ticosa

Understanding Changes

Page 59: 2014 01-ticosa

Introduced PopupChoice / RequestDialog

Introducing a feature

59

Page 60: 2014 01-ticosa

How to understand changes

• Torch is the work of V. Uquillas-Gomez

Page 61: 2014 01-ticosa
Page 62: 2014 01-ticosa

Package Structure

Page 63: 2014 01-ticosa
Page 64: 2014 01-ticosa

Removed Pen and PenPointRecorder

Removing a feature (I)

64

Page 65: 2014 01-ticosa

Editing comments

Page 66: 2014 01-ticosa

Lessons learned• Program visualization is difficult

• Squares and little symbols are just squares and little symbols

• Glancing at code is still efficient

Page 67: 2014 01-ticosa

Omnipresent code + visualization is excellent

Page 68: 2014 01-ticosa

Dedicated tools tailored to your problems

Profitable in terms of cost

http://www.synectique.eu

Page 69: 2014 01-ticosa

•  Multi-language

•  Meta-tool: An environment to build tools

•  Any kind of data: logs, authors, bugs, …

Inven3ve  Toolkit

Page 70: 2014 01-ticosa

Example of dedicated tools

http://www.synectique.eu

Page 71: 2014 01-ticosa

Analysis and Migration Support

Problem: Since 30 years company X develops insurance solution. The old compiler costs more and more.

Which part to migrate first?

How to reduce the migration cost (duplicated code, screen numbers)?

How to control the migration?

Solution :

Build a specific analysis tools (2 cycles of 6 weeks)Domain and problem analysisEngineer formation

Page 72: 2014 01-ticosa

Reverse engineering and support new generation

Problem: Since 15 years company X develops missile shooting systems. The most of original team left. Other foreign code to maintain.

Understanding current message driven architecture.Extracting domain modelMapping concepts back to code.Supporting testing components

Solution : Domain and problem analysisBuild a specific analysis tools (3-4 months)Engineer formation

Page 73: 2014 01-ticosa

Decision Making Support

Problem: Since 20 years company X develops insurance solution. The old compiler costs more and more.

Which part depends on which other one?Duplicated code?Dead code?

Solution : Domain and problem analysis Build a specific analysis tools (2 cycles of 6 weeks)Engineer formation

Page 74: 2014 01-ticosa

/59

Inventive Toolkit

...McCabe = 21LOC = 75

3,000classes select: #isGod

Page 75: 2014 01-ticosa

/59

Multi levelsDashboard

Code  analyzer

Impact  analyzer Duplica3on  inspector

Page 76: 2014 01-ticosa

/59

Dashboard

• Metrics:oMethod projetsoFormsoTables

• Quality• Debt• Reports

Page 77: 2014 01-ticosa

/59

Code Analyzer

• Code Browser•Dependencies• Filters

Page 78: 2014 01-ticosa

/59

Duplication Inspector

•Duplication detector

• Customizable

Page 79: 2014 01-ticosa

/59

Impact Analyzer

• Global dependencies

• Interactif• Cyclic dependencies 

Page 80: 2014 01-ticosa

/59

Rule Checker

Automated rule checkingSpecific client driven rules

Page 81: 2014 01-ticosa

����

http://stephane.ducasse.free.frhttp://www.synectique.eu

Page 82: 2014 01-ticosa

Interested by your problems- Migration support- Decision making support- Extraction and definition of rules- Software architecture Verification- Visualizations- Cost prediction- Impact change- Service-oriented architecture- Software analysis


Recommended