in that lifeline in order to match them with the corre-
sponding place in the output model, successfully plac-
ing the message passing pattern in the target model
structure resulting from the previous rules. When an
event has no previous events in the lifeline, the tran-
sition is matched to the initial ”Begin” place of that
lifeline. The transitions are then connected with an
intermediate place representing the message in traf-
fic state, as shown by places ”M1”, ”M2” and ”M3”
in the middle region of Figure 10, leaving only the
place representing the final state of each lifeline un-
connected.
Finally, in order to complete the output model, the
last rule is applied. Because of the design of the trans-
formation rules, and the Place matching made using
the event’s id, no valid SD using only the supported
features for this software module will create an output
model with more than one place for the final state of
each lifeline. This implies that, for each lifeline, only
one arc will be generated connecting its final place to
the final transition, and therefore, for the example in-
put model, three arcs will be created, as shown in the
bottom region of Figure 10.
The model-to-model transformation component
of the transformation process is complete, and the out-
put model is encoded in a file of XMI format specific
to EMF. In order for this model to be used externally
by CPN Tools, this file must be converted to the spe-
cific tool format (.cpn). The CPN File converter cre-
ated is used for this purpose, as it uses an existing
plug-in for the serialization of files from EMF into
CPN Tools specific files, as long as they conform with
the metamodel used by the tool.
The generated CPN file (.cpn) can now be exe-
cuted by the user step by step with CPN Tools. This
type of behaviour in a model can be valuable as the
transitions can be fired from an external program via
an API for CPN Tools and therefore introduce the
possibility for automatic processes to analyze a sys-
tem’s execution from an otherwise ”static” SD, and
possibly generate code or perform automated proce-
dures.
We have applied the approach for more complex
SD, with several types of combined fragments, but
omit them here because of the size and the complexity
of the generated CPN. (Soares, 2017)
6 CONCLUSIONS AND FUTURE
WORK
We presented an automated model-to-model transfor-
mation approach from UML SD to CPN. Our ap-
proach was successfully implemented based on state-
of-the-art model-transformation techniques and tools,
namely EMF and ETL, and an experiment was con-
ducted to validate and illustrate the approach. To our
knowledge, there is no other previous approach able
to automatically perform the end-to-end transforma-
tion, from SD created with a visual modelling tool to
CPN executable with CPN Tools, without any manual
step. ETL allowed us to define the transformations in
a declarative and extensible way.
As future work we intended to implement the re-
maining features of UML SD such as: synchronous
messages, action/behaviour specification, break com-
bined fragments, negative combined fragments, crit-
ical combined fragments, ignore combine fragment,
consider combined fragments and assertion combined
fragments. These will be implemented as ETL trans-
formation rules and are to be inserted in the rule set
precedence accordingly.
Further validation of the solution with more com-
plex test case studies are also valuable as future work
to increase the certainty of the robustness of the solu-
tion and ensure scalability.
ACKNOWLEDGEMENTS
This work was performed in scope of project
“NanoSTIMA: Macro-to-Nano Human Sensing: To-
wards Integrated Multimodal Health Monitoring
and Analytics/NORTE-01-0145-FEDER-000016”, fi-
nanced by the North Portugal Regional Operational
Programme (NORTE 2020), under the PORTUGAL
2020 Partnership Agreement, and through the Euro-
pean Regional Development Fund (ERDF). This work
was also financed by the Portuguese Foundation for
Science and Technology (FCT), under research grant
SFRH/BD/115358/2016.
REFERENCES
Bowles, J. and Meedeniya, D. (2010). Formal transforma-
tion from sequence diagrams to coloured petri nets.
In Software Engineering Conference (APSEC), 2010
17th Asia Pacific, pages 216–225. IEEE.
Emadi, S. and Shams, F. (2009). Transformation of use-
case and sequence diagrams to petri nets. In Com-
puting, Communication, Control, and Management,
2009. CCCM 2009. ISECS International Colloquium
on, volume 4, pages 399–403. IEEE.
Faria, J. P. and Paiva, A. C. (2016). A toolset for con-
formance testing against UML sequence diagrams
based on event-driven colored Petri nets. International
Journal on Software Tools for Technology Transfer,
18(3):285–304.
AMARETTO 2018 - Special Session on domAin specific Model-based AppRoaches to vErificaTion and validaTiOn
678