A Family of Role-Based Languages
Total Page:16
File Type:pdf, Size:1020Kb
Faculty of Computer Science Institute of Software and Multimedia Technology, Software Technology Group A FAMILY OF ROLE-BASED LANGUAGES Thomas Kühn Born on: 11.09.1985 in Karl-Marx-Stadt (now Chemnitz) DISSERTATION to achieve the academic degree DOKTOR-INGENIEUR (DR.-ING.) Referee Prof. Dr. Colin Atkinson Supervising professors Prof. Dr. Uwe Aßmann Prof. Dr.-Ing. Wolfgang Lehner Submitted on: 3.3.2017 Defended on: 24.3.2017 For my loving children Statement of authorship I hereby certify that I have authored this Dissertation entitled A Family of Role-Based Languages in- dependently and without undue assistance from third parties. No other than the resources and ref- erences indicated in this thesis have been used. I have marked both literal and accordingly adopted quotations as such. They were no additional persons involved in the spiritual preparation of the present thesis. I am aware that violations of this declaration may lead to subsequent withdrawal of the degree. Dresden, 3.3.2017 Thomas Kühn ABSTRACT Role-based modeling has been proposed in 1977 by Charles W. Bachman [Bachman et al., 1977], as a means to model complex and dynamic domains, because roles are able to capture both context- dependent and collaborative behavior of objects. Consequently, they were introduced in various fields of research ranging from data modeling via conceptual modeling through to programming languages [Steimann, 2000a]. More importantly, because current software systems are character- ized by increased complexity and context-dependence [Murer et al., 2008], there is a strong demand for new concepts beyond object-oriented design. Although mainstream modeling languages, i.e., Entity-Relationship Model, Unified Modeling Language, are good at capturing a system’s structure, they lack ways to model the system’s behavior, as it dynamically emerges through collaborating ob- jects [Reenskaug and Coplien, 2009]. In turn, roles are a natural concept capturing the behavior of participants in a collaboration. Moreover, roles permit the specification of interactions indepen- dent from the interacting objects. Similarly, more recent approaches use roles to capture context- dependent properties of objects. The notion of roles can help to tame the increased complexity and context-dependence. Despite all that, these years of research had almost no influence on cur- rent software development practice. To make things worse, until now there is no common under- standing of roles in the research community and no approach fully incorporates both the context- dependent and the relational nature of roles [Kühn et al., 2014]. In this thesis, I will devise a formal model for a family of role-based modeling languages to capture the various notions of roles [Kühn et al., 2015a]. Together with a software product line of Role Modeling Editors, this, in turn, enables the generation of a role-based language family for Role-based Software Infrastructures (RoSI). 7 ACKNOWLEDGEMENTS As any PhD students, I too stood on the shoulders of giants. Henceforth, I highlight some of them. First of all, I thank my family, especially, my wife Josephine as well as my children Mira, Vincent and Milan, who supported me and endured my repeated absence. Additionally, I thank my parents Andrea and Peter, which allowed me to become the man I always wanted. Secondly, I thank Sebas- tian Richly, who I consider my mentor, and Sebastian Götz. Both introduced me to the intricacies of roles and role-based software development. My discussions with them significantly shaped my understanding of roles in software systems. On the same level, I want to thank both my supervi- sors Uwe Aßmann and Wolfgang Lehner, who guided my throughout my thesis, gave me focused goals, and where always available when I had questions, even at 4 am in the morning. Similarly, I thank Walter Cazzola, who hosted me during my research stay in Italy and opened up my per- spective towards the development of Language Product Lines. Besides them, I am also grateful for Colin Atkinson’s support, as he quickly and throughly reviewed my written thesis and provided in- teresting suggestions for future research. In a broader sense, I consider both Friedrich Steimann and Trygve Reenskaug paragons of thoroughness and curiosity in the research field on roles. Third, I want to thank all the other RoSI students with whom I had great discussions on the notion and usefulness of roles. Among others, I want to highlight Tobias Jäkel, Stephan Böhme, Steffen Hu- ber, Max Leuthäuser, and ˙Ismail ˙Ilkan Ceylan. Moreover, I am grateful for all the students I men- tored. Because, despite the general assumption, I learned a lot from them. In particular, I want to thank Kay Bierzynski, Duc Dung Dam, Christian Deussen, David Gollasch, Marc Kandler, Kevin Ivo Kassin, and Paul Peschel, who contributed to the development of FRaMED. Fourth, I owe the German Research Foundation (DFG) the funding of this thesis as well as a great experience within the research training group (RTG: 1907) on Role-Based Software Infrastructures for continuous- context-sensitive Systems (RoSI). Last but not least, I need to thank Eduard Graf and Andre Lange from the zickzack GmbH as well as all members of the Café ASCII, because the former produced and the latter distributed the beverage that fueled my writing, i.e., I found a strong correlation between my beverage consumption and text output. Thomas Kühn 3.3.2017 9 CONTENTS I Review of Contemporary Role-based Languages 17 1 Introduction 19 1.1 Background ............................................ 19 1.2 Motivation ............................................. 20 1.3 Problem Definition ........................................ 21 1.4 Outline ............................................... 22 2 Nature of Roles 23 2.1 Running Example ......................................... 24 2.2 Behavioral Nature ......................................... 25 2.3 Relational Nature ......................................... 26 2.4 Context-Dependent Nature ................................... 27 2.5 Constraints in Role-Based Languages ............................. 29 2.6 Classification of Roles ...................................... 31 3 Systematic Literature Review 35 3.1 Method ............................................... 36 3.2 Results ............................................... 39 3.3 Discussion ............................................. 43 4 Contemporary Role-Based Modeling Languages 45 4.1 Behavioral and Relational Modeling Languages ....................... 45 4.1.1 Lodwick .......................................... 46 4.1.2 The Generic Role Model ................................. 47 4.1.3 Role-Based Metamodeling Language (RBML) .................... 48 4.1.4 Role-Based Pattern Specification ............................ 49 4.1.5 Object-Role Modeling (ORM) 2 ............................. 50 4.1.6 OntoUML ......................................... 52 4.2 Context-Dependent Modeling Languages ........................... 53 4.2.1 Metamodel for Roles ................................... 53 4.2.2 E-CARGO Model ..................................... 55 4.2.3 Data Context Interaction (DCI) ............................. 57 11 4.3 Combined Modeling Languages ................................ 58 4.3.1 Taming Agents and Objects (TAO) ........................... 58 4.3.2 Information Networking Model (INM) ........................ 60 4.3.3 Helena Approach ..................................... 61 5 Contemporary Role-based Programming Languages 65 5.1 Behavioral Programming Languages .............................. 65 5.1.1 Chameleon ........................................ 66 5.1.2 Java with Roles (JAWIRO) ................................ 67 5.1.3 Rava ............................................. 68 5.1.4 JavaStage .......................................... 70 5.2 Relational Programming Languages .............................. 71 5.2.1 Rumer ........................................... 71 5.2.2 First Class Relationships ................................. 73 5.2.3 Relations .......................................... 75 5.3 Context-Dependent Programming Languages ........................ 76 5.3.1 EpsilonJ and NextEJ ................................... 77 5.3.2 Role/Interaction/Communicative Action (RICA) .................. 79 5.3.3 ObjectTeams/Java .................................... 81 5.3.4 PowerJava ......................................... 83 5.3.5 Scala Roles ......................................... 85 6 Comparison of Role-based Languages 89 6.1 Comparison of Role-Based Modeling Languages ...................... 89 6.2 Comparison of Role-Based Programming Languages .................... 92 6.3 Results and Findings ....................................... 94 II Family of Role-Based Modeling Languages 97 7 Foundations of Role-Based Modeling Languages 99 7.1 Ontological Foundation ..................................... 100 7.1.1 Metaproperties ...................................... 101 7.1.2 Classifying Modeling Concepts ............................. 101 7.2 Graphical Notation ........................................ 103 7.2.1 Model Level Notation .................................. 103 7.2.2 Graphical Modeling Constraints ............................ 104 7.2.3 Instance Level Notation ................................. 106 12 Contents 7.3 Formalization of Roles ...................................... 107 7.3.1 Model Level ........................................ 108 7.3.2 Instance Level ....................................... 110 7.3.3 Constraint Level .....................................