Copyright © 2010 Mia-Software All Rights Reserved Frédéric Madiot, Mia-Software Grégoire Dupé, Mia-Software Analyze your Software Assets With MoDisco
May 11, 2015
Copyright © 2010 Mia-Software All Rights Reserved
Frédéric Madiot, Mia-Software
Grégoire Dupé, Mia-Software
Analyze your Software AssetsWith MoDisco
Copyright © 2010 Mia-Software All Rights Reserved
Mia-Software
Mia-Software is a Software Company
80 customers, in 10 different countries
Eclipse Foundation member (5 committers)
Develops Model-Driven solutions since 1998
Mia-Insight : Legacy UnderstandingApplication Mining
Mia-QualityQuality Analysis
Mia-StudioModel-to-Model transformationModel-to-Text transformation
Eclipse projectsMoDiscoEMF Facet
Copyright © 2010 Mia-Software All Rights Reserved
Mia-Software
Mia-Software is a subsidiary of Sodifrance
French leader in IT Modernization
900 employees
11 offices in France, Belgium and Tunisia
R&D team dedicated to IT Modernization
> 70 successful IT Modernization projects
VB6 to JEE/Ajax/JSF
Oracle Forms to JEE
VB6 to .Net
ABAL to .Net
Copyright © 2010 Mia-Software All Rights Reserved
AtlanMod Team
AtlanMod is a research team
Joint team between INRIA & École des Mines de Nantes (France)
Founded by Jean Bézivin
Around 12 members, lead by Jordi Cabot
Research focus on:MDE core technologies
metamodeling, model transformations, model weaving, megamodeling,…
MDE applicationsreverse engineering, interoperability
Organizers of the 1st full postgraduate program on MDE http://www.emn.fr/z-info/atlanmod/index.php/The_MDE_Diploma
Commitment to Eclipse open-source projects: ATL, TCS, AM3, AMW, MoDisco, …
Strong links with several software development companies
Participation in national and international projects
Copyright © 2010 Mia-Software All Rights Reserved
About
Modernization…
Copyright © 2010 Mia-Software All Rights Reserved
Software Modernization
Legacy Technologies
Source code
Databases
Configurationfiles
Other sources
Output
• Quality Analysis
• Understanding
• Code Refactoring
• Technical Migration
Scenarios
Documentation
Models
New system
Metrics
Copyright © 2010 Mia-Software All Rights Reserved
Modeling Software Artifacts
Source Code can be
represented with Models
This is nota UML model
!
Copyright © 2010 Mia-Software All Rights Reserved
Software artifacts : - source code
- configuration files - tests
- database - …
ExistingSoftware System
Discover
Models
use Models to represent and manipulate
artifacts of existing systems
Understand
Viewpoints
Transform
NewSoftware System
MoDisco
Copyright © 2010 Mia-Software All Rights Reserved
MoDisco Project
Official Eclipse Modeling project (in MDT)Open-source (EPL licence)Based on other Eclipse Modeling projectsReleased with Helios
Supported by the OMG Eclipse implementations for
KDM (Knowledge Discovery Metamodel) SMM (Structured Metrics Metamodel)
http://www.eclipse.org/MoDisco/
an Eclipse platform to support
Software Modernization projects
Copyright © 2010 Mia-Software All Rights Reserved
What can you do with
MoDisco ?
Copyright © 2010 Mia-Software All Rights Reserved
Quality Analysis
Your own rules
ComplexityMaintenability
UsabilityEfficiency
Portabilityetc
Existingapplication
Check your coding norms Control multi-technos rules Select your output format
MoDisco
Calculate metrics from your code
13 931
42
Model of the existing
application
Model of the metrics
Copyright © 2010 Mia-Software All Rights Reserved
Understanding
Your own rules
What to extract from the code
How to representthe information
Modeling tools
ExistingApplication
Detect specific patterns Generate view-points Respect your modelling norms
Documentation
Extract custom viewpoints out of your code
MoDisco
Model of the existing
application
Model of the viewpoint
(UML or DSL)
Copyright © 2010 Mia-Software All Rights Reserved
Code Refactoring
Your own rules
What to change+
How to change
Existing application
Re-apply coding norms Upgrade component versions Replace coding patterns
Improve existing applications
MoDisco
Improvedapplication
Model of the existing
application
Model of the improved
application
Copyright © 2010 Mia-Software All Rights Reserved
Technical Migration
Your own rules
MigrationStrategy
Migratedapplication
Existingapplication
MoDisco
Model of the existing
application
Model of the migrated
application
Transform to new technologies
Copyright © 2010 Mia-Software All Rights Reserved
the MoDisco
Toolbox
Copyright © 2010 Mia-Software All Rights Reserved
Supported Technologies
Infrastructure
MoDisco Architecture
Java Metamodel Discoverer Generator Transfo. to KDM
XML Metamodel Discoverer Generator
. . .
Model Browser
Navigation through
complex models
Customization & Extensibility
Definition ofspecific
Viewpoints
DiscoveryManager
Plug and orchestratetransformations
Eclipse Modeling projects
JSP Metamodel Discoverer Generator
OMG/ADMStandards
PivotMetamodels
(SMM & KDM)
Copyright © 2010 Mia-Software All Rights Reserved
ADM Specifications
Knowledge Discovery Metamodel (KDM)
To represent ''existing software systems'‘
Facilitates the integration of software analysis tools
Copyright © 2010 Mia-Software All Rights Reserved
ADM Specifications
Structured Metrics Metamodel (SMM)
To represent measurements calculated on software systems
Copyright © 2010 Mia-Software All Rights Reserved
Supported Technologies
Infrastructure
MoDisco Architecture
Java Metamodel Discoverer Generator Transfo. to KDM
XML Metamodel Discoverer Generator
. . .
Model Browser
Navigation through
complex models
Customization & Extensibility
Definition ofspecific
Viewpoints
DiscoveryManager
Plug and orchestratetransformations
Eclipse Modeling projects
JSP Metamodel Discoverer Generator
OMG/ADMStandards
PivotMetamodels
(SMM & KDM)
Model Browser
Navigation through
complex models
Copyright © 2010 Mia-Software All Rights Reserved
EMF Model Browser
Spy On Your Models
Copyright © 2010 Mia-Software All Rights Reserved
Supported Technologies
Infrastructure
MoDisco Architecture
Java Metamodel Discoverer Generator Transfo. to KDM
XML Metamodel Discoverer Generator
. . .
Model Browser
Navigation through
complex models
Customization & Extensibility
Definition ofspecific
Viewpoints
DiscoveryManager
Plug and orchestratetransformations
Eclipse Modeling projects
JSP Metamodel Discoverer Generator
OMG/ADMStandards
PivotMetamodels
(SMM & KDM)
Copyright © 2010 Mia-Software All Rights Reserved
Extensibility & Customization
Define Dynamic Viewpoints on Your Models
Copyright © 2010 Mia-Software All Rights Reserved
Supported Technologies
Infrastructure
MoDisco Architecture
Java Metamodel Discoverer Generator Transfo. to KDM
XML Metamodel Discoverer Generator
. . .
Model Browser
Navigation through
complex models
Customization & Extensibility
Definition ofspecific
Viewpoints
DiscoveryManager
Plug and orchestratetransformations
Eclipse Modeling projects
JSP Metamodel Discoverer Generator
OMG/ADMStandards
PivotMetamodels
(SMM & KDM)
Copyright © 2010 Mia-Software All Rights Reserved
JEE support
Extract Models from Source code
Generate Source Code from Models
• Java files+ annotations (ejb, jpa, servlet)• JSP pages• web.xml• ejb-jar.xml EMF models
KDM model
Copyright © 2010 Mia-Software All Rights Reserved
Supported Technologies
Infrastructure
MoDisco Architecture
Java Metamodel Discoverer Generator Transfo. to KDM
XML Metamodel Discoverer Generator
. . .
Model Browser
Navigation through
complex models
Customization & Extensibility
Definition ofspecific
Viewpoints
DiscoveryManager
Plug and orchestratetransformations
Eclipse Modeling projects
JSP Metamodel Discoverer Generator
OMG/ADMStandards
PivotMetamodels
(SMM & KDM)
Copyright © 2010 Mia-Software All Rights Reserved
Discovery Manager
Plug other parsers
MoDisco
Model of the existing
application
Mia-Insight Cobol Natural VB C DELPHI NSDK/NATSTAR SQL, PLSQL PL1 RPG FORTRAN Smalltalk Powerbuilder OracleForms Forte, Uniface Cool:Gen DL1 DB2etc…
Copyright © 2010 Mia-Software All Rights Reserved
Model-DrivenReverse-Engineering
of Eclipse plug-ins
Copyright © 2010 Mia-Software All Rights Reserved
Anatomy of an Eclipse 3.x Plug-in
MANIFEST.MF
plugin.xml
Source code
build.properties
plugin.properties
.project
.classpath
files
folders
Eclipse Plug-in
Heterogeneity !
Copyright © 2010 Mia-Software All Rights Reserved
Demo
Using EMF to describe a Plug-in
MANIFEST.MF
plugin.xml
Source code
build.properties
plugin.properties
.project
.classpath
files
folders
Eclipse Plug-in
Project’s structure(KDMSource)
.project (XML)
.classpath (XML)
manifest
build.properties(KDMCore)
plugin(eclipseplugin)
Java source code(Java)
plugin.properties(KDMCore)
extensions (XML)Homogeneity !
Copyright © 2010 Mia-Software All Rights Reserved
Understanding
View Java elements which are specific to Eclipse
Use EMF tools to detect Eclipse patterns
Highlight the model elements related to these patterns
ExistingPlug-in
Model of the Plug-in
Demo
Viewpointon the Plug-in
Copyright © 2010 Mia-Software All Rights Reserved
Quality Analysis
Check plug-in development rules
Use EMF tools to detect problems in the model of the Plug-in
Store violations as Measurements into a SMM model
Inject violations into the Problem View
ExistingPlug-in
Model of the Plug-in
Model of the violations Problem View
Demo
Copyright © 2010 Mia-Software All Rights Reserved
Refactoring
Example:
Class must use UCI4J classes (yearly simultaneous release rule)
Detect all the references to 19 prohibited classes:• java.lang.Character• java.text.DateFormat• java.util.Calendar• etc…
Replace them by corresponding ICU4J classes
TransformedPlug-in
ExistingPlug-in
Model of the existing
Plug-in
Model of the migrated
Plug-in
Copyright © 2010 Mia-Software All Rights Reserved
Build Configuration
Example:
Improve build strategies
B3 Model(build configuration)
Plug-ins to build
Model of plugins to build
Team information(CVS, SVN, etc)
Update sites(p2)
Model of update sites content
Resolved plug-insdependencies
Build resolution strategies(constraints solver)
Cartography
IDM++ Research Project (ANR) -> Sept 2011
Copyright © 2010 Mia-Software All Rights Reserved
Thank you !
Company
http://www.mia-software.com/
http://www.sodifrance.fr/
Eclipse projects
http://www.eclipse.org/MoDisco/
http://www.eclipse.org/modeling/emft/facet/
Blog
http://fmadiot.blogspot.com/