This document summarizes a presentation by Dr. S. Ducasse on dedicated tools and research for software business intelligence at Tisoca 2014. It discusses:
- The need for dedicated tools tailored to specific problems to aid in maintenance, decision making, and reducing costs.
- The Moose technology for building custom analysis tools through its language-independent meta-model and ability to import different data sources.
- Examples of how analysis tools built with Moose have helped companies with challenges like migration, reverse engineering, and decision support.
- The benefits of an inventive toolkit approach that allows building multi-level dashboards, code analyzers, impact analyzers, and other custom tools to address specific
1. Dedicated tools and
research for
Software Business
intelligence
@ Tisoca 2014
Dr. S. Ducasse
rmod.lille.inria.fr
stephane.ducasse.free.fr
1
2. 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
5. Software is a living entity...
•Early decisions were certainly good at that time
•But the context changes
•Customers change
•Technology changes
•People change
8. Maintenance is continuous
Development
4% Other
20%
80%
18% Adaptive
(new platforms or OS)
Between 50% and 90% of
global effort is spent on
“maintenance” !
4%
18%
18%
60%
18% Corrective
(fixing reported errors)
60% Perfective
(new functionality)
“Maintenance”
9. 50% of development time
is lost trying to understand code !
20%
20%
80%
Between 50% and 80% of the
overall cost is spent in the
evolution
40%
40%
We lose a lot of time with inappropriate and
ineffective practices
13. RMOD
RMoD: code analysis, metamodeling, software metrics, program
understanding, program visualization, evolution analysis,
refactorings, legacy code, quality, ...
Current focus
Remodularization analyses
Reverse
Engineering
Quality models (PSA-Airfrance)
Towards semantic merge
Old and odd language analyses Representation
Rule and bug assessment
Collaborations
Soft-VUB (Belgium), Pleiad (Chile)
UFMG (Brazil), SCG (Swiss), LIRMM
Analyses
Transformations
Evolution
13
14. Understanding Large Systems
Static/Dynamic Information
Feature Analysis
Class Understanding
Reverse
Package Blueprints
Engineering
Distribution Maps
Analyses
Representation
Software Metrics
Quality Models
Duplicated Code Identification
Test Generation
Cycle and Layer Identification
Merging technics
Rules assessment
Transformations
Evolution
Language Independent Meta
Model (FAMIX)
An Extensible Reengineering
Environment
S.Ducasse
Language Independent
Refactorings
Reengineering Patterns
Version Analyses
HISMO metamodel
14
LSE
17. Example : Who is behind package X ?
(4) Visualisation
(3) Analyses
(2) Modèle
(1) Extraction
18. Step 1 - Model Creation/Import
(4) Visualisation
(3) Analyses
(2) Modèle
(1) Extraction
Definition of a model to represent entities
Data Extraction (CVS...)
19. Step 2 - Analyses
(4) Visualisation
(3) Analyses
(2) Modèle
(1) Extraction
Who wrote how many lines of code?
49. 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 ].
50. One picture is worth one thousand
words
Which one?
How could it be that simple?
50
51. 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
52. 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
53. 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]
54. System
Complexity
Class
Blueprint
Classes
and
their
hierarchy
Height
=
NOM
Width
=
NOA
Color
=
LOC
Outer
Rectangles
=
Classes
Inner
=
methods/aVributes
Demonstrates
class
layers
and
class
interac3ons
Chronia
X-‐axis
=
3me
Y-‐axis
=
files
Colors
=
authors
Distribu2on
Map
Rectangles
=
A
reference
Par33on
(Example:
Packages)
Color
=
Some
property
(words)
Code
City
Districts
=
Packages
Towers
=
Classes
Tower
Height
=
NOM
Tower
width
=
NOA
Trace
Signal
Lines
=
execu3on
of
methods
56. Polymetric views condense information
To get a feel of the inheritance
semantics: adding vs. reusing
Classes+Inheritance
W: # of Added Methods
H: # of Overridden Methods
C: # of Method Extended
methods
LOC
# statements
# parameters
S.Ducasse
56
LSE
57. Understanding Classes: Easier?
• Public and non public methods
• No predefined reading order
• Inheritance
• Class blueprint is an idea of M. Lanza [OOPSLA]
66. Lessons learned
• Program visualization is difficult
• Squares and little symbols are just
squares and little symbols
• Glancing at code is still efficient
71. 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 analysis
Engineer formation
72. 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 model
Mapping concepts back to code.
Supporting testing components
Solution :
Domain and problem analysis
Build a specific analysis tools (3-4 months)
Engineer formation
73. 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