Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Lightweight Model-Driven Engineering

1,997 views

Published on

Revisiting all aspects of model-driven engineering (application, teaching, verification , tooling, research,...) promoting a lightweight perspective to maximize MDE success and adoption

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Lightweight Model-Driven Engineering

  1. 1. Lightweight Model-Driven Engineering Jordi Cabot @softmodeling – jordicabot.com June 2017
  2. 2. About
  3. 3. SOM Research Lab Software runs the world. Models run the software
  4. 4. Nuestra misión Interested in the broad area of systems and software engineering, especially promoting the rigorous use of software models and engineering principles in all software engineering tasks. Flickr/clement127
  5. 5. Disclaimer
  6. 6. “As a writer, my job is to change your perspective and make you think outside the box.” - Mary Sage Nguyen
  7. 7. Based on my background  But keynote used as an excuse to reflect about  Algú tirant-se a la piscina
  8. 8. MDE Preliminaries
  9. 9. • Grady Booch – history of softwre engineering The entire history of software engineering is that of the rise in levels of abstraction - Grady Booch Goal: Write less and less code
  10. 10. Everybody is doing it
  11. 11. MDE is just the logical next step
  12. 12. Model Rapid prototyping Static analysis Code generation Automated testing Refactoring/ Transformation Documentation [Illustration by Bernhard Rumpe] MDE = Models as key elements in all aspects of Software Engineering
  13. 13. The MDE equation Models + Transformations = Software
  14. 14. Original model 1st refinement nth refinement Model-to-model Transformation Model-to-text Transformation ... Requirements Use Case Class Diagram Java Project
  15. 15. What is a model 18 City of Nantes = “system” to be modeled A map is a model of this system Its legend is the grammar/ metamodel Different maps can focus on different “views” of the city
  16. 16. Not so different from languages MDE Grammarware MOF (metametamodel) UML (metamodel) ABank.uml EBNF.g Java.g MyProgram.java
  17. 17. (common-sense) code generation
  18. 18. MDE benefits +productivity +quality +Maintenance …. 2X – 8X 1.2X – 4X 80%
  19. 19. http://matt.might.net/articles/phd-school-in-pictures I’ll skip my over 500 “introductory” slides to MDE (but they are onine)
  20. 20. Lightweight adoption of MDE
  21. 21. BUT he is saying this since 1985
  22. 22. Is MDE dead?
  23. 23. There is still money to be made on this market
  24. 24. Do you really think Agile has more market penetration?
  25. 25. MDE Adoption
  26. 26. • Asterix view : resistentes al modelado
  27. 27. To model, or not to model, this is the WRONG question - Shakespeare
  28. 28. What/when/how many models ? - Depends on: Size, Team, Domain, Complexity Real question
  29. 29. Why lightweight MDE
  30. 30. Even if MDE is not dead… We can do better Increase adoption Focus on what matters to users Not losing the perspective
  31. 31. MDE Research vs User needs & interests
  32. 32. Nés papites que el papa Oh great UML Spirit, please grant me the insight to valuably use the UML, the strength to challenge its misuse, and the wisdom to
  33. 33. MetaModelers anonymousMetamodelers anonymous
  34. 34. UML Fever + UML prayer
  35. 35. Operación bikini
  36. 36. Revisiting MDE under a ligthweight perspective
  37. 37. Lightweight application of MDE
  38. 38. Everything is a model
  39. 39. Models in real development processes
  40. 40. Agile Modeling
  41. 41. Collaboro: end-user driven DSL Development • Providing means to discuss about language elements • Overcoming technical barriers Participation • Suitable environment fostering end-user discussion • Facilitating voting and decision processes • Keeping traceability Collaboration
  42. 42. Collaboro process
  43. 43. Discussing the abstract syntax
  44. 44. Discussing the concrete syntax
  45. 45. Representing collaborations
  46. 46. Lightweight learning of MDE
  47. 47. MDE4EDU
  48. 48. What can we learn from this? How to effectively teach MDE?
  49. 49. 1st Attempt: Students as MDE devs 45h MDE Foundations MDE core technologies DSLs M2M M2T Methodology and Infrastructure Exercises on building new MDE artefacts (e.g. a new modeling language with code- generation) Too complicated – surviving mode MDE as devs – unlikely role in practice
  50. 50. 2nd Attempt: Students as MDE users 45h MDE Foundations MDE core technologies Methodology and Infrastructure Case Study 1: Java – to – UML reverse engineering Caset Study 2: Code-generation of a CRUD web- based app CSs chosen to highlight the benefits of MDE
  51. 51. Better in theory – Blame the tools for the results Lots of installation problems Lack of optimization for the generated app Tool crashes and corrupted projects Lack of documentation Difficult to customize the code
  52. 52. Blame the chosen examples Maybe good for the database and back-end, not the front-end This can already be done with current programming frameworks Missing common pre-implemented patterns (login, social networks) Difficult trade-off. • Too expressive and people feel it’s a huge investment to learn • Too simple and people don’t perceive the benefits
  53. 53. • Start with a very compelling development scenario • Change the requirements late in the development • Use a repetitive scenario • Compile a set of reference examples to give a kickstart • Keep you target audience in mind For instructors • Document, document and document • Hide all underlying technical details (also for errors) • Offer a well-packaged and standalone installation • Keep up with the trends in the software industry • Favour trust over everything else For tool vendors
  54. 54. MDE4EDUhttps://mde4edu.github.io/
  55. 55. PAPYRUS GAMIFICATION
  56. 56. GAMIFICATION FRAMEWORK FOR END USERS - THE DSL
  57. 57. GAMIFICATION FOR END USERS - THE TOOL NOTIFICATION S SUBMIT FORMQUERY DEFINITIONS GAME STATISTICS https://github.com/SOM-Research/gamification-modeling-learning
  58. 58. Lightweight verification for MDE
  59. 59. 68 Original model 1st refinement nth refinement Model Transformation Model Transformation Source Code ... MDE-based software development process Errors in models breed and generate more errors in the code Why model verification
  60. 60. Even “trivial” models can be wrong Student EnrolsIn20..* Course Likes 1 5 1
  61. 61. Person name: string children 2 * + constraint : Nobody can be his own ancestor parent
  62. 62. 71 © AtlanMod - atlanmod-contact@mines-nantes.fr …. .No finite (and non-empty) solution
  63. 63. Consistent? Proven? Formalism / Logics • Dynamic Logic (KEY) • High-Order Logics (HOL-OCL) • Deductive database queries (CQC) • SAT (Alloy + UML2Alloy), … Translate Prove Deduce UML model Class diagram + OCL constraints Typical solutions
  64. 64. MDE A Grand Challenge
  65. 65. Verification Automation Efficiency Expressiveness Precision(completeness) Pick only 2-3
  66. 66. Our pragmatic approach: Bounded verification 75 Solution? Constraint Satisfaction Problem 1. Variables – basic types + struct/list 2. Domains – finite 3. Constraints – Prolog 4. Property  Additional Constraint Translate Solve Deduce Property? + Model Constraints
  67. 67. Resolution of the CSP Define cardinality variables Constraints on cardinalities Assign cardinalities Define attribute variables Constraints on attributes Assign attributes Proof
  68. 68. ATLTest (testing of M2M) 7 7 White-box approach: Analyzing the ATL code to derive test models that “exercise” it
  69. 69. Lightweight MDE tooling
  70. 70. Eclipse, Papyrus… are great for our community OPEN SOURCE Part of eclipse POWERFUL STABLE AND RELIABLE WORLDWIDE USED INDUSTRIAL-GRADE
  71. 71. Moving to the web: Back-end
  72. 72. Java Environment XMI EMF-REST proposal 81 JAVASCRIPT + Web Environment JAVASCRIPT + REST API EMF-REST
  73. 73. EMF-REST proposal 82 Collaboration Scalability Portability
  74. 74. • Addressable resources – Eclipse: platform:/resource/project/Simpsons.xmi – Web API: https://example.com/rest/Family/Simpsons  Uniform and Constrained Interface & Statelessness ‒ CRUD operations using HTTP verbs : POST, GET, PUT, DELETE PUT https://example.com/rest/Family/Simpsons/parents/Homer • Representation-oriented – JSON: {"family":{"address":"742 Evergreen Terrace",…}} – XML: <family><address>742 Evergreen Terrace</address></family> 83
  75. 75. NeoEMF
  76. 76. Moving to the web: Client-side
  77. 77. Towards Automatic Generation of Web-based Modeling Editors Manuel Wimmer, Irene Garrigós, and Sergio Firmenich ICWE 2017
  78. 78. JavaScript client 87 Existing solution: IDE-based Modeling Editor M2T Java code EuGENia GMFM2MM2T Stencil code JointJs Runtime GMF Runtime DSML Definition Our contribution: Web-based Modeling Editor P l a t f o r m P l a t f o r m  Model-to-Text (M2T) transformation to generate Stencils for the JointJS platform from EuGENia annotated metamodels
  79. 79. ExamplesWeb-based Editor
  80. 80. Show me only what I need to see
  81. 81. Lightweight MDE in other fields
  82. 82. Governance of open source projects
  83. 83. Code Community
  84. 84. Governance of open source projects is not explicit
  85. 85. ******
  86. 86. Project myProject { Roles: Committers Deadlines: myDeadline : 7 days Rules: myMajorityRule : Majority { applied to Task when TaskReview people Committers range Present minVotes 3 deadline myDeadline } } All the proposals for new development tasks will be accepted or rejected in 7 days by the committers of the project. Verbalization
  87. 87. Lightweight MdE for open data
  88. 88. “the goal of the project is to make the promise of open data a reality by giving non-technical users tools they can use to find and compose the information they need”
  89. 89. ? API Discovery: What APIs / open data sources?
  90. 90. ? S1 S2 S1 S2 ¿Y cómo los puedo combinar?
  91. 91. JSON Discoverer – Extracting implicit models in JSON documents
  92. 92. JSON Discoverer
  93. 93. Open Data for All
  94. 94. UML IFML GraphQL Schema
  95. 95. Lightweight Knowledge to use MDE
  96. 96. Cognification: The application of knowledge to boost the performance and impact of a process
  97. 97. During the industrial revolution, every machine got an electrified version The next revolution is the cognificatinof everything via cheap access to specialized AIs
  98. 98. Cognification ML Crowdsourcing Ontologies Big Data …
  99. 99. Cognifying MDE: 5 examples Modeling bot as virtual assistant Model inferences to discover schema of unstructured data A code generator that mimicks a company programming style A real-time model reviewer A morphing modeling tool that adapts to the user profile
  100. 100. PhD thesis – CEA + SOM PhD Thesis: CEA + SOM
  101. 101. Final Thoughts: Research on Lightweight MDE
  102. 102. Most research papers on MDE are completely irrelevant for (most) end-users Category Theory for MT ATL MapReduce Temporal UML
  103. 103. More research on useful topics!
  104. 104. We live in a MDE multi-verse We need to develop domain- specific MDEs to better serve the needs of users in different domains
  105. 105. "Publishing something in the most advanced journal doesn't change the world … What changes the world is converting research to something that is available in the market, pleases customers and improves the quality of life“ – Tharman. Deputy PM. Singapore
  106. 106. GrandMDE at STAF’17 • Screenshot of the program
  107. 107. http://modeling-languages.com
  108. 108. Get in touch jordi.cabot@ icrea.cat @softmodeling

×