Model-Driven Engineering of Adaptation Engines for Self-Adaptive Software: Executable Runtime Megamodels Thomas Vogel, Holger Giese Technische Berichte Nr. 66 des Hasso-Plattner-Instituts für Softwaresystemtechnik an der Universität Potsdam Technische Berichte des Hasso-Plattner-Instituts für Softwaresystemtechnik an der Universität Potsdam Technische Berichte des Hasso-Plattner-Instituts für Softwaresystemtechnik an der Universität Potsdam | 66 Thomas Vogel | Holger Giese Model-Driven Engineering of Adaptation Engines for Self-Adaptive Software Executable Runtime Megamodels Universitätsverlag Potsdam Bibliografische Information der Deutschen Nationalbibliothek Die Deutsche Nationalbibliothek verzeichnet diese Publikation in der Deutschen Nationalbibliografie; detaillierte bibliografische Daten sind im Internet über http://dnb.de/ abrufbar. Universitätsverlag Potsdam 2013 http://verlag.ub.uni-potsdam.de/ Am Neuen Palais 10, 14469 Potsdam Tel.: +49 (0)331 977 2533 / Fax: 2292 E-Mail: [email protected] Die Schriftenreihe Technische Berichte des Hasso-Plattner-Instituts für Softwaresystemtechnik an der Universität Potsdam wird herausgegeben von den Professoren des Hasso-Plattner-Instituts für Softwaresystemtechnik an der Universität Potsdam. ISSN (print) 1613-5652 ISSN (online) 2191-1665 Das Manuskript ist urheberrechtlich geschützt. Online veröffentlicht auf dem Publikationsserver der Universität Potsdam URL http://pub.ub.uni-potsdam.de/volltexte/2013/6382/ URN urn:nbn:de:kobv:517-opus-63825 http://nbn-resolving.de/urn:nbn:de:kobv:517-opus-63825 Zugleich gedruckt erschienen im Universitätsverlag Potsdam: ISBN 978-3-86956-227-8 Abstract Thedevelopmentofself-adaptivesoftwarerequirestheengineeringofanadaptationenginethatcontrols and adapts the underlying adaptable software by means of feedback loops. The adaptation engine often describes the adaptation by using runtime models representing relevant aspects of the adaptable software and particular activities such as analysis and planning that operate on these runtime models. Tosystematicallyaddresstheinterplaybetweenruntimemodelsandadaptationactivitiesinadaptation engines, runtime megamodels have been proposed for self-adaptive software. A runtime megamodel is a specific runtime model whose elements are runtime models and adaptation activities. Thus, a megamodel captures the interplay between multiple models and between models and activities as well as the activation of the activities. In this article, we go one step further and present a modeling language for ExecUtable RuntimE MegAmodels (EUREMA) that considerably eases the development of adaptation engines by following a model-driven engineering approach. We provide a domain-specific modeling language and a runtime interpreter for adaptation engines, in particular for feedback loops. Megamodels are kept explicit and aliveatruntimeandbyinterpretingthem,theyaredirectlyexecutedtorunfeedbackloops.Additionally, they can be dynamically adjusted to adapt feedback loops. Thus, EUREMA supports development by making feedback loops, their runtime models, and adaptation activities explicit at a higher level of abstraction. Moreover, it enables complex solutions where multiple feedback loops interact or even operate on top of each other. Finally, it leverages the co-existence of self-adaptation and off-line adaptation for evolution. Keywords Model-Driven Engineering, Modeling Languages, Modeling, Models at Runtime, Mega- models, Model Execution, Self-Adaptive Software, Adaptation Engines, Feedback Loops i Contents 1 Introduction 1 1.1 State-of-the-Art in Engineering Adaptation Engines . . . . . . . . . . . . . . . . . . . 2 1.2 Approach: EUREMA – ExecUtable RuntimE MegAmodels . . . . . . . . . . . . . . . 4 1.3 Contribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2 Terminology, Concepts, and Requirements 7 2.1 Feedback Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.2 Knowledge & Runtime Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Sensors and Effectors & Monitor and Execute . . . . . . . . . . . . . . . . . . . . . . 10 2.4 Layered Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.5 Off-line Adaptation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 Modeling a Feedback Loop 13 3.1 Overview of the EUREMA Language . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.2 Modeling a Single Feedback Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3 Trigger for Feedback Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 Modularizing Feedback Loop Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4 Modeling Multiple Feedback Loops 21 4.1 Independent Feedback Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 Coordination of Multiple Feedback Loops . . . . . . . . . . . . . . . . . . . . . . . . 22 4.2.1 Sequencing Complete Feedback Loops . . . . . . . . . . . . . . . . . . . . . . 23 4.2.2 Sequencing Analysis and Planning of Feedback Loops . . . . . . . . . . . . . . 24 iii 5 Modeling Layered Architectures 27 5.1 Declarative Reflection – User-defined Reflection Models . . . . . . . . . . . . . . . . . 28 5.2 Procedural Reflection – EUREMA-based Reflection Models . . . . . . . . . . . . . . . 30 6 Modeling Off-line Adaptation 33 7 Execution 37 7.1 Metamodel and Execution Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 7.1.1 (1) Adaptation Activities, Runtime Models, and Feedback Loops . . . . . . . . 37 7.1.2 (2) Layered Architectures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 7.1.3 (3) Execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 7.2 Metamodel and Interpreter Implementation . . . . . . . . . . . . . . . . . . . . . . . 41 8 Discussion and Evaluation 43 8.1 Requirements Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 8.2 Application of MDE Techniques in EUREMA . . . . . . . . . . . . . . . . . . . . . . 45 8.3 Application of the EUREMA Language . . . . . . . . . . . . . . . . . . . . . . . . . . 46 8.3.1 Rainbow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 8.3.2 DiVA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 8.3.3 PLASMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 8.3.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 8.4 Runtime Characteristics of the EUREMA Interpreter. . . . . . . . . . . . . . . . . . . 50 9 Conclusion and Future Work 53 Bibliography 55 iv
Description: