language models and megamodels tutorial on megamodelling
play

Language, Models and Megamodels Tutorial on Megamodelling Anya - PowerPoint PPT Presentation

Language, Models and Megamodels Tutorial on Megamodelling Anya Helene Bagge Bergen Language Design Laboratory University of Bergen SATToSE14 2014-07-10 Bagge (UiB / BLDL) Megamodelling 2014-07-10 1 / 18 Learning Outcomes What is a


  1. Language, Models and Megamodels Tutorial on Megamodelling Anya Helene Bagge Bergen Language Design Laboratory University of Bergen SATToSE’14 2014-07-10 Bagge (UiB / BLDL) Megamodelling 2014-07-10 1 / 18

  2. Learning Outcomes What is a model? ...a metamodel? ...a megamodel? Why would would you need one? Relations between models Kinds of megamodels Mega patterns Practical megamodelling I’m a language engineer, so we’ll start from a language perspective. Bagge (UiB / BLDL) Megamodelling 2014-07-10 2 / 18

  3. So... What’s a Language? A language is a form of communication has structure carries meaning is/creates abstraction → → ∗ → ← → → → Bagge (UiB / BLDL) Megamodelling 2014-07-10 3 / 18

  4. Languages Software language: Artificial Kinds: language used in software Natural development Programming, Modelling, Artificial Data representation, Formal Ontologies, APIs, ... Forms: Spoken Diagrams Written Purpose: General-Purpose Domain-specific Can define arbitrary abstractions Bagge (UiB / BLDL) Megamodelling 2014-07-10 4 / 18

  5. What’s a model? A model is a simplification of a system build with an intended goal in mind. The model should be able to answer questions in place of the actual system ∗ Typically, a model represents a system System may be abstract or real May also be used in the sense of a type/class, example, instance, mold Descriptive or prescriptive * [Bézivin, Gerbé, Towards a Precise Definition of the OMG/MDA Framework ] Bagge (UiB / BLDL) Megamodelling 2014-07-10 5 / 18

  6. ...aaand a metamodel? A metamodel is model of a modelling language Modelling Language ← models ← writtenIn ← conformsTo Metamodel Model Bagge (UiB / BLDL) Megamodelling 2014-07-10 6 / 18

  7. ’Sup With Megamodels? A megamodel is model of a system of models Bagge (UiB / BLDL) Megamodelling 2014-07-10 7 / 18

  8. A Totally Unrelated Example: Climate Modelling . . Bagge (UiB / BLDL) Megamodelling 2014-07-10 8 / 18

  9. A Totally Unrelated Example: Climate Modelling . ← reprOf . Bagge (UiB / BLDL) Megamodelling 2014-07-10 8 / 18

  10. A Totally Unrelated Example: Climate Modelling . ← reprOf . Bagge (UiB / BLDL) Megamodelling 2014-07-10 8 / 18

  11. A Totally Unrelated Example: Climate Modelling . ← impacts → ← reprOf . Bagge (UiB / BLDL) Megamodelling 2014-07-10 8 / 18

  12. A Totally Unrelated Example: Climate Modelling . ← impacts → ← reprOf ← reprOf . Bagge (UiB / BLDL) Megamodelling 2014-07-10 8 / 18

  13. A Totally Unrelated Example: Climate Modelling . ← impacts → ← reprOf impacts? → impacts? → ← reprOf ? . Bagge (UiB / BLDL) Megamodelling 2014-07-10 8 / 18

  14. Why Would You Need a Megamodel? Things to model: To understand your system: Languages Models have implicit relations and Technologies assumptions: Programs What technologies are in the Transformations environment? How does this model relate to other Relations models? (e.g. models may show ... different views of same system) Relationships: Systems of models may very complex Conformance Need a model to understand them! Transformation Supporting MDE with model Composition management Representation Define software architecture ... Bagge (UiB / BLDL) Megamodelling 2014-07-10 9 / 18

  15. Megamodel Relations Ad hoc megamodelling: Jean-Marie’s relations: Draw a diagram with models µ : representationOf Add relations between them ǫ : elementOf Relations are in natural language δ : decomposedIn Focus is on understanding and χ : conformsTo communicating. E.g.: Program is ElementOf Language , Grammar is RepresentationOf Language , Program ConformsTo Grammar , System is DecomposedIn Component Bagge (UiB / BLDL) Megamodelling 2014-07-10 10 / 18

  16. Megamodel Relations Relations in MegaL: [Favre, Lämmel, and Varanovich, Modeling the Linguistic Architecture of Software Products ] Bagge (UiB / BLDL) Megamodelling 2014-07-10 11 / 18

  17. Megamodel Relations Relations in MegaL: :Language subsetOf :Language :Artifact partOf :Artifact :Artifact elementOf :Language :Artifact correspondsTo :Artifact :Language domainOf :Function :Artifact dependsOn :Artifact :Function hasRange :Language :Artifact dependsOn :Language :FunctionApplication elementOf :Function :Artifact realizationOf :Function :Artifact inputOf :FunctionApplication :Artifact definitionOf :Language :FunctionApplication hasOutput :Artifact :Program partOf :Technology :Artifact conformsTo :Artifact :Library partOf :Technology [Favre, Lämmel, and Varanovich, Modeling the Linguistic Architecture of Software Products ] Bagge (UiB / BLDL) Megamodelling 2014-07-10 11 / 18

  18. Megamodel Patterns Example: Specification/Language/Program or Metamodel/Language/Model reprOf → MM L MM L ← conformsTo elementOf → → ... ... M M reprOf → reprOf → [Favre, Megamodelling and etymology. A story of words: from MED to MDE via MODEL in five millenniums ] Bagge (UiB / BLDL) Megamodelling 2014-07-10 12 / 18

  19. Practical Megamodelling: Modelling Language Artifacts structural editing Abstract Ast implode explode n o i Layoutless t a parse m Tok Cst r o unparse f s n a format format r strip strip t e d o c parse Layout refactoring Ptr Tkl unparse tokenize concat text editing Text Str Flat Structured [Zaytsev & Bagge: Parsing in a Broad Sense] Bagge (UiB / BLDL) Megamodelling 2014-07-10 13 / 18

  20. Practical Megamodelling: Modelling Language Artifacts Abstract Ast ← reprOf Layoutless ← structOf Cst Tok ← reprOf ← reprOf Layout ← structOf Tkl Ptr ← reprOf Text Str Flat Structured [Zaytsev & Bagge: Parsing in a Broad Sense] Bagge (UiB / BLDL) Megamodelling 2014-07-10 14 / 18

  21. MegaL [Favre, Lämmel, and Varanovich, Modeling the Linguistic Architecture of Software Products ] Bagge (UiB / BLDL) Megamodelling 2014-07-10 15 / 18

  22. Another Example: Astronomical Simulation Software [Favre, Megamodelling and etymology. A story of words: from MED to MDE via MODEL in five millenniums ] Bagge (UiB / BLDL) Megamodelling 2014-07-10 16 / 18

  23. Summary Language is structured and meaningful communication Models abstract over and represent systems Metamodels are models of (modelling) languages Megamodels are models of systems of models Aimed at understanding (for humans) Makes relationships explicit Identifies roles – and missing models Bagge (UiB / BLDL) Megamodelling 2014-07-10 17 / 18

  24. Image credits: 3/Vase: Guillaume Blanchard (CC-BY-SA-1.0) 3/Sun: Alan Murray Walsh / www.geograph.org.uk (CC-BY-SA-2.0) 3/Duck: J.M.Garg / Wikimedia (GNU-FDL) 3/Father and son: Onkelbo / Wikimedia (GNU-FDL) 3/Hatshepsut: Keith Schengili-Roberts / Wikimedia / Ägyptisches Museum Berlin (CC-BY-SA-3.0) 5/System model: Phil’s Astronomy Blog 6/Solar system model: Mrs. Studivan 8/Earth: NASA (public domain) 8/Climate model: NOAA (public domain) 8/People: James Cridland (CC-BY) 8/The Sims cover: EA 10/Jean-Marie Favre: Eelco Visser Bagge (UiB / BLDL) Megamodelling 2014-07-10 18 / 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend