COMP-533 Model-Driven Software Engineering
Graduate course, School of Computer Science, McGill University, 2023
This is a graduate course that targets both advanced undergraduates and graduate students that want to explore the concepts of Abstraction, Modularity, Separation of Concerns and Reuse. I will cover standard Model-Driven Engineering (MDE) techniques and methodologies applied in industry, but also more advanced topics in MDE focussing on improving modularity, separation of concerns and reuse, such as aspect-orientation and concern-oriented reuse.
Course Contents
Building software has become a very challenging task. Modern software assumes more and more responsibility, and has to offer an increasing number of services and features. Exciting new application areas, such as the Internet of Things or Cyber-physical Systems, contribute towards the ever increasing complexity of software development. Most software must nowadays be able to interact with other software or systems, or is of distributed nature, or must be highly interactive and respond in real-time, or must exhibit other qualities, such as ensuring privacy of data, availability and fault tolerance, or adaptability.
Abstraction, Modularity, Separation of Concerns and Reuse are key techniques that help developers manage the complexity of software development. In particular, Model-Driven Engineering (MDE) is a unified conceptual framework that promotes these techniques. In MDE, the whole software life cycle is seen as a process of model production, refinement and integration. Models are built representing different views of a software system using different formalisms, i.e. modelling languages. The formalism is chosen in such a way that the model concisely expresses the properties of the system that are important at the current level of abstraction. During development, high-level specification models are refined or combined with other models to include more solution details, such as the chosen architecture, data structures, algorithms, and finally even platform and execution environment-specific properties. The manipulation of models is achieved by means of model transformations. Model refinement and integration continues until a model is produced that can be executed. This model can take the form of source code, but does not need to.
This is a graduate course that targets both advanced undergraduates and graduate students that want to explore the concepts of Abstraction, Modularity, Separation of Concerns and Reuse. I will cover standard MDE techniques and methodologies applied in industry, but also more advanced topics in MDE focussing on improving modularity, separation of concerns and reuse.
Standard MDE Notations and Methodologies
The object-oriented software development industry has gone through the process of standardizing visual modelling notations. The Unified Modelling Language (UML), a modelling language for specifying, visualizing, constructing, and documenting, is the product of this effort; it unifies the notations that currently exist in the industry. Therefore, every computer scientist, and especially every software engineer should have had contact with UML during his or her studies. Using UML notations has many benefits, including:
It offers a common language uniting different object-oriented software development methodologies in terms of notation and vocabulary.
It provides a rich set of notations that can be used to describe many different aspects of the software under development, including complex concurrency and distribution.
It contains extension mechanisms and a constraint language called the Object Constraint Language (OCL). OCL is based on standard set-theory and is free of side-effects. It can be used to place additional constraints on models and describe pre- and postconditions of operations.
UML provides a semantic base in the form of a metamodel that defines well formed models, and possible relationships between models and model elements.
UML is a OMG standard.
It allows tool interoperability between different vendors.
However, UML is only a language: it is process independent and therefore does not prescribe how and when during the software development cycle its notations should be used. Using UML to model software systems still requires a method - a choice of models and a process of their elaboration.
The goal of the standards part of this course is to expose the students to a rigorous UML-based software development method. The emphasis of the course is on how to put the different pieces of the UML puzzle together, i.e. which UML notations are the most appropriate to model the system under development within each software development phase. It teaches the students how to choose a coherent subset of UML to produce complete and consistent analysis and design models, and in which order the different models should be produced, and how models from one development phase are used as input / transformed into models at the next development phase.
The course teaches Fondue, a UML extension of the second-generation object-oriented development method Fusion (Hewlett Packhard). Fondue uses a coherent subset of UML to establish complete and precise analysis and design documents for a software system. Fondue’s requirements engineering is based on use cases. The analysis phase establishes a Domain, a Concept, an Environment, a Protocol, and an Operation Model. During design, a Design Class Model, an Object Interaction Model, a Dependency Model and an Inheritance Model are constructed. Finally, Java-specific mapping strategies lead to the system implementation.
Most models use graphical UML notations (e.g. class diagrams, object-interaction diagrams, state diagrams). The course covers these UML notations in detail. In addition, a major part of the lectures present how to elaborate one model based on the others, and ensure completeness and consistency among the different views. When the graphical notations are not strong (or “formal”) enough to produce a precise model, the models are augmented using the Object Constraint Language (OCL). OCL is a formal, set-theory based language that allows software engineers to augment UML models with additional constraints, or state preconditions, postconditions and invariants of operations in a precise way.
Advanced MDE / Modularity / Concern-Oriented Reuse
Model-driven engineering advocates to use the most appropriate modelling formalism(s) at each development phase to express the concerns at hand, and it turns out that UML is not always the most appropriate language. The crosscutting nature of most development concerns makes it difficult to apply in a modular way software engineering techniques, such as, information hiding, decomposition, interfaces, and abstraction, in standard modelling languages such as UML. As a consequence, reuse – in particular model reuse – is a challenge in MDE.
The second part of this course will introduce the students to more advanced modelling notations and domain-specific modelling in order to expose them to current state-of-the-art modelling techniques and tools. In particular, I am planning to focus this year also on Concern-Oriented Reuse (CORE), a novel reuse paradigm that extends Model-Driven Engineering (MDE) with best practices from advanced modularization and separation of concerns techniques, goal modelling, and Software Product Lines (SPL). CORE advocates the use of a three-part interface to describe a new unit of reuse called concern that spans multiple development phases and encapsulates all software engineering artifacts (models, code) needed to address specific software development issues. While developing an application, whenever a specific development issue is encountered, the developer can browse the reusable concern library in search for a concern that addresses the issue. If found, CORE defines a simple three-step reuse process that a) helps the developer decide on the most appropriate of the solutions provided by the concern for the current reuse context, b) indicates to the developer where and how to adapt the software artifacts provided by the concern Model-driven engineering advocates to use the most appropriate modelling formalism(s) at each development phase to express the concerns at hand, and it turns out that UML is not always the most appropriate language. The crosscutting nature of most development concerns makes it difficult to apply in a modular way software engineering techniques, such as, information hiding, decomposition, interfaces, and abstraction, in standard modelling languages such as UML. As a consequence, reuse – in particular model reuse – is a challenge in MDE.
Due to the fact that most (if not all) software development concerns are of crosscutting nature, concern designers must use modelling notations that support aspect-oriented features to design the models that encode the solutions for addressing the concern. For example, for requirements elicitation and analysis, the User Requirements Notation (URN) and AoURN, its aspect-oriented extension are going to be shown in class. For software design modelling, the Reusable Aspect Models notation that provides aspect-oriented variants of class, sequence and state diagrams, will be explained.