Table of Contents Preface...viii Acknowledgment... xiv Section 1 Basics Chapter 1 Reverse Engineering and MDA: An Introduction... 1 Introduction... 1 Reverse Engineering in the Last 20 Years... 4 Reverse Engineering and MDA... 6 References... 13 Chapter 2 Model Driven Architecture (MDA)... 15 Introduction... 15 The Basic Concepts... 17 UML Metamodel... 20 The Meta Object Facility (MOF)... 25 Four-Layer Architecture... 27 Profiles vs. Metamodels... 30 References... 31 Chapter 3 MDA, Metamodeling and Transformation... 34 Introduction... 34 MOF Constructs... 35 Examples... 37 Common Concepts on Transformations... 45 References... 47
Section 2 Formalization of MOF-Based Processes Chapter 4 Formalization of MOF-Based Metamodels... 49 Introduction... 49 Object-Orientation, Metamodeling and Formal Languages... 50 MDA Infrastructure... 52 NEREUS: A Metamodeling Language... 54 Example 4-1: OCL Collections in NEREUS... 60 Example 4-2: Bidirectional Associations in NEREUS... 67 Example 4-3: Aggregation/Composition in NEREUS... 69 Example 4-4: State Diagram Metamodel... 71 Example 4-5: QVT Core Formalization... 73 References... 76 Chapter 5 MOF-Metamodels and Formal Languages... 80 A Bridge Between MOF-Metamodels and NEREUS... 80 Transformation of Associations... 83 Transformation of OCL Specification into NEREUS... 83 Example 5-1: Class Diagram Specified in OCL... 85 References... 97 Chapter 6 Mappings of MOF Metamodels and Algebraic Languages... 98 Introduction... 98 Translating Basic Specifications... 99 Translating Associations... 102 Example 6-1: Translating P&M Class Diagram into CASL... 102 References... 106 Chapter 7 Mappings of MOF Metamodels and Object-Oriented Languages... 107 Introduction... 107 Mapping Classes and Associations... 107 Constructing Object-Oriented Contracts and Implementations... 111 References... 112
Section 3 Techniques Underlying MDA-Based Reverse Engineering Chapter 8 Software Evolution, MDA and Design Pattern Components... 115 Introduction... 115 Related Work... 116 A Megamodel for Defining MDA Reusable Components... 117 Specifying MDA Design Pattern Components... 119 The Observer Component... 120 PIM-Metamodel of the Observer Pattern... 121 PSM-Metamodel of the Observer Pattern... 136 ISM-Metamodel of the Observer Pattern... 140 Specifying Metamodel-Based Transformations... 143 Formalization of Megamodel Instances... 150 References... 156 Chapter 9 Evolution of Models and MDA-Based Refactoring... 158 Introduction... 158 Related Work... 159 MDA-Based Refactoring... 160 Specifying MDA Refactoring... 161 Refactoring at Metamodel Level... 161 Refactoring at Model Level... 182 Refactoring at Formal Language Level... 185 Example 9-1: State Machine Diagram Refactoring... 190 References... 196 Chapter 10 MDA-Based Object-Oriented Reverse Engineering... 199 Introduction... 199 Related Work... 200 CASE Tools... 201 A Framework for Reverse Engineering... 204 Code-to-Model Transformations... 206 Code-to-Model Transformations: The Bases for Recovering Class Diagram... 214 Code-to-Model Transformations: The Bases for Recovering State Diagram... 215 MOF-Based Formalization: Reverse Engineering UML Class Diagram... 218 MOF-Based Formalization: Reverse Engineering UML State Diagram... 221 Specifying Anti-Refinements in NEREUS... 224 References... 226
Section 4 Conclusions Chapter 11 Summing Up the Parts... 231 Reverse Engineering: A Different Point of View... 231 Challenges on MDA-Based Reverse Engineering... 234 Chapter 12 Towards MDA Software Evolution... 236 Introduction... 236 Challenges on MDA-Based Software Evolution... 237 References... 239 Section 5 Selected Readings Chapter 13 Foundations for MDA Case Tools... 242 Liliana Favre, Universidad Nacional del Centro de la Pcia. de Buenos Aires, Argentina Claudia Teresa Pereira, Universidad Nacional del Centro de la Pcia. de Buenos Aires, Argentina Liliana Inés Martinez, Universidad Nacional del Centro de la Pcia. de Buenos Aires, Argentina Chapter 14 A Rigorous Framework for Model-Driven Development... 253 Liliana Favre, Universidad Nacional del Centro de la Provincia de Buenos Aires, Argentina Section 6 Appendices Appendix A Platform Specific Metamodels and Language Metamodels... 278 A.1. PSM Metamodel: Eiffel Platform... 278 A.2. PSM Metamodel: Java Platform... 284 A.3. ISM Metamodel: Eiffel Language... 294 A.4. ISM Metamodel: Java Language... 305 A.5. ISM Metamodel: C++ Language... 316
Appendix B OCL and NEREUS: Type System... 332 B.1. Primitive Types... 332 B.2. Collection Types... 348 B.3. Enumeration Signature... 355 B.4. Type Constructors... 355 Appendix C Transformation Rule System... 381 The Object Constraint Language: An Overview... 381 From OCL to NEREUS: A System of Transformation Rules... 386 Appendix D Design Pattern Metamodels... 396 D.1. Eiffel PSM Observer Metamodel... 396 D.2. Java PSM Observer Metamodel... 406 D.3. Java ISM Observer Metamodel... 420 About the Author... 437 Index... 438