1 Introduction
2 Background and motivation
2.1 UML profile
2.2 Distributable custom graphical editor
-
An Element Types Configuration model;
-
A Palette Configuration model;
-
A Cascading Style Sheet for customised styles;
-
A Java Creation Command class to initialise the diagram;
-
An Architecture model to describe the architecture of the editor;
-
Plug-in-related files for extensions and dependencies.
3 Proposed approach
3.1 Running example
-
Line 2: The name and the icon that should be used by Papyrus in the custom diagrams menus are defined using the name and icon properties of the @Diagram annotation.
-
Lines 5, 10 & 15: The @Node annotation is used to define that the three DSL elements (i.e. ‘Steps’, ‘Roles’ and ‘Tools’) should be Stereotypes in the UML profile that will be represented as nodes in the diagram. The base parameter is used to define which UML meta-element the Stereotype should extend (i.e. Class in this example5). The shape of the node in the diagram and the icon in the palette for each Stereotype are given using the shape and icon annotation details. We also change the font style by setting the bold details to true (see line 10).
-
Lines 19 & 22 The EReference ‘familiarWith’ and the ‘Role’ EClass are added in the profile as Stereotypes that extend the meta-element Association of UML (UML::Association). These Stereotypes should be represented as links in the diagrams and thus are annotated with the @Edge annotation. In contrast to the ‘familiarWith’ EReference, the types the ‘Roles’ edge should be able to connect are not know and need to be specified as properties of the annotation (i.e. source=‘src’ and target=‘tar’). This denotes that the source/target nodes of this connector are mapped to the values of the EReferences: ‘src’ and ‘tar’, respectively. Note in here, we use keywords source and target to denote the origin of the Association (ownedEnd) and the destiny of the Association (memberEnd). We do this to avoid confusions to EMF users (as EReferences may naturally map to Association). However, there are other types of edges that we support, i.e. Dependency, Generalization, Usage, Realization and InformationFlow. These types are UML::DirectedRelationship and therefore also have source and target. It is to be noted that the @Edge annotation is applicable to EReferences with any multiplicity. In line 19, we set the font height to 15 for the labels of the ‘familiarWith’ edges.
-
NB: In line 8, the next EReference is not required to be displayed as an edge on the diagram; thus, it is not annotated with @Edge. However, it will be a property of the ‘Step’ Stereotype in the generated profile, so it can be set in the model (but it will not be displayed on the diagram).
3.2 Polishing transformations
4 Implementation
4.1 Pre-transformation validation (#1)
# | Rule description | Condition checked |
---|---|---|
1 | There is exactly one Diagram annotation | The number of the @Diagram annotations is 1 |
2 | Diagram annotation has a name detail | The name detail is defined |
3 | Diagram annotation has acceptable details provided | There are no other details provided rather than name and/or icon |
4 | Node/Edge annotations have base class set | Any string is provided |
5 | Edge annotations of EClasses have source/target defined | The source/target details are defined |
6 | An acceptable lineStyle value for Edge annotations is provided | The value is dashed, solid, dotted, hidden or double |
7 | An acceptable bold value for Node/Edge annotations is provided | The value is either true or false |
8 | An acceptable fontHeight value for Node/Edge annotations is provided | The value is a positive integer |
9 | Node annotations have acceptable details provided | There are no other details provided rather than base, fontHeight and/or bold |
10 | Edge annotations have acceptable details provided | There are no other details provided rather than base, source, target, fontHeight, bold and/or lineStyle |
11 | Edge annotated elements have different names | There are no elements annotated as @Edge that have the same name |
4.2 EMF to UML profile generation (#2)
-
rule eclass2stereotype: This transformation rule transforms each EClass element in the annotated Ecore metamodel to an element of type Stereotype in the target UML model. All attributes of each EClass are also transformed across to the created Stereotype.
-
rule reference2stereotype: This rule creates a new Stereotype with the same name in the UML profile model for each of the EReferences that are annotated as @Edge in the Ecore metamodel. No attributes are added to the Stereotype as EReferences do not support attributes in Ecore.
4.3 OCL constraints
-
End Types: one of the elements a ‘familiarWith’ association connects to, has the ‘Person’ stereotype applied to it while the other has the ‘Tool’ Stereotypes applied to it;
-
Navigability: the ‘familiarWith’ association starts from an element stereotyped as ‘Person’ and points to an element stereotyped as ‘Tool’.
4.3.1 End types
4.3.2 Navigability
4.4 Element Types Configuration transformation(#3)
4.5 Palette Configuration transformation (#4)
4.6 CSS file generation (#5)
4.7 Creation command generation (#6)
-
UML primitive types: the primitive types need to be imported to the diagram in order for the users to reference to them;
-
UML profiles: the standard UML profile and the user defined UML profile need to be applied in order to initialise the UML diagram (with the user-defined UML profile).
4.8 Architecture model generation (#7)
-
An ArchitectureDomain which represents the domain of the DSL;
-
A number of Concerns to describe the concerns of the domain;
-
A number of Stakeholders involved in the domain;
-
An ArchitectureDescriptionLanguage to describe the architecture, which consists of a number of Viewpoints, a number of PapyrusDiagrams. The ArchitectureDescriptionLanguage points to the Element Types Configuration and the creation command class. The PapyrusDiagrams point to the Palette Configuration model and the CSS file.
4.9 Icons, shapes and supporting files (#8)
-
org.eclipse.emf.ecore.uri_mapping, in which the users create a mapping between the path of the folder that hold their UML profile, and a PATHMAP, which they can reference in the files/models they create;
-
org.eclipse.papyrus.uml.extensionpoints.UMLProfile, which points to the location of the UML profile that the users define;
-
org.eclipse.papyrus.infra.architecture.models, which points to the location of the Architecture model that the transformation generated in Step #7.
4.10 UML to EMF transformation generation (#9)
4.11 Polishing transformations (#2b–#5b)
Transformation ID | Required file name |
---|---|
#2b | emf2umlProfile.etl |
#3b | elementTypesConfigurationsM2M.etl |
#4b | paletteConfigurationM2M.etl |
#5b | cssFileGeneration.egl |
4.12 Adding support for nested relations
package
is represented with an empty rectangle, classes contained in the package would appear inside this rectangle.5 Evaluation
5.1 Efficiency
5.1.1 Threats to validity
Jorvik (pre-Papyrus 3.0) LoC/Number of Model Elements | Jorvik (post-Papyrus 3.0) LoC/Number of Model Elements | Archimate for Papyrus (pre Papyrus 3.0) | |||||
---|---|---|---|---|---|---|---|
File | Hand-written | Hand-written (Polishing) | Total | Hand-written | Hand-written (Polishing) | Total | Total hand-written |
Ecore | 436/668 | 0 | 436/668 | 436/668 | 0 | 436/668 | 0 |
Profile | 0 | 0 | 0 | 0 | 0 | 0 | 1867/1089 |
Element Types Configuration | 0 | 11 | 11 | 0 | 0 | 0 | 237/61 |
Palette Configuration | 0 | 50 | 50 | 0 | 50 | 50 | 1305/323 |
CSS | 0 | 195 | 195 | 0 | 195 | 195 | 537 |
Creation command | 0 | 0 | 0 | ||||
Architecture model | 0 | 0 | 0 | ||||
Types configuration | 0 | 10 | 10 | 788/327 | |||
Diagram configuration | 0 | 0 | 0 | 58/28 | |||
Total | 436/668 | 266 | 702/668 | 436/668 | 245 | 681/668 | 4792/1828 |
Name | #Types (#Nodes/#Edges) | Name | #Types (#Nodes/#Edges) |
---|---|---|---|
Professor | 5 (4/5) | Ant Scripts | 11 (6/4) |
Zoo | 8 (6/4) | Cobol | 13 (12/14) |
Usecase | 9 (4/4) | Wordpress | 20 (19/18) |
Conference | 9 (7/6) | BibTeX | 21 (16/2) |
Bugzilla | 9 (7/6) | Archimate | 57 (44/11) |
5.2 Completeness
5.3 User experiment
5.3.1 Papyrus approach experiment set-up
Task | Total (m) | Default (m) | Essential (m) |
---|---|---|---|
1. UML profile | 60 | 40 | 20 |
2. Element Types Configuration model | 60 | 40 | 20 |
3. Palette Configuration model | 30 | 20 | 10 |
4. Cascading Style Sheet | 30 | 20 | 10 |
5. Creation command | 30 | 20 | 10 |
6. Architecture model | 40 | 30 | 10 |
7. Plug-in configuration | 20 | 12 | 8 |
8. OCL constraints | 60 | 40 | 20 |
5.3.2 Jorvik experiment set-up
Task | Time given | Time taken | Correctness | Participant | Remarks | ||
---|---|---|---|---|---|---|---|
Default (essential) | Web | FTA | Web | FTA | |||
Papyrus | |||||||
1. UML profile | 40 m (20 m) | 25 m 30 s | 15 m | #1 | – | ||
40 m | 24 m | #2 | – | ||||
2. Element Types Configuration | 40 m (20 m) | 56* | 38 m | #1 | |||
60 m* | 58 m* | #2 | |||||
3. Palette Configuration | 20 m (10 m) | 26 m 30 s* | 25 m | #1 | |||
30 m* | 30 m* | #2 | |||||
4. Custom style | 20 m (10 m) | 15 m 30 s | 16 m | #1 | – | ||
30 m* | 19 m | #2 | – | ||||
5. Creation command | 20 m (10 m) | 25 m* | 16 m | #1 | |||
30 m* | 25 m | #2 | – | ||||
6. Architecture model | 30 m (10 m) | 40 m* | 25 m | #1 | |||
40 m* | 40 m* | #2 | |||||
7. Plug-in configuration | 12 m (8 m) | 20 m* | 5 m | #1 | |||
19 m | 10 m | #2 | – | ||||
Total | 182 m (88 m) | 208 m 30 s | 140 m | #1 | |||
249 m | 206 m | #2 | |||||
EMF + Annotations | 30 m (20 m) | 32 m 30 s* | 14 m 51 s | #1 | – | ||
Jorvik | |||||||
36 m 55 s* | 37 m 27 s* | #2 | – | ||||
Legend |
5.3.3 Results
-
Remark : In the Website experiment, in Step 2, Participant 1 claims that she found a solution online26 that made the task significantly easier. She also claims that without the solution, there is no way he/she could have finished the task, even with the Essential knowledge.
-
Remark: In both the Website and the Fault Tree experiment, in Step 2, Participant 2 claimed that he could never complete the step, without the essential information. He also claims that the Element Types Configuration is rather confusing. In the Fault Tree experiment, he claims he would need 40+ minutes to complete the whole model.
-
Remark : In the Website experiment, in Step 3, Participant 1 finishes the minimal task with the help of the essential information. She claims that she would need 20 more minutes to finish the model.
-
Remark : In the Website experiment, in Step 3, Participant 2 misses the deadline even with the essential information. He claims that he would need 30 more minutes to finish the step.
-
Remark : In the Website experiment (and presumably in the Fault Tree experiment), in step 5, participant 1 claims that she copied the actual solution for the essential information provided to her.
-
Remark : In the Website experiment, in step 6, participant 1 misses the deadline even with the essential information. She claims that the tool support for the Architecture model by Papyrus is not well implemented. (It does not support the reference to model elements in other models.)
-
Remark : Participant 2 in both rounds of this experiment claims that he finishes the step before the deadline (both with the help of the essential information), but he could not get the solutions right. This is typically due to the fact that there are somewhat confusing model elements in the Architecture metamodel by Papyrus.
-
Remark : In the Website experiment, in step 7, Participant 1 cannot configure the plug-in to a working order, and she claims that she would need more than 20 minutes to inspect other models to find out what went wrong.