Model Transformation Languages for Domain-Specific Workbenches

Model Transformation Languages for Domain-Specific Workbenches

Model Transformation Languages for Domain-Specific Workbenches DISSERTATION zur Erlangung des akademischen Grades doctor rerum naturalium (Dr. rer. nat.) im Fach Informatik eingereicht an der Mathematisch-Naturwissenschaftlichen Fakultät Humboldt-Universität zu Berlin von Arif Wider Präsident der Humboldt-Universität zu Berlin: Prof. Dr. Jan-Hendrik Olbertz Dekan der Mathematisch-Naturwissenschaftlichen Fakultät: Prof. Dr. Elmar Kulke Gutachter: 1. Prof. Dr. Joachim Fischer, Humboldt-Universität zu Berlin 2. Prof. Dr. Andreas Prinz, University of Agder, Norway 3. Prof. Dr. Krzysztof Czarnecki, University of Waterloo, Canada eingereicht am: 2. September 2014 Tag der Verteidigung: 18. November 2015 iii Abstract Domain-specific languages (DSLs) are software languages which are tailored to a specific application domain. DSLs enable domain experts to create domain-specific models, that is, high-level descriptions of domain knowledge. As any other software languages, DSLs rely on language tools which provide assistance for processing and managing domain-specific models. A domain-specific workbench is an integrated set of such tools for a DSL. A recently proposed approach is to automatically generate a domain-specific workbench for a DSL from a description of that DSL. However, existing tools which apply this approach do not support to describe and generate editable domain-specific views. A view is a part of domain-specific workbench that presents only one aspect of a model, for example, its hierarchical structure. This dissertation presents special model transformation languages which support the description of view synchronization in a generated domain-specific workbench. This allows a multi-view domain-specific workbench to be created with existing tools for language tool generation. We present a generated domain-specific workbench for the nanophysics domain and present a taxonomy of synchronization types. This allows us to precisely define what model transformations are required for view synchronization in that work- bench. According to these requirements, we develop two transformation languages by adapting existing ones. In particular, we develop a bidirectional transformation language. With such a language one can describe a relation which defines whether two models are in sync and let the synchronization logic be inferred automatically. We implement model transformation languages as internal DSLs – that is, embed- ded as expressive libraries – in the Scala programming language and use Scala’s type checking for static verification of transformations and their composition. iv Zusammenfassung Domänenspezifische Sprachen (engl. domain-specific languages, DSLs) sind Soft- ware-Sprachen, die speziell für eine bestimmte Anwendungsdomäne entwickelt wur- den. Mithilfe von DSLs können Domänenexperten ihr Domänenwissen auf einem hohen Abstraktionsniveau beschreiben und so domänenspezifische Modelle erstellen. Wie andere Software-Sprachen auch, benötigen DSLs Sprachwerkzeuge, die Assistenz bei der Erstellung und Verarbeitung von domänenspezifischen Modellen bieten. Ei- ne domänenspezifische Werkbank ist ein Software-Werkzeug, welches mehrere solcher Sprachwerkzeuge für eine DSL miteinander integriert. In den letzten Jahren wurde ein Ansatz entwickelt, der es erlaubt eine domänenspezifische Werkbank aufgrund der Beschreibung einer DSL automatisch generieren zu lassen. Existierende Werk- zeuge, die diesen Ansatz anwenden, unterstützen jedoch nicht die Beschreibung und Generierung von editierbaren domänenspezifischen Sichten. Eine Sicht ist ein Teil ei- ner domänenspezifischen Werkbank, der nur einen bestimmten Aspekt eines Modells darstellt, beispielsweise dessen hierarchische Struktur. Diese Dissertation stellt spezielle Modelltransformationssprachen vor, mit denen die Synchronisation von Sichten in einer generierten domänenspezifischen Werkbank beschrieben werden kann. Dadurch können domänenspezifische Werkbänke mit edi- tierbaren Sichten mittels existierender Werkzeuge zur Generierung von Sprachwerk- zeugen erstellt werden. Dafür wird eine domänenspezifische Werkbank für die Nanophysik-Domäne so- wie eine Taxonomie von Synchronisationstypen vorgestellt, welche es erlaubt genau zu bestimmen, welche Art von Modelltransformationen für die Synchronisation von Sichten in dieser Werkbank benötigt werden. Entsprechend dieser Anforderungen werden zwei Modelltransformationssprachen entwickelt, und zwar indem existieren- de Transformationssprachen entsprechend angepasst werden. Insbesondere wird ei- ne bidirektionale Transformationssprache entwickelt. Mit solch einer Sprache kann man eine Relation, welche definiert ob zwei Modelle synchron sind, so beschreiben, dass die entsprechende Synchronisationslogik automatisch abgeleitet werden kann. Die gezeigten Modelltransformationssprachen werden als interne DSLs – das heißt eingebettet als ausdrucksstarke Bibliotheken – in der Programmiersprache Scala implementiert. Auf diese Weise kann Scalas Typprüfung genutzt werden, um Trans- formationen und deren Komposition statisch zu verifizieren. v Acknowledgements First and foremost I want to thank my supervisor Prof. Achim Fischer for his trust, his continuous support, and for giving me the freedom to pick my research topic and my approach as I saw fit. Furthermore, I am grateful to all the people who supported and inspired me over the years: Prof. Ulrich Grude and Prof. Sebastian von Klinski from my Alma Mater TFH Berlin for encouraging me to pursue a PhD in the first place; my parents for always encouraging me and for their unrestricted support; my colleagues at graduate training group METRIK, in particular Daniel Sadilek and Guido Wachsmuth for helping me to identify my topic, and Siamak Haschemi and Markus Scheidgen for their continuous discussions, feedback, and co-authoring efforts; Frank Kühnlenz, Michael Frey, Andreas Reimer, Dirk Fahland, Sebastian Heglmeier, Stephan Weißleder, Michael Soden, Joanna Geibig, Artin Avanes, Christoph Wagner, Jens Nachtigall, Andreas Dittrich, Jan Calta, Hartmut Lackner, Björn Lichtblau, Matthias Sax, Christian Blum, and Andreas Blunk for their company and solidarity, in particular at numerous METRIK evaluation work- shops; Martin Schmidt and Lars George whose master theses I was happy to supervise and who are now PhD candidates themselves - without them this work would not have been possible; Michael Barth, Janik Wolters, and Prof. Benson from the nano-optics group for the great cooperation; the professors of METRIK for their valuable feedback, in particular Prof. Holger Schlingloff for his co-supervision and for welcoming me in his research group; Zinovy Diskin for early inspiration and many fruitful discussions a few years later; Prof. Eelco Visser, Prof. Andreas Prinz, Prof. Krzysztof Czarnecki, and Prof. Zhenjiang Hu for welcoming me at their institutions for research visits; the DFG and the DAAD for their financial and organisational support; Gabriele Graichen, Marita Albrecht, Manfred Hagen, and Silvia Schoch for their continuous administrative support; Tony Crawford for valuable corrections and suggestions regarding my writing; the various coffee shops where I wrote large parts of this dissertation, in particular Niels and Malte from Leuchtstoff Kaffeebar, Kamee, Thor, Oslo kaffebar, Westberlin, Five Elephant, and No Fire No Glory. Finally, and most importantly I want to thank my lovely wife Olivera, not only for her invaluable support over the years but also for the countless hours of actively helping me understanding my research problems and helping me with the completion of this dissertation. vii Contents 1 Introduction 1 1.1 View Synchronization in Generated Language Tooling . 2 1.2 Problem Statement . 4 1.3 Approach . 6 1.4 Hypothesis and Assumptions . 6 1.5 Contributions and Structure . 7 2 Foundations 11 2.1 Model-Driven Engineering . 11 2.1.1 Modeling in Science & Engineering . 11 2.1.2 Modeling in Software Engineering & Model-Driven Engineering . 12 2.1.3 Metamodeling: An Object-Oriented Perspective . 13 2.1.4 Model Transformations . 16 2.2 Software Language Engineering . 19 2.2.1 What is a Language? . 19 2.2.2 Describing a Language . 22 2.2.3 Metamodeling: A Language Engineering Perspective . 25 2.2.4 Modeling Languages, Programming Languages, and DSLs . 27 2.2.5 Internal and External Domain-Specific Languages . 30 2.2.6 Creating Domain-Specific Language Tooling . 34 2.3 The Eclipse Modeling Framework . 37 2.3.1 The Ecore Meta-Metamodel and Single Containment . 37 2.3.2 Generated Java Types and Element Creation in EMF . 38 2.4 The Scala Programming Language . 39 2.4.1 Java Interoperability . 39 2.4.2 Flexible Syntax and Type Inference . 40 2.4.3 Function Objects and the Fluent Interface Pattern . 40 2.4.4 Implicit Conversions . 41 2.4.5 Case Classes and Pattern Matching . 41 2.4.6 Type Parameters, Type Bounds, and Type Argument Inference . 42 3 Model Synchronization in a Domain-Specific Workbench 43 3.1 The NanoWorkbench – A Workbench for Experimental Physics . 43 3.1.1 The Domain: Simulation-Driven Nanostructure Development . 43 3.1.2 Applying MDE to Nanostructure Development . 45 viii Contents 3.1.3 The NanoDSL: A Textual Language for Describing Experiments . 46 3.1.4 Model Transformation: Code Generation and Multiple Views . 50 3.1.5 Approaches to Multi-View Modeling . 53 3.1.6 The NanoWorkbench as a Network of Models & Transformations . 54 3.2 A Taxonomic Space for Increasingly Symmetric Model Synchronization . 57 3.2.1 From Transformation Pipelines to Networks of Models . 57 3.2.2 What is Model Synchronization? . 58 3.2.3 Organizational

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    204 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us