Deep, Seamless, Multi-Format, Multi-Notation Definition and Use of Domain-Specific Languages
Total Page:16
File Type:pdf, Size:1020Kb
Deep, Seamless, Multi-format, Multi-notation Definition and Use of Domain-specific Languages Inauguraldissertation zur Erlangung des akademischen Grades eines Doktors der Naturwissenschaften der Universität Mannheim vorgelegt von Diplom-Wirtschaftsinformatiker Ralph Gerbig aus Worms Mannheim, 2017 Dekan: Professor Dr. Heinz Jürgen Müller, Unversität Mannheim Referent: Professor Dr. Colin Atkinson, Unversität Mannheim Korreferent: Professor Dr. Juan de Lara, Universidad Autónoma de Madrid Tag der mündlichen Prüfung: 24. Februar 2017 To Valerie. Acknowledgments I thank Colin Atkinson for the supervision and the support he provided during the last six exciting years. We had a lot of open minded and fruitful discussi- ons and he gave invaluable guidance and feedback on this dissertation and the Melanee tool. I also thank Juan de Lara, my second supervisor, for his input to this dis- sertation and the joint research. Especially, I want to thank him for hosting one of my students at the Universidad Autónoma de Madrid and the support he gave to this student during his master thesis. I thank all the students who contributed towards the success of this dis- sertation in the form of seminars and bachelor/master theses and as student assistants. Especially, I want to thank Nicole Wesemeyer, Katharina Markert, Daniel Gritzner and Dominik Kantner for their outstanding contributions to the Melanee tool. I thank Bastian Kennel, for supervising my diploma (cf. master) thesis on the topic of deep modeling. This built the foundation for all following research leading to the Melanee tool as it is today and the approach described in the dissertation. I thank Mathias Fritzsche for the opportunity to join him for an internship at SAP Research in Belfast where I had my first taste of research, model-driven development and Eclipse Plug-in development. Finally, a special thanks goes to my beautiful wife Valerie for all the sacri- fices she made and her support while I worked on this dissertation. Abstract Domain-specific modeling has gained increased attention in industry and aca- demia in recent years leading to the emergence of numerous highly specialized, domain-specific modeling approaches and tools. However, the tools available today focus on one specific aspect of domain-specific modeling and tend to be isolated and difficult to integrate with each other. For instance, some tools focus exclusively on graphical, diagrammatic languages, while others focus on textual languages. The problems caused by this heterogeneous tool landscape become most evident when attempting to use multiple formats together. A first step towards integrating different modeling formats within one single environment has been taken by the latest projective modeling environments which support the embedding of non-textual formats (e.g. tables) into textual model editors. However, in these modeling environments the textual format dominates the embedded formats. Moreover, all of these tools are based on two-level modeling technologies which are limited to one, hard-wired meta- model describing the modeling language and one instance level describing the user model expressed in terms of the language. In addition to the metamodel, the concrete syntax features offered by today’s modeling tools are typically hardwired as well. When multiple notations are available, modelers usually have to decide for one notation before starting. To view the model in an alternative notation, the model has to be opened in a second editor. The approach presented in this thesis for the deep, seamless, multi-format, multi-notation definition and use of domain-specific languages overcomes the aforementioned weaknesses. First, it treats all formats equally, no matter whether text, diagram or some other format. This allows different formats to be used side-by-side, as desired, without influencing one another negatively. Second, it allows a given format to be visualized in multiple notations in one editor, side-by-side. Third, the inherently deep architecture allows deep visualizations to be defined spanning as many classification levels as needed for language definition and use. Fourth, language definitions and visualizations are soft, like language applications, and can be changed at any time by modelers. The approach has been validated by means of an Eclipse EMF-based prototype implementation, called Melanee, and applied to a running example motivated by the ArchiMate Enterprise Architecture Modeling standard. Zusammenfassung Domänenspezifische Modellierung hat in letzter Zeit hohe Aufmerksamkeit von Industrie und Forschung bekommen. Dies führte zur Entwicklung von vielen spezialisierten domänenspezifischen Modellierungswerkzeugen und Ansätzen. Diese Werkzeuge fokussieren sich jedoch nur auf einzelne Aspekte der domä- nenspezifischen Modellierung. Weiter sind diese isoliert und teils schwer mitein- ander integrierbar, da sich beispielsweise manche Werkzeuge nur auf grafische Modellierung und andere Werkzeuge auf textuelle Modellierung fokussieren. Beim Versuch die verschiedenen Formate zu kombinieren werden die Proble- me, die durch diese heterogene Werkzeuglandschaft entstehen, sichtbar. Einen ersten Schritt zur Integration verschiedener Formate innerhalb ei- nes Editors haben die neuesten projektionalen Modellierungsumgebungen un- ternommen. Diese unterstützen das Einbetten von nicht textuellen Formaten (z.B. Tabellen) in textuelle Editoren. Jedoch dominiert das textuelle Format hierbei stark. Auch basieren all diese Werkzeuge auf einer zwei-level Architek- tur. Diese Architektur ist beschränkt auf ein statisches Metamodell, welches die Modellierungssprache beschreibt, und auf ein Instanzmodell, welches das Benutzermodel mit Konzepten des Metamodells ausdrückt. Nicht nur das Me- tamodell, sondern auch die Funktionalitäten im Bereich der konkreten Syntax sind in den bereitgestellten Werkzeugen fest verankert. Wenn mehrere Nota- tionen verfügbar sind muss sich der Benutzer in der Regel für eine von diesen Notationen vor dem Modellieren entscheiden. Um eine alternative Notation zu nutzen muss er das bearbeitete Modell in einem zweiten Editor öffnen. Der in dieser Arbeit präsentierte deep, seamless, multi-format, multi-no- tation definition and use of domain-specific languages Ansatz überwindet die beschriebenen Schwächen. Dieser behandelt alle Formate gleichwertig egal ob Text, Diagramm etc. Hierbei können die verschiedenen Formate parallel be- nutzt werden ohne sich negativ zu beeinflussen. Auch können die einzelnen Notationen innerhalb eines Formats nebeneinander benutzt werden. Durch die durchgängig tiefe Architektur können Sprachen zusammen mit ihrer konkreten Syntax über mehrere Level hinweg definiert werden. Da Sprachdefinition und Visualisierung soft sind können Benutzer diese zu jeder Zeit ändern. Der An- satz wird durch einen EMF-basierten Prototypen, Melanee, demonstriert und auf ein laufendes Beispiel welches sich an ArchiMate orientiert angewandt. Contents Glossary vii List of Figures ix List of Tables xiii List of Algorithms xv 1 Introduction1 1.1 Problem Fields of Language Engineering.............1 1.2 Requirements for Language Workbenches............6 1.3 Contribution............................9 1.4 Research Communication.....................9 1.5 Outline............................... 10 2 Foundations 13 2.1 Language Engineering....................... 13 2.2 Model-driven Language Engineering............... 14 2.3 Deep Modeling........................... 18 3 User-defined Visualization of Deep Models 23 3.1 Language Visualization for Deep Models............. 24 3.2 Deep Visualization......................... 25 3.3 Multi-format Modeling....................... 31 3.4 Multi-notation Modeling...................... 36 3.5 Aspect-oriented Visualization................... 41 i 3.6 Context-sensitive Visualization.................. 48 4 The Diagrammatic Format 51 4.1 Diagrammatic Predefined Visualization............. 52 4.2 Diagrammatic User-defined Visualization............ 54 4.2.1 Diagrammatic Visualizer Metamodel Example..... 59 4.3 Diagrammatic Weaving Model.................. 60 4.3.1 Diagrammatic Weaving Model Example......... 62 5 The Textual Format 65 5.1 Textual Editing Paradigms.................... 66 5.1.1 Free-text Model Editing.................. 66 5.1.2 Projectional Editing.................... 69 5.2 Textual Predefined Language................... 71 5.3 Textual User-defined Language.................. 74 5.3.1 Textual Visualizer Metamodel Example......... 76 5.4 Textual Weaving Model...................... 77 5.4.1 Textual Weaving Model Operations........... 78 5.4.2 Textual Weaving Model Example............. 82 6 The Tabular Format 85 6.1 Tabular Predefined Language................... 85 6.2 Tabular User-defined Language.................. 89 6.2.1 Tabular Visualizer Metamodel Example......... 95 6.3 Tabular Weaving Model...................... 97 6.3.1 Tabular Weaving Model Example............. 98 7 The Form-based Format 101 7.1 Form-based Predefined Language................. 101 7.2 Form-based User-defined Language................ 104 7.2.1 Form-based Visualizer Metamodel Example....... 108 7.3 Form-based Weaving Model.................... 109 7.3.1 Form-based Weaving Model Example.......... 110 8 Deep Constraint Language for Deep Visualization 113 8.1 Application Modes of Constraints in Deep Models....... 113 8.2 Support of OCA-based Deep Modeling.............. 116 8.3 Definition of Constraints at Intermediate Levels......... 118 8.4 A Deep Constraint Language Supporting Deep Visualization. 121 8.4.1 Constraint Application