About the UML profile templates (Aspectual and Generative)
UML Templates allow to capture models whose some of their constituents are parameters. This construct is general enough to be used in many ways, such as generic class representation, Design Pattern modeling, view or aspect-oriented modeling (AOM). We concentrate on this last usage and the specific characteristics of so called "Aspectual Templates". Such templates can be applied to enrich existing models as far as they conform to a required model. Template parameters are exploited here to specify some required model, so that they must be constrained to form a full model structure.
For a deeper explanation on Aspectual templates, See the paper DOI - "Aspectual Templates in UML"
The UML profile also includes also a new operator called "instanciate". Template instanciation is the creation of new models from their generic modeling structure. See this paper for a deeper explanation. This MDE practice is related to the generative usage of templates.
We provide here a UML profile that allow to enhance standard UML templates to capture aspectual ones. The UML profile includes OCL constraints to check the coherency of UML models which apply the profile. The bind relationship dedicated to UML templates has also be enhanced in this profil. Associated with the UML template binding, two stereotypes are introduced:
- the "AspectualTemplateBinding" stereotype for aspectual usage,
- the "InstantiationBinding" stereotype for generative usage of templates
For each usage, the set of provided plugins includes a program which constructs the result of the template binding after checking the coherency via OCL constraints.
Last, plugins provide a simple CASE tool which includes both a tree-based editor and a basic grapher of UML models.
Template based model engineering in UML
We also concentrate on engineering practices and operators which derive from the adoption of Aspectual templates. As a first step, we show the consequent partitioning of modeling spaces into two subspaces: one dedicated to template modelers ("model for reuse"), the other one dedicated to application modelers ("model by reuse"). Respective activities are identified, but also back-and-forth between them. From this, engineering operators are isolated and formally specified. The present reusable technology within Eclipse includes this work. For a deeper explanation on this research activity, see- the paper "Template based model engineering in UML" presented at Models'2020,
- or the related thesis : "Ingénierie Dirigée par les Modèles Basée sur les Templates"
Videos
A Video/How to specify and compose aspectual templates
A Video/tutorial for partial binding of aspectual templates
A Video demonstrating automatic binding inference
Screenshots of the case tool
Using Aspectual templates:
Using Binding inference:
Using Template instanciation:
Requirements
You'll need :
- Java 8
- Eclipse (Mars, version Eclipse Modeling Tools) The Modeling edition of Mars Eclipse includes EMF, UML 2, OCL and Acceleo required plugins
- Graphviz (http://www.graphviz.org/)
- Eclipse Graphviz plugin (see the Installation section)
Installation
Installation of the eclipse Graphviz plugin:
- Open the Eclipse Marketplace (Help > Eclipse Marketplace...), Just search for "Text UML Toolkit", and install it directly, this product includes the graphviz plugin.
- Accept to restart Eclipse to make the changes effective.
Installation of the MDE template plugins:
- From within Eclipse, open the Software Update dialog ("Help > Install New Software...")
- enter the following URL in the "Work with:" field "http://www.cristal.univ-lille.fr/caramel/MBE_Template/MBE_TemplateSite"
- Select the "Model Template" category (which automatically selects the eleven plugins and finish the installation)
- Accept to restart Eclipse to make the changes effective.
Starting
In order to use the extended editor with full template facilities, left-click on your UML file
and then select "Open with Template-based MDE".
The contextual menu provides relevant facilities according to the selected model element.
By selecting "Window / Show view / Eclipse Graphviz / UML Viewer", you display a graphic view of your UML files with templates
Library of design patterns
A library of GOF design patterns is implemented by using aspectual templates. In order to use it :
- download this file : GOFDesignPatternsAspectualTemplatesLibrary.zip
- Import the library : select "File/import" in the Eclipse menu, then select "General/Existing Projects into Workspace", click "Next", select the downloaded archive file "Select archive file" and, last, click "Finish".
- There is now a new Eclipse project that includes the different design patterns
Some Example Models
This following archive contains some example models : examples.zip
© 2020 the CARAMEL team