MDE = Model Driven Everything Jordi Cabot   [email_address] INRIA – École des Mines de Nantes
Introduction <ul><li>In the beginning: MDA/MDD </li></ul><ul><li>Now MDE: endless possibilities </li></ul><ul><ul><li>DSLs...
Relationship between MDA/MDD/MDE
Technical Spaces MDE Grammarware MOF (metametamodel) UML (metamodel) ABank.uml EBNF.g Java.g MyProgram.java
Technical Spaces XML MDE Grammarware MOF (metametamodel) UML (metamodel) ABank.uml EBNF.g Java.g MyProgram.java XSD.xsd SV...
Introduction <ul><li>We will focus on the MDE techniques and tools developed by: </li></ul><ul><li>AtlanMod Team  </li></u...
At the core: Model Transformations – ATL
<ul><li>ATL  :  ATLAS Transformation Language .  ATL is a language and a virtual machine dedicated to model to model trans...
Operational context of ATL ATL MOF MMa MMb Ma Mb MMa2MMb.atl ATL MMa is the source metamodel Ma is the  source model Mb is...
ATL Editor
<ul><li>ATL Editor features: </li></ul><ul><ul><li>Type completion </li></ul></ul><ul><ul><li>Left-side bindings completio...
ATL  Launch Configuration
Weaving model <ul><li>Solution to capture relationships between (meta)model elements </li></ul><ul><li>Relationships are r...
AMW: Model Weaver Adaptive interface Identification mechanism Plugged panels
KM3 – Creating your own domain specific language
UML vs DSLs <ul><li>DSLs  are a very hot topic right now </li></ul><ul><li>DSLs allow designers to create modeling languag...
Overview of KM3 <ul><li>KM3 is a metametamodel: </li></ul><ul><ul><li>That is similar to MOF (OMG) and Ecore (Eclipse EMF)...
Example: a  relational  metamodel Named + name : String Table Column owner + col + * { ordered } keyOf + 0..1 key + * Type...
Example:  relational  metamodel in KM3 package  Relational { abstract   class  Named { attribute  name  :   String ; } cla...
KM3 in Use <ul><li>KM3 used as a pivot metamodel </li></ul><ul><li>KM3 can be used to represent various metamodels: </li><...
TCS - Textual Syntax Specification
Textual Concrete Syntaxes <ul><li>EMF provides abstract syntax for models.  </li></ul><ul><li>Two main ways of displaying ...
Context Intra-technology transformation: XML MDE Grammarware MOF Metamodel Model EBNF.g Grammar.g Program XSD.xsd Schema.x...
Intra-technology transformation: MDE Grammarware MOF Metamodel Model EBNF.g Grammar.g Program conformsTo Program transform...
TCS Overview <ul><li>Declaratively specify textual concrete syntaxes for metamodels: </li></ul><ul><ul><li>Customizable/us...
<ul><li>Metamodel excerpt: </li></ul><ul><li>abstract  class  ModelElement  { </li></ul><ul><li>attribute  name  : String;...
Textual Generic Editor for Eclipse <ul><li>Eclipse editor plugin: </li></ul><ul><ul><ul><li>Hyperlinks </li></ul></ul></ul...
Validation of UML Models
Stakeholder Explains Designer Models Structured English RuleSpeak . . . English Text Valida The double transformation faci...
Input UML Model SBVR intermediate representation M2M ATL Transf. product  Concept type:   object type  Necessity : each  p...
Model-driven Reverse Engineering / ADM
MoDISCO <ul><li>Instead of adhoc Rev. Eng. Solutions, we use an intermediate model-based representation of the legacy syst...
MoDISCO <ul><li>Modernizing an existing software system implies:  </li></ul><ul><ul><li>Describing the information extract...
MoDISCO
MoDISCO <ul><li>Remember since the Java code is represented as an instance of the Java Metamodel, we could  </li></ul><ul>...
Scalability concerns
Scalability <ul><li>NICE!  but what if I have huge models? </li></ul><ul><li>EMF works up to  </li></ul><ul><li>model elem...
Scalability: Our solution->EMF’ (work in progress) >10x FASTER Than EMF on common operations 3x SMALLER <ul><li>Trade-off:...
Examples of models with 5.10^6 elements? <ul><li>Model of the whole Eclipse SDK 3.4 source code (Java AST) </li></ul>Scala...
Megamodeling
AM3 Megamodeling Solution <ul><li>AM3 provides support for modeling in the large - Global Model Management </li></ul><ul><...
AM3 Environment
<ul><li>Megamodel Action (e.g. Transformation chain - ATL ANT script generation) </li></ul>AM3 Megamodeling Solution
Eclipse <-> Microsoft
Bridging Eclipse-EMF and Microsoft &quot;Oslo&quot; <ul><li>Oslo = SQL Server Modeling . Not clear yet the implications of...
The MDE Diploma
MDE Diploma in a nutshell Model Driven Engineering (MDE) is changing the way we build, operate, and maintain our software ...
<ul><li>Start of program: February 2010. </li></ul><ul><li>Location: Ecole des Mines de Nantes, Nantes, France </li></ul><...
MDE Diploma <ul><li>Module 1:  Prerequisites (60h) </li></ul><ul><ul><li>Free and Open Source Models for Software Developm...
MDE Diploma <ul><li>Module 3 :  Applications of MDE (120h)   </li></ul><ul><ul><li>Information Systems, Embedded Systems, ...
These are exciting times for MDE!!!!
BUT
Work ahead <ul><li>MDE is not as widespread as we would like (yet) </li></ul><ul><ul><li>E.g. in the survey  Tools for Tea...
Join the discussion in the  modeling-languages.com  portal
More information http://jordicabot.com http://modeling-languages.com http://www.emn.fr/x-info/atlanmod/
Upcoming SlideShare
Loading in …5
×

MDE=Model Driven Everything (Spanish Eclipse Day 2009)

2,499 views
2,411 views

Published on

Presentation showcasing the differente MDE techniques for Eclipse developed by the AtlanMod team at INRIA - École des Mines de Nantes

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,499
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
0
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide
  • To present you a method that helps the designer during the specification of the software system by automatically generating a set of operations for a given class diagram.
  • To present you a method that helps the designer during the specification of the software system by automatically generating a set of operations for a given class diagram.
  • MDE=Model Driven Everything (Spanish Eclipse Day 2009)

    1. 1. MDE = Model Driven Everything Jordi Cabot [email_address] INRIA – École des Mines de Nantes
    2. 2. Introduction <ul><li>In the beginning: MDA/MDD </li></ul><ul><li>Now MDE: endless possibilities </li></ul><ul><ul><li>DSLs </li></ul></ul><ul><ul><li>Model to model and model to text transformations </li></ul></ul><ul><ul><li>Model-driven Reverse Engineering </li></ul></ul><ul><ul><li>Megamodeling & Model management </li></ul></ul><ul><ul><li>Model V&V </li></ul></ul><ul><ul><li>Business Rules Reengineering </li></ul></ul><ul><ul><li>Tool interoperability </li></ul></ul><ul><ul><li>… </li></ul></ul>
    3. 3. Relationship between MDA/MDD/MDE
    4. 4. Technical Spaces MDE Grammarware MOF (metametamodel) UML (metamodel) ABank.uml EBNF.g Java.g MyProgram.java
    5. 5. Technical Spaces XML MDE Grammarware MOF (metametamodel) UML (metamodel) ABank.uml EBNF.g Java.g MyProgram.java XSD.xsd SVG.xsd MyFigure.svg M3 M2 M1
    6. 6. Introduction <ul><li>We will focus on the MDE techniques and tools developed by: </li></ul><ul><li>AtlanMod Team </li></ul><ul><li>INRIA & École des Mines de Nantes, </li></ul><ul><li>Nantes, France </li></ul><ul><li>http://www.emn.fr/x-info/atlanmod/ </li></ul>
    7. 7. At the core: Model Transformations – ATL
    8. 8. <ul><li>ATL : ATLAS Transformation Language . ATL is a language and a virtual machine dedicated to model to model transformations </li></ul><ul><li>A model transformation is the automatic creation of target models from source models. </li></ul><ul><li>The language is a declarative-imperative hybrid: </li></ul><ul><ul><li>Declarative part: </li></ul></ul><ul><ul><ul><li>Matched rules with automatic traceability support, </li></ul></ul></ul><ul><ul><ul><li>Side-effect free navigation (and query) language: OCL 2.0 </li></ul></ul></ul><ul><ul><li>Imperative part: </li></ul></ul><ul><ul><ul><li>Called rules, </li></ul></ul></ul><ul><ul><ul><li>Action blocks . </li></ul></ul></ul>ATL
    9. 9. Operational context of ATL ATL MOF MMa MMb Ma Mb MMa2MMb.atl ATL MMa is the source metamodel Ma is the source model Mb is the target model MMB is the target metamodel
    10. 10. ATL Editor
    11. 11. <ul><li>ATL Editor features: </li></ul><ul><ul><li>Type completion </li></ul></ul><ul><ul><li>Left-side bindings completion </li></ul></ul><ul><ul><li>Basic code templates </li></ul></ul>ATL Editor
    12. 12. ATL Launch Configuration
    13. 13. Weaving model <ul><li>Solution to capture relationships between (meta)model elements </li></ul><ul><li>Relationships are represented by a weaving model </li></ul><ul><ul><li>The model elements in the weaving model represent the relationships between the related elements </li></ul></ul><ul><ul><li>As any kind of model, the weaving model can be saved, stored, transformed, modified </li></ul></ul><ul><ul><li>Different kinds of links </li></ul></ul><ul><ul><ul><li>Equality, concatenation, equivalence, etc. </li></ul></ul></ul>
    14. 14. AMW: Model Weaver Adaptive interface Identification mechanism Plugged panels
    15. 15. KM3 – Creating your own domain specific language
    16. 16. UML vs DSLs <ul><li>DSLs are a very hot topic right now </li></ul><ul><li>DSLs allow designers to create modeling languages that perfectly fit a given domain (e.g. smaller and with elements that better map the domain semantics) </li></ul><ul><li>UML can be regarded as a collection of DSLs -> possible evolution of the UML </li></ul><ul><li>UML or DSLs? My pragmatic approach -> Create a DSL only when UML + simple profiles do not fit </li></ul>
    17. 17. Overview of KM3 <ul><li>KM3 is a metametamodel: </li></ul><ul><ul><li>That is similar to MOF (OMG) and Ecore (Eclipse EMF), </li></ul></ul><ul><ul><li>That is simple (i.e. less concepts than Ecore or MOF 1.4), </li></ul></ul><ul><ul><li>With a simple textual concrete syntax, </li></ul></ul><ul><ul><li>With a precise definition based on first order logic. </li></ul></ul><ul><li>Core concepts: </li></ul><ul><ul><li>Class used to type nodes of the model </li></ul></ul><ul><ul><ul><li>Supporting class inheritance, </li></ul></ul></ul><ul><ul><ul><li>Owning references, </li></ul></ul></ul><ul><ul><li>Reference used to type edges of the model : </li></ul></ul><ul><ul><ul><li>Having an opposite reference </li></ul></ul></ul>
    18. 18. Example: a relational metamodel Named + name : String Table Column owner + col + * { ordered } keyOf + 0..1 key + * Type * type +
    19. 19. Example: relational metamodel in KM3 package Relational { abstract class Named { attribute name : String ; } class Table extends Named { reference col [ * ] ordered container : Column oppositeOf owner ; reference key [ * ] : Column oppositeOf keyOf ; } class Column extends Named { reference owner : Table oppositeOf col ; reference keyOf [ 0 - 1 ] : Table oppositeOf key ; reference type : Type ; } class Type extends Named {} } […] Named + name : String Table Column owner + col + * { ordered } keyOf + 0..1 key + * Type * type +
    20. 20. KM3 in Use <ul><li>KM3 used as a pivot metamodel </li></ul><ul><li>KM3 can be used to represent various metamodels: </li></ul><ul><ul><li>There is a library with already 234 metamodels in various domains (e.g., BibTeX, COBOL, DTD, HTML, Java) </li></ul></ul><ul><li>KM3 metamodels can be created from and translated to other MDE variants: </li></ul><ul><ul><li>MOF 1.4, Ecore, MetaGME, Microsoft DSL Tools, etc. </li></ul></ul>
    21. 21. TCS - Textual Syntax Specification
    22. 22. Textual Concrete Syntaxes <ul><li>EMF provides abstract syntax for models. </li></ul><ul><li>Two main ways of displaying and editing models: </li></ul><ul><ul><li>Graphical notations -> GMF used to develop editors for graphical notations </li></ul></ul><ul><ul><li>Textual notations -> TMF Project (TCS) to create editors for custom textual notations. </li></ul></ul><ul><li>Graphical notations are often useful to describe structural concepts (e.g. class diagrams) </li></ul><ul><li>Textual notations are </li></ul><ul><ul><li>Better fit for describing behavior or algorithms (e.g. expressions) </li></ul></ul><ul><ul><li>Gaster and easier to modify, </li></ul></ul><ul><ul><li>Rich set of existing tooling for dealing with text files (diff, merge, copy & paste, search & replace ...). </li></ul></ul>
    23. 23. Context Intra-technology transformation: XML MDE Grammarware MOF Metamodel Model EBNF.g Grammar.g Program XSD.xsd Schema.xsd Document.xml M3 M2 M1 conformsTo XSLT & XQuery Program transformation ATL, QVT, etc. Inter-technology transformation XMI TCS
    24. 24. Intra-technology transformation: MDE Grammarware MOF Metamodel Model EBNF.g Grammar.g Program conformsTo Program transformation ATL, QVT, etc. Inter-technology transformation TCS Textual Concrete Syntaxes
    25. 25. TCS Overview <ul><li>Declaratively specify textual concrete syntaxes for metamodels: </li></ul><ul><ul><li>Customizable/user-friendly, </li></ul></ul><ul><ul><li>Without repeating what is in the metamodels, </li></ul></ul><ul><li>Automatically parse programs into models: </li></ul><ul><ul><li>Keep tracing information (e.g. line number), </li></ul></ul><ul><li>Automatically serialize models into programs: </li></ul><ul><ul><li>Pretty printing (automatic indentation), </li></ul></ul><ul><li>Provide a featured editor. </li></ul><ul><li>XText has the same goal. Differences </li></ul><ul><li>- In Xtext the metamodel is derived from the grammar. </li></ul><ul><li>- TCS binds a concrete syntax to an existing metamodel. </li></ul>
    26. 26. <ul><li>Metamodel excerpt: </li></ul><ul><li>abstract class ModelElement { </li></ul><ul><li>attribute name : String; </li></ul><ul><li>reference &quot;package&quot; : Package oppositeOf contents; </li></ul><ul><li>} </li></ul><ul><li>class Package extends ModelElement { </li></ul><ul><li>reference contents [*] ordered container : ModelElement oppositeOf &quot;package&quot;; </li></ul><ul><li>} </li></ul><ul><li>Excerpt of corresponding TCS model: </li></ul><ul><li>template ModelElement abstract ; </li></ul><ul><li>template Package main context </li></ul><ul><li>: &quot;package&quot; name &quot;{&quot; </li></ul><ul><li>contents </li></ul><ul><li>&quot;}&quot; </li></ul><ul><li>; </li></ul>Example: excerpt from the definition of KM3 (in KM3 and TCS) <ul><li>Excerpt of generated grammar: </li></ul><ul><ul><li>modelElement : package_ ; </li></ul></ul><ul><ul><li>package_ : &quot;package&quot; identifier LCURLY </li></ul></ul><ul><ul><li>(modelElement ( modelElement )* |) </li></ul></ul><ul><ul><li>RCURLY ; </li></ul></ul>
    27. 27. Textual Generic Editor for Eclipse <ul><li>Eclipse editor plugin: </li></ul><ul><ul><ul><li>Hyperlinks </li></ul></ul></ul><ul><ul><ul><li>Text hovers </li></ul></ul></ul><ul><ul><ul><li>Syntax highlighting </li></ul></ul></ul><ul><ul><ul><li>Outline with bidirectional synchronization </li></ul></ul></ul>
    28. 28. Validation of UML Models
    29. 29. Stakeholder Explains Designer Models Structured English RuleSpeak . . . English Text Valida The double transformation facilitates reusing the intermediate SBVR representation (e.g. generation for rule-based engines) Validation of UML Models * Work co-authored by Raquel Pau and Ruth Raventós UML CASE Tool UML Model Transf. M2M: UML to SBVR Transf M2T: SBVR to Natural Language SBVR Model ATL MofScript UML2
    30. 30. Input UML Model SBVR intermediate representation M2M ATL Transf. product Concept type: object type Necessity : each price of product is greater than zero price Concept type: role Definition: integer that represents the value of a product product has price Concept type: is-property-of fact type Necessity : each product has exactly one price family has code Concept type: is-property-of fact type Necessity : each family has exactly one code product belongs to family Concept type: associative fact type Necessity : each product belongs to exactly one family Structured English MOFScript Transf. Validation of UML Models
    31. 31. Model-driven Reverse Engineering / ADM
    32. 32. MoDISCO <ul><li>Instead of adhoc Rev. Eng. Solutions, we use an intermediate model-based representation of the legacy system </li></ul>
    33. 33. MoDISCO <ul><li>Modernizing an existing software system implies: </li></ul><ul><ul><li>Describing the information extracted out of the artifacts of this system </li></ul></ul><ul><ul><li>Understanding the extracted information </li></ul></ul><ul><ul><li>Transforming this information to new artifacts facilitating the modernization (metrics, document, transformed code, ...) </li></ul></ul><ul><li>MoDisco aims at supporting these three phases by providing : </li></ul><ul><ul><li>Metamodels to describe existing systems </li></ul></ul><ul><ul><li>Discoverers to automaticaly create models of these systems </li></ul></ul><ul><ul><li>Generic tools to understand and transform complex models created out of existing systems </li></ul></ul>
    34. 34. MoDISCO
    35. 35. MoDISCO <ul><li>Remember since the Java code is represented as an instance of the Java Metamodel, we could </li></ul><ul><ul><li>Query the model (e.g. using OCL) </li></ul></ul><ul><ul><li>Transform it to other representations (e.g. generate a C# version) </li></ul></ul><ul><ul><li>Analyze it </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><ul><li>using existing Eclipse/EMF tools </li></ul></ul>
    36. 36. Scalability concerns
    37. 37. Scalability <ul><li>NICE! but what if I have huge models? </li></ul><ul><li>EMF works up to </li></ul><ul><li>model elements </li></ul><ul><li>and then it crashes… </li></ul>5 000 000 <ul><li>Ex. of a model with 5.10^6 elements: Model of the whole Eclipse SDK 3.4 source code (Java AST) </li></ul>
    38. 38. Scalability: Our solution->EMF’ (work in progress) >10x FASTER Than EMF on common operations 3x SMALLER <ul><li>Trade-off: Less features (e.g. no event notification system) </li></ul><ul><li>Alternative to EMF for HUGE models </li></ul>
    39. 39. Examples of models with 5.10^6 elements? <ul><li>Model of the whole Eclipse SDK 3.4 source code (Java AST) </li></ul>Scalability
    40. 40. Megamodeling
    41. 41. AM3 Megamodeling Solution <ul><li>AM3 provides support for modeling in the large - Global Model Management </li></ul><ul><li>A MDE project usually requires to manage a set of MDE resources (models, metamodels, transformations, …) and the relationships between them  Megamodel </li></ul><ul><li>Similar to a metadata repository on involved modeling artifacts </li></ul><ul><li>AM3 provides facilities to create, handle, manage and use the megamodel </li></ul>
    42. 42. AM3 Environment
    43. 43. <ul><li>Megamodel Action (e.g. Transformation chain - ATL ANT script generation) </li></ul>AM3 Megamodeling Solution
    44. 44. Eclipse <-> Microsoft
    45. 45. Bridging Eclipse-EMF and Microsoft &quot;Oslo&quot; <ul><li>Oslo = SQL Server Modeling . Not clear yet the implications of this change </li></ul><ul><li>Practical bridges between these two standards would be useful in industrial environments </li></ul><ul><li>First step (already done): moving the ATL environment to the Microsoft .NET platform </li></ul>
    46. 46. The MDE Diploma
    47. 47. MDE Diploma in a nutshell Model Driven Engineering (MDE) is changing the way we build, operate, and maintain our software systems The human skills necessary to handle these projects are currently not widely available. <ul><li>The MDE Diploma pretends to cover this gap: </li></ul><ul><li>A Comprehensive master on Advanced Software Production, operation and maintenance based on MDE </li></ul><ul><li>Trains engineers to manage complex projects with the latest cutting-edge modeling technologies </li></ul>
    48. 48. <ul><li>Start of program: February 2010. </li></ul><ul><li>Location: Ecole des Mines de Nantes, Nantes, France </li></ul><ul><li>Full time with visits to applications sites </li></ul><ul><li>Duration 1 year </li></ul><ul><li>One semester at the EMN (360 hours - 4.5 months) + 6 month internship wokring on an industrial application of MDE </li></ul>Structure
    49. 49. MDE Diploma <ul><li>Module 1: Prerequisites (60h) </li></ul><ul><ul><li>Free and Open Source Models for Software Development </li></ul></ul><ul><ul><li>Practical Software Development with Eclipse </li></ul></ul><ul><ul><li>Software Modeling including OMG MDA standards </li></ul></ul><ul><li>Module 2: Fundamentals/Core (120h) </li></ul><ul><ul><li>Fundamentals of Metamodeling and Domain Modeling </li></ul></ul><ul><ul><li>Theory and Practice of Model Transformation: M2M, M2T </li></ul></ul><ul><ul><li>Advanced Model Management: Repositories & </li></ul></ul><ul><ul><li>Collaborative Development </li></ul></ul><ul><ul><li>Basic Model Driven Software Development </li></ul></ul>
    50. 50. MDE Diploma <ul><li>Module 3 : Applications of MDE (120h) </li></ul><ul><ul><li>Information Systems, Embedded Systems, Web Engineering, Process Engineering, System Engineering </li></ul></ul><ul><ul><li>Security, … </li></ul></ul><ul><li>Module 4: Management of MDE projects (60h) </li></ul><ul><ul><li>Alignment of Business Needs with Technical Platforms </li></ul></ul><ul><ul><li>Social/Organizational requirements of MDE processes? </li></ul></ul><ul><ul><li>Human and Organizational Factors </li></ul></ul><ul><li>Module 5: A Six-Months Internship </li></ul><ul><ul><li>A co -op stay in a company or in a lab to work on an MDE </li></ul></ul><ul><ul><li>project USEFUL FOR THE COMPANY </li></ul></ul>
    51. 51. These are exciting times for MDE!!!!
    52. 52. BUT
    53. 53. Work ahead <ul><li>MDE is not as widespread as we would like (yet) </li></ul><ul><ul><li>E.g. in the survey Tools for Teams: A Survey of Web-Based Software Project Portals (Cabot & Wilson, Dr. Dobbs Journal) none of the tools covered modeling activities as part of the dev. process. </li></ul></ul><ul><li>Some challenges </li></ul><ul><ul><li>Right amount of modeling (e.g. my pareto’s principle for MDD) </li></ul></ul><ul><ul><li>Tool interoperability </li></ul></ul><ul><ul><li>Pains and gains of software modeling </li></ul></ul><ul><ul><li>Socio-technical congruence of MDE processes </li></ul></ul><ul><ul><li>All techniques initially decrease productivity -> mid/long-term investment </li></ul></ul><ul><ul><li>Usability </li></ul></ul><ul><ul><li>Guidelines for adopting MDE processes </li></ul></ul>
    54. 54. Join the discussion in the modeling-languages.com portal
    55. 55. More information http://jordicabot.com http://modeling-languages.com http://www.emn.fr/x-info/atlanmod/

    ×