Dynamic Software Architectures
Total Page:16
File Type:pdf, Size:1020Kb
Dynamic Software Architectures A Style-Based Modeling and Refinement Technique with Graph Transformations DISSERTATION in Computer Science submitted to the Faculty of Computer Science, Electrical Engineering, and Mathematics University of Paderborn by Sebastian Th¨one in partial fulfillment of the requirements for the degree of doctor rerum naturalium (Dr. rer. nat.) Paderborn, October 2005 ii Abstract A good architectural design allows to capture the overall complexity of large, distributed systems at a higher level of abstraction. This is especially im- portant for reconfigurable systems where the architectural configuration is subject to (constant) changes at runtime. When designing such a dynamic architecture, the software architect has to bring the functional business re- quirements and the available communication and reconfiguration mechanisms of the intended target platform in line. As it is a complex task to incorporate these often diverging requirements into the architectural model, we propose a stepwise approach similar to the MDA initiative. We start with a platform-independent model capturing the business requirements and add platform-specific details in a later step. For each level of platform abstraction and associated platform, we define an ar- chitectural style which describes the characteristics of the platform. This way, conformance to the architectural style entails consistency between model and the underlying platform. Besides run-time configurations of components and connections, archi- tectural models also comprise the description of processes that control the communication and reconfiguration behavior. To provide operational seman- tics, we formalize architectural models as graphs and architectural styles as graph transformation systems. UML is added as high-level modeling language on top, and profiles are used to adapt UML to certain architectural styles. Due to the stepwise procedure, we also have to ensure the mutual con- sistency between models at different levels of abstraction. For this purpose, we define formal refinement criteria which require that both structural and behavioral properties are preserved at the lower level of abstraction. Based on refinement relationships between abstract and platform-specific architec- tural styles, an algorithm allows to verify that all abstract, business-level behavior can also be realized in the platform-specific architecture and that no new behavior is added. These innovative refinement techniques for graph transformation models facilitate a stepwise, platform-consistent development of dynamic software architectures. iii iv To Andrea and our son Dominik. v vi Acknowledgment As this work would not have been possible without the support I received from many different people, let me take this chance to express my gratitude to them. First of all, I would like to mention my doctoral advisor Prof. Dr. Gregor Engels. Being a member of his research group “Database and Information Systems”, I could always seek his advice and benefit from his comprehensive knowledge of the research area. Regularly pushing for further improvements of my drafts, he substantially contributed to the quality of this thesis. Thanks also go to Prof. Dr. Wilhelm Sch¨afer and Prof. Dr. Leena Suhl for their readiness to become my co-supervisors. In this context, let me especially thank Gregor Engels and Wilhelm Sch¨afer for writing the reviews of this thesis. During my research, I had the lucky chance to collaborate with Luciano Baresi (presently at the Politecnico di Milano), D´anielVarr´o(presently at the Budapest University of Technology and Economics), and especially with Reiko Heckel (presently at the University of Leicester). I benefited very much from their excellent expertise, our productive discussions, and our coopera- tion on several joint publications. Similarly, I would like to thank all members of the Database and Information Systems group in Paderborn for the friendly and convenient working atmosphere I could experience there. My work has been accompanied and financially supported by the Inter- national Graduate School Dynamic Intelligent Systems at the University of Paderborn. I feel very grateful for this support and wish the graduate school a successful continuation of their program for the benefit of many future Ph.D. students. Last but foremost, I would like to thank my wife Andrea for never giving up her patience and warm-hearted encouragement. Thank you all very much! Sebastian Th¨one Paderborn, October 2005 vii viii Contents 1 Introduction 1 1.1 Architecting large, distributed software systems ........ 1 1.2 Dynamic software architectures ................. 7 1.3 Platform-consistent development ................. 10 1.3.1 Platform consistency ................... 10 1.3.2 Different levels of platform abstraction ......... 13 1.3.3 Architecture refinement ................. 16 1.4 Structure of the thesis ...................... 19 2 Survey of related work 21 2.1 Some historical notes ....................... 21 2.2 Requirements ........................... 22 2.2.1 Requirements for architecture descriptions ....... 23 2.2.2 Requirements for platform descriptions ......... 25 2.2.3 Requirements for architecture refinements ....... 26 2.3 Existing approaches and open problems ............. 28 2.3.1 Formal methods for dynamic architectures ....... 28 2.3.2 Platform awareness in architecture descriptions .... 37 2.3.3 Architecture refinement techniques ........... 41 2.4 Summary ............................. 46 3 The style-based approach – an overview 47 3.1 Style-based modeling ....................... 48 3.1.1 Formal, graph-based descriptions ............ 48 3.1.2 UML as concrete syntax ................. 54 3.2 Style-based refinement ...................... 58 4 Graph transformation theory – the formal background 63 4.1 Graphs and graph schemas .................... 64 4.1.1 Type graphs and typing morphisms ........... 65 4.1.2 Attributes and typed attributed graphs ......... 69 ix 4.1.3 Cardinalities and other constraints ........... 72 4.1.4 Graph schemas ...................... 74 4.2 Graph transformations ...................... 74 4.2.1 Informal introduction and example ........... 75 4.2.2 Operational semantics .................. 78 4.2.3 Graph transformation systems .............. 85 4.3 Transformation-based system models .............. 85 4.3.1 Reachability properties and parsing problems ..... 86 4.3.2 Graph transition systems ................. 87 5 Architectural styles as graph transformation systems 93 5.1 Structural parts and their instantiation ............. 94 5.2 Behavioral parts and their instantiation ............. 97 5.2.1 Reconfiguration mechanisms ............... 97 5.2.2 Communication mechanisms ............... 100 5.2.3 Instantiating platform mechanisms in architectural be- havior ........................... 102 5.3 A style for service-oriented architectures ............ 112 5.4 Summary ............................. 118 6 Style-based modeling of dynamic software architectures 119 6.1 Profile for service-oriented architectures ............. 120 6.1.1 Stereotypes concerning structure ............ 120 6.1.2 Stereotypes concerning behavior ............. 122 6.2 Translation into the semantic domain .............. 129 6.3 Summary ............................. 135 7 Style-based refinement of dynamic software architectures 137 7.1 Syntactical versus semantical approaches ............ 138 7.2 Structural refinement ....................... 141 7.2.1 Abstraction relationship between styles ......... 142 7.2.2 Structural refinement criterion .............. 145 7.3 Behavioral refinement ....................... 148 7.3.1 Behavior preservation ................... 148 7.3.2 Observational substitutability .............. 156 7.4 Testing behavioral refinement .................. 162 7.4.1 Testing behavior preservation .............. 162 7.4.2 Testing observational substitutability .......... 166 7.5 Summary ............................. 167 x 8 Existing tool support for modeling and refinement 171 8.1 Graph transformation tools ................... 173 8.1.1 Required features ..................... 173 8.1.2 PROGRES ........................ 175 8.1.3 AGG ............................ 177 8.1.4 FUJABA ......................... 178 8.1.5 CheckVML ........................ 179 8.1.6 GROOVE ......................... 181 8.1.7 Summary ......................... 182 8.2 UML tools and tool integration ................. 184 8.3 Practical example with GROOVE ................ 187 8.4 Summary ............................. 193 9 Conclusion 195 9.1 Evaluation against the requirements ............... 196 9.2 Conclusions and future work ................... 198 A Architectural style for component-based architectures 217 A.1 Graph schema ........................... 217 A.2 Graph transformation rules ................... 219 B Architectural style for service-oriented architectures 229 B.1 Graph schema ........................... 229 B.2 Graph transformation rules ................... 233 C Abstract model of the travel agency architecture 243 D Concrete model of the travel agency architecture 247 xi xii Chapter 1 Introduction The thesis at hand shall contribute to ongoing research on model-driven development techniques for large and possibly distributed software systems. To overcome the complexity of such systems, they have to be decomposed into self-contained components which can be developed independently of each other. The integration of these components happens at the level of software architecture, which represents an abstract view