Más contenido relacionado
Similar a Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) Reverse Engineering (20)
Más de Hugo Bruneliere (20)
Eclipse Modeling & MoDisco - An Introduction to Modeling and (Model Driven) Reverse Engineering
- 1. Eclipse Modeling
& MoDisco
An Introduction to Modeling and
(Model Driven) Reverse Engineering
Hugo Brunelière
Nantes (France)
September 2011
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 1
- 2. Outline
AtlanMod: an expert research team in Modeling
Modeling in General…
– Base definitions
– MDE core techniques
Modeling in Eclipse…
– Modeling inside/with Eclipse.org
– EclipseLabs labeled “Modeling”
Modeling in Practice…
– MDE implantation in the market
– AtlanMod situation in this big picture
Model Driven Reverse Engineering (MDRE) & MoDisco
– General approach & possible scenarios
– Eclipse-MDT MoDisco as a MDRE solution
– MoDisco architecture and main components
MoDisco in Action…
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 2
- 3. AtlandMod: an Expert Research Team
in MDE/Modeling
A common team
between INRIA, Ecole Application Driven Research
“Pôles de compétitivité”
des Mines de Nantes Virtuous triangle
(EMN) & LINA
Expertise on Model
Labs (scientific experts)
Driven Engineering
(MDE)
Focus on “Modeling OMG
Technologies for Eclipse
Open source
Software Production, Etc.
Evolution, and
SMEs Big Companies
Operation” (technology providers) (end-users)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 3
- 5. Model Driven Engineering (MDE)
/ Modeling
Modeling: abstracting a (usually simplified) view
from a complex reality
– Objective: use the appropriate abstraction level!
– Simple principle: “Everything is a model”
MDSD
(software
development)
MDE
(engineering)
MDSD
MDE
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 5
- 6. Models & Metamodels
A simple example
The city center
of Nantes = a
system to be
modeled
A map is a
model of this
system
Its legend is a
metamodel
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 6
- 7. Models & Metamodels
Definitions
A model is the result, System Metamodel
obtained automatically, S MM
semi-automatically or fully
manually, of the observation representation of conforms to
of a system considering a given
metamodel with specific objectives
or purposes.
Model M
Examples of metamodels:
UML2, Java, SQL, MS Word, etc.
Sales, banking or insurance domains, etc.
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 7
- 8. The 3-level Modeling Stack
Metametamodel MOF
EBNF
M3 (or Ecore)
conforms to conforms to conforms to
conforms to conforms to conforms to
Metamodel Java language
UML2
M2 grammar
conforms to conforms to conforms to
A UML A Java
Model M1
class diagram program
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 8
- 9. MDE vs. MDA
MDE – Model Driven Engineering
– Generic term for everything that is “Modeling”
– Principles, techniques, tooling and applications
MDA – Model Driven Architecture
– An Object Management Group (OMG) trademark
– An interpretation of MDE
Overall architecture and
underlying standards
No implementations of
the specifications!
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 9
- 10. MDE Core Technique/Operation:
Model Transformation
Models are designed/built/generated to be
– Observed
– Transformed
A simple “MDE Equation”
– Models + Transformations = Software
http://modeling-languages.com/models-transformations-software/
Transform models into:
– Other models
– Source code
– Structured/unstructured data
– Etc.
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 10
- 11. MDE Core Technique/Operation:
Model Transformation
Model-to-Model Transformation (M2M)
– Semantic or syntactic mappings at model level
Java ATL UML2
Metamodel Metamodel Metamodel
Conforms to
Conforms to Conforms to
Transformation
Java-to-UML2
Model a Model b
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 11
- 12. Other MDE Core
Techniques/Operations…
Model-to-Text Transformation (M2T)
– Code generation, data generation
Model decoration
– Annotation of existing models
Model weaving
– Linking, merging, composition, etc
Model extension
– Dynamically (at runtime) or statically
Global model management
– Model metadata handling
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 12
- 13. Domain Specific Languages (1)
DSLs vs GPLs?
– GPL = General Purpose Language
Cover a wide variety of application domains
– E.g., several well-know GPLs for programming
C/C++, Java, C#, etc.
General Purpose Modeling Languages (GPMLs)
– A simple principle: a single language for
modeling everything
– Most famous GPML is UML
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 13
- 14. Domain Specific Languages (2)
DSL: a language dedicated to a given domain or
a specific range of problems
– “formally” introduced quite recently
– Already used since a long time ago in practice
Some well-known DSL examples
– Unix Shell scripts, a DSL for data organization
– HTML, a DSL for defining structured Web pages
– CSS, a DSL for the layout of these Web pages
– SQL, a DSL for database querying
– And many others…
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 14
- 15. Domain Specific Languages (3)
What a DSL actually is?
– An abstract syntax defining the handled
concepts
A metamodel or domain model
– One or several concrete syntaxes
Textual and/or graphical
– A related manipulation tooling
For the DSL and underlying models
Eclipse “Modeling” provides support for this…
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 15
- 17. What is Eclipse? (1)
A not-for-profit corporation
– The Eclipse Foundation
– Funded in January 2004
From 2001 to 2003, only a consortium
– Borland, IBM, Rational, RedHat, etc.
– Headquarters in Ottawa, Canada
Development platform, runtimes and
application frameworks
– Building, deploying and managing Software
– Much more than only a Java IDE!!!
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 17
- 18. What is Eclipse? (2)
An open source community & ecosystem
– Based on meritocracy, transparent processes &
public communications
– But supported by the main actors in IT
IBM, Oracle, SAP, Google, Nokia, etc.
A different business model
– Core software components given to the community
– Proprietary software can freely rely on them
– Dedicated support & service are sold around them
– Benefits made on the domain/technical expertise
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 18
- 19. Eclipse Structure
The Foundation staff (13 persons)
– Direction
– Marketing
– Ecosystem management
– Legal affairs
– Webmasters
Eclipse committers in the various projects
(situation in September 2011)
– More than 570 regularly active committers (and
more than 1400 in total)
– More than 60 different organizations/companies
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 19
- 20. Eclipse Top-level Projects (1)
Eclipse Project (i.e., the Eclipse Platform itself)
– Support for all the other projects
Data Tools Platform
– Data centric technologies (extensible frameworks and
exemplary tools, e.g., for SQL)
Business Intelligence and Reporting Tools (BIRT)
– Reporting system for Web applications
Eclipse Modeling Project
– Plenty of cool “modeling” stuffs… (detailed right after!)
Eclipse Technology Project
– Technology explorations or incubators (various domains)
Mylyn
– Task-Focused Interface for Eclipse
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 20
- 21. Eclipse Top-level Projects (2)
RT
– Intermediate services for complex environments
– Based on Equinox framework and OSGI
SOA Tools Platform Project
– Frameworks and exemplary extensible tools dedicated to
SOA
Tools Project
– Support for different technologies (C/C++, PHP, etc)
Test and Performance Tools Platform Project
– Frameworks and services for testing and evaluation
Eclipse Web Tools Platform Project
– Tools for developing Web and Java EE applications
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 21
- 22. The Eclipse Modeling Project (1)
EMP (http://www.eclipse.org/modeling/)
– Evolution and promotion of model-based
development technologies
– A unified set of modeling frameworks,
tooling, and implementations of standards
– Included technologies based on the
Eclipse Modeling
Framework (EMF)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 22
- 23. The Eclipse Modeling Project (2)
Abstract Syntax Development
(modeling core infrastructure)
– Eclipse Modeling Framework (EMF)
Concrete Syntax Development
– Graphical Modeling Project (GMP)
– Textual Modeling Framework (TMF)
Model Development Tools (MDT)
– Tooling for “Modeling” standards
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 23
- 24. The Eclipse Modeling Project (3)
Model Transformation
– Model-to-Model Transformation (M2M)
– Model-to-Text Transformation (M2T)
Amalgam
– Packaging, integration and usability of
Modeling Projects components
Technology and Innovation
– Eclipse Modeling Framework Technology
(EMFT), incubator for EMF-related tools
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 24
- 25. Eclipse Modeling Framework (EMF)
Ecore
The EMF core
metametamodel
Definition of
metamodels
(or domain
models)
A de-facto
standard for
modeling…
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 25
- 26. Eclipse Modeling Framework
(EMF) Project
Core modeling framework
– Complete model handling API (Java)
– Generative approach
Java code generation from metamodel definition
– Reflexive approach
Dynamic handling of models via the generic API
Related support
– Scalability (CDO)
– Comparison (EMF Compare)
– Querying (Model Query)
– Transactions (Model Transaction)
– Validation (Validation Framework)
– And a few others
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 26
- 27. Eclipse Modeling Framework Technologies
(EMFT) Project
Incubator for technologies extending/complementing EMF
– New tools may be integrated in EMF later…
Some of the included (sub)projects
– EMF Facet
Dynamic extension of models
– EEF (Extended Editing Framework)
Generation of forms for editing models
– Ecore Tools
Graphical Ecore model editor
– MWE (Modeling Workflow Engine)
Orchestration of model processing workflows
– EMF Index
Indexing of big models…
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 27
- 28. Model Development Tools
(MDT) Project
Industry standard modeling (big “M”)
– EMF-based implementation of standards, related tooling
Some of the included (sub)projects
– MoDisco
Model Driven Reverse Engineering framework
– UML2 (Unified Modeling Language)
– BPMN2 (Business Process Model and Notation)
– OCL (Object Constraint Language),
– SBVR (Semantics of Business Vocabulary and Business Rules)
– Papyrus
Model edition environment for UML, SysML, MARTE…
– XSD (XML Schema Definition)
Manipulation API for XML schemas and documents
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 28
- 29. Model To Model (M2M) &
Model To Text (M2T) Projects
M2M: declarative languages and technologies for model-to-model
transformation
– ATL (AtlanMod Transformation Language)
Full implementation
– Operational QVT
Partial implementation
– Declarative QVT
No implementation
M2T: template languages and technologies for generation of
textual artifacts from models
– Acceleo
OMG MTL standard implementation and tooling
– Xpand
Statically-typed template environment
– Jet
Older code generation facilities
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 29
- 30. Concrete Syntax Development Projects
GMP (Graphical Modeling Project): development of
graphical DSLs and related editors
– GMF Runtime
Common application framework
– GMF Tooling vs. Graphiti
Two solutions relying on GMF Runtime
TMF (Textual Modeling Framework): development of
textual DSLs and related editors
– Xtext
Grammar-to-metamodel generative approach
– TCS (Textual Concrete Syntaxes)
Metamodel-to-grammar generative approach
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 30
- 31. “Modeling” Eclipse Labs
Eclipse Labs vs. Eclipse Projects
– Hosted on code.google.com, not on Eclipse Foundation servers
– Less constraints: experimentations, innovative prototypes
Some interesting EMF-related tools available as Eclipse Labs
– Virtual EMF
Transparent composition, weaving and linking of models
– EMF Profile
Profile support for EMF-based models
– EMFtoCSP
Formal verification of models using constraint programming
– Bundle Configuration for Build
Automated initialization of build configurations from OSGI
bundles
– EMFPath
Google Guava extension and utilities for EMF (navigation)
– yakindu
Model-driven development toolkit for embedded systems
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 31
- 33. MDE Implantation in the Market (1)
Some companies working actively on MDE
– Worldwide
– From France
Some big companies using MDE
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 33
- 34. MDE Implantation in the Market (2)
Common uses of MDE in companies
– (Business) Process Modeling (e.g., BPMN)
– Forward Engineering
Software design and specification
Software development process automation
(notably code generation)
– Reverse Engineering (from legacy systems)
Software design/specification recovery
Software migration
– Quality assurance (of Software and related data)
Checking, verification, validation
– Interoperability (between tools, data, ISs)
Make the present/future work with the past
(legacy)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 34
- 35. MDE Implantation in the Market (3)
So finally, do we put “Modeling” inside companies? (YES,
but…)
– Right amount of modeling (positive pains/gains ratio)
– Potential initial decrease of productivity (mid/long-term
investment)
– Social and organizational aspects (adoption guidelines)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 35
- 36. AtlandMod Involvement in “Modeling”
Model Transformation
– M2M ATL (collaboration with Obeo)
Model Dynamic Extension
– EMFT EMF Facet (collaboration with Mia-
Software)
Model Driven Reverse Engineering
– MDT MoDisco (collaboration with Mia-Software)
Model Weaving
– GMT AMW (prototype)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 36
- 37. AtlandMod Involvement in “Modeling”
Model Virtual Linking/Composition
– Virtual EMF (prototype on Eclipse Labs)
Model Verification
– EMFToCSP (prototype on Eclipse Labs)
Model Annotation/Decoration
– EMF Profile (prototype on Eclipse Labs)
Global Model Management
– AM3 (part of MoDisco, prototype)
DSL Textual Concrete Syntaxes
– TMF TCS (prototype)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 37
- 38. Now Let’s Focus on
MDRE and MoDisco…
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 38
- 39. Different Possible
Reverse Engineering Scenarios
Legacy Technologies Outputs
Scenarios
Source code Metrics
• Quality Analysis
Databases Models
• Understanding
• Code Refactoring
Configuration • Technical Migration
files New system
• Etc
Other sources Documentation
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 39
- 40. Model Driven Reverse Engineering
(MDRE) Approach
Use models to represent and manipulate
artifacts from existing systems
Existing Discover Understand Transform
Legacy System
Software artifacts :
New
- source code Models Viewpoints
- configuration files Software Artifacts
- tests
- database
-…
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 40
- 41. Model Driven Reverse Engineering
(MDRE) Approach
Discover Java metamodel
MoDisco
Java
conforms to
Discoverer
Java source code Java model
JUnit3 code JUnit3
Navigate MoDisco
Model Browser
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 41
- 42. Model Driven Reverse Engineering
(MDRE) Approach
Understand
Java model
JUnit3
Java JUnit3
Customization Facets
MoDisco Models uses
ModelBrowser
JUnit3
Extract Queries
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 42
- 43. Model Driven Reverse Engineering
(MDRE) Approach
Transform
JUnit3 to JUnit4
M2M Transformation
Java model Java model
JUnit3 JUnit4
JUnit3
Facets
Regenerate Java source code
JUnit4 code
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 43
- 44. Eclipse-MDT MoDisco
An Eclipse framework to support
the elaboration of
Model Driven Reverse Engineering
solutions
Official Eclipse Modeling project (in MDT)
Open-source (EPL)
Based on other Eclipse Modeling projects
Released with Helios & Indigo
Supported by the OMG
Reference implementations for ADM (Architecture
Driven Modernization) standards:
KDM (Knowledge Discovery Metamodel)
SMM (Structured Metrics Metamodel)
ASTM (Abstract Syntax Tree Metamodel)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 44
- 45. MoDisco: Global Architecture
Supported Technologies
Java ...
JSP XML
Metamodel Metamodel
Metamodel
Discoverer Discoverer
Discoverer
Generator Generator
Generator
Transfo. to KDM/UML
Discovery Model Customization OMG/ADM
Manager Browser & Extensibility Standards
Plug and orchestrate Navigation through Definition of Pivot metamodels
transformations complex models specific viewpoints (KDM, ASTM, SMM)
Infrastructure
Eclipse Modeling projects
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 45
- 46. MoDisco Model Browser
A feature-rich Ecore model browser
Generic
(metamodel-
independent)
Customizable
(display, fonts,
colors, icons,
etc.)
Advanced
navigation &
search
capabilities
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 46
- 47. MoDisco Discoverer Manager
Define and register model discoverers
– Support for different legacy technologies
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 47
- 48. MoDisco Workflow
Specify reverse engineering processes
– Chain discoverers, transformations & generations
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 48
- 49. MoDisco Support for Java
Technology-specific components for Java
Complete
metamodel
Corresponding
discoverer &
generator
Transformation
to KDM
Advanced
composite
discoverer
(Java + KDM)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 49
- 50. MoDisco Support for JEE
Technology-specific components for JEE
Complete JSP
metamodel &
corresponding
discoverer
Discoverers for
web.xml & ejb-
jar.xml files
(based on XML)
+ generic
framework
JEE queries &
facets (based
on Java)
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 50
- 51. MoDisco Support for XML
Technology-specific components for XML
Generic support
(XSD- or DTD-
independent)
Complete
metamodel
(based W3C
specification)
Corresponding
discoverer
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 51
- 53. Thanks for your attention!
Useful links
– Eclipse Modeling Project
http://eclipse.org/modeling/
– Eclipse Labs “Modeling”
http://code.google.com/a/eclipselabs.org/hosting/search?q=label%3a
Modeling
– Eclipse-MDT MoDisco project
http://www.eclipse.org/MoDisco
AtlanMod Contact
– Hugo Bruneliere
R&D engineer & MoDisco project co-leader
hugo.bruneliere@inria.fr
21/09/2011 © AtlanMod - atlanmod-contact@mines-nantes.fr 53