A pattern is a general solution to a recurring engineering problem. Patterns are a very valuable part of the knowledge of domain experts, where the domain can be Software, Hardware, System design, or a specialty engineering discipline such as Safety, Security, Performance, etc. When engineering relies on modeling, a pattern naturally manifests itself as a recurring modeling principle - or modeling pattern.
The EMF Diff/Merge Pattern technology provides tool support for the creation, application, evolution and management of modeling patterns. The aim is to better share and disseminate the know-how of experts at the modeling level, hence contributing to productivity and quality in model-based engineering activities.
A major strength of the technology is its ability to let end users define patterns declaratively, solely based on diagrams and wizards, without programming, while providing the expressive power for dealing with classical architecture or design patterns. This is made possible by the EMF Diff/Merge engine.
The technology can be integrated into any EMF-based modeling environment. In addition, it can leverage Sirius-based environments to handle the diagramming aspects of modeling patterns such as layout and style. Albeit independent of modeling languages, the technology can be customized for a specific language or environment in order to improve the user experience.
The technology is integrated for example into the Capella modeling solution.
Patterns in Capella:
Patterns in UML Designer:
A pattern can be created from model elements or diagrams and stored in a catalog, which is a separate file. As a result, the model elements form the first instance of the pattern. The pattern can be applied at a specific location in the same model or in a different one, which gives birth to a new instance. When a pattern is applied, each of its elements is added into the model or merged with an existing element of the model. "Merged" means that the properties of the two elements are combined.
Patterns and instances have their own separate life cycles, but they can be synchronized whenever needed. Concretely, it is possible to check that an instance still conforms to its pattern and have an overview of the differences. If there are differences, the instance can be updated according to the last version of the pattern. Conversely, every instance can also be used for updating the pattern, thus allowing other instances to be updated accordingly.
The most notable features of the technology are:
- The storage of patterns in catalogs and their reuse throughout models.
- A pattern/model synchronization mechanism supporting the update and lifecycle management of patterns.
- The ability to validate that a model still conforms to patterns and to visualize pattern violations.
- Navigation and overview facilities for understanding the usage of patterns in complex models.
- Mechanisms for the semi-automatic application and creation of patterns based on OCL queries.
- Download: with EMF Diff/Merge up from release 0.4.0
- Bugzilla: for reporting bugs
- Source repository: the git repository of source files
- Gerrit access: the project on Eclipse Gerrit