Domain-Specific Language For Automatic Generation of UML Models
Domain-Specific Language For Automatic Generation of UML Models
net/publication/320266346
CITATIONS READS
7 117
3 authors:
Mark A. J. Song
Pontifícia Universidade Católica de Minas Gerais
70 PUBLICATIONS 179 CITATIONS
SEE PROFILE
All content following this page was uploaded by Márcio Assis Miranda on 21 October 2023.
Research Article
Márcio Assis Miranda1,2 , Marcos Guilherme Ribeiro3, Humberto Torres Marques-Neto1, Mark Alan
Junho Song1
1Department of Computer Science, Pontifical Catholic University of Minas Gerais, Belo Horizonte, MG, Brazil
2Department of Computer Science, Federal Institute of Minas Gerais, Ouro Branco, MG, Brazil
3Department of Computer Engineering, Federal Center of Technological Education of Minas Gerais, Timóteo, MG, Brazil
E-mail: [email protected]
Abstract: The majority of flaws found in software originates in the system requirements specification stage. The use of domain-
specific languages has shown to be a valuable resource in this part of the process, since they help to establish communication
standards, enable automation and bring productivity and quality gains, in spite of their limited vocabulary. This study proposes
the implementation of language of use case to automate models (LUCAM), a domain-specific language that allows specification
of textual use cases and semi-automated generation of use case diagrams, class diagrams and sequence diagrams through
LUCAMTool. To verify the feasibility of the proposed solution, tests were performed in both simulated and real environments so
as to comprise a variety of scenarios observed in systems development. The approach assists in the requirement analysis and
modelling, minimising existing problems in natural language specification, such as the dependence on the knowledge of
specialists, uncertainty, ambiguity and complexity.
The first chart in Fig. 7 represents the time (in minutes) needed
to create specifications for 30 features classified as ‘Simple Entity’.
4 Related work
Early last decade, Li [8] proposed a set of rules to formalise the
specification of textual use cases, enabling the analyst to infer what
classes, objects, associations, attributes and operations compose a
particular use case. However, it is a case of purely mechanical and
non-automated activity, since a testing tool for the proposed
standard was not developed.
Williams et al. [9] proposed an approach that allowed users to
explore the most common problems observed in use case
modelling, unveiling inconsistencies and misalignment between
models and their textual specifications. Hoffmann et al. [10] later
presented a meta model for textual use case description that defines
a representation of use case behaviour, being easily understandable
for readers that do not master the subject. For modelling narrative
use cases, the authors developed the NaUTiluS tool.
In [2], a language for use case specification named SilabReq is
Fig. 3 Main flow – AddAccount proposed. From use cases, it generates domain models, the system
operations list, the use case model and activity and state diagrams.
In the following year, the same author proposed the separation of
use case specifications into different layers of abstraction, since use
cases are used by people with different roles and needs during
software development, from end-users, requirement engineers and
business analysts, to designers, developers and testers. Differently
from the aforementioned approach, and in addition to use case and
sequence diagrams, the LUCAMTool is also able to generate class
diagrams, one of the most important diagrams in UML. The tests
conducted with the LUCAMTool in real software development
environments and the results derived from them also set LUCAM
apart from SilabReq.
Thakur and Gupta [11] presented a tool that enables automatic
generation of sequence diagrams from use case specifications
written in natural language (English). In this approach, the natural
language analyser developed by Stanford NLP Group [12] was
used to identify the objects and interactions among them from the
specification. The parser analyses sentences and classifies each
word of the text as an adjective, adverb, article, pronoun, noun,
verb etc. Therefore, the approach does not consider situations in
the sequence diagram such as combined fragments, self calls and it
does not generate other Unified Modelling Language (UML)
models.
In the next year, Yue et al. [13] presented a tool denominated
Fig. 4 Alternate flow – CloseAccount
aToucan. The tool is able to perform automatic generation of a
UML analysis model contemplating class, sequence and activity
time-consuming, and it is not worth it to our team to write it. […] diagrams, from a previously defined use case model. Researchers
UML diagrams are too complex and require too much effort from also adopted a specification in natural language (English) and
our analysts’. similarly to the previously cited work, Stanford Parser was used to
Most of the interviewed staffs are versed in one or more classify words in sentences written in natural language.
programming languages and were interested in a solution to help Despite the evolution in automatic model generation
automate some of the stages in software development. They are techniques, we observed that adopting natural language implies
also willing to learn a new language to write software embracing the risk of recurring problems, since natural language is
specifications. inherently non-structured, ambiguous and does not establish a
Regarding results obtained from the use of the LUCAMTool, communication standard for the team. This hinders the automation
most of the respondents consider its application in a real scenario of artefact generation and, consequently, the traceability among
viable, according to a few answers: ‘[…] the language used by the specifications, model and source code.
tool is very intuitive and easy to learn. […] using the proposed On the other hand, domain-specific languages (DSLs) establish
language gives us more precision when building the generated a common language to be used by all team members. Its formality
diagrams and partly removes the reliance on specific software to standardises communication among those involved in the project,
generate diagrams …’. paving the way towards more productivity, increased reliability and
When asked whether diagrams generated by the LUCAMTool enhanced generated artefact quality [14, 15]. DSLs also permit
accurately reflect what was specified, and whether specifications solutions in the application domain level, enabling the analysts to
translated to LUCAM remain authentic to the natural language understand, validate, modify and develop features utilising the
models provided, the majority of respondents confirmed that they defined language. Domain specialists and software engineers are
do, validating the conducted tests. already familiar with the formality of programming languages,
After receiving training on the LUCAM language and the which reduces the time for learning the DSL and optimises
LUCAMTool, and when presented with the results obtained during resource utilisation [3, 15, 16].
testing, the teams identified some positive points: ‘[…] the
language is objective, clear, and easy to learn. […] the models
accurately reflect the specification. […] artefact generation in XMI 5 Conclusion
format’; and a few negative ones: ‘[…] specifications of more Features present in the LUCAM standardise important stages in
specific processes, such as SAP, are not supported. […] the IDE system development, such as use case specification and modelling.
IET Softw., 2018, Vol. 12 Iss. 2, pp. 129-135 133
© The Institution of Engineering and Technology 2017
17518814, 2018, 2, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-sen.2016.0279 by CAPES, Wiley Online Library on [09/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
109
115
57
Reports
30
15
28
Workflow
7
5
6
Composite entity
25
16
33
Single entity
53
21
42
Table 3 Feature list for the tested systems
Fig. 6 Sequence diagram
concrete management
Fig. 5 Class diagram
event management
form management
Systems
134
17518814, 2018, 2, Downloaded from https://ietresearch.onlinelibrary.wiley.com/doi/10.1049/iet-sen.2016.0279 by CAPES, Wiley Online Library on [09/11/2022]. See the Terms and Conditions (https://onlinelibrary.wiley.com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons License
• support for multiple natural languages, not just English;
• version control for the generated artefacts;
• generation of additional software artefacts such as other UML
diagrams, screen prototypes, automated test cases and source
code;
• import and export of specifications to enable interoperation with
other tools;
• specification and management of non-functional requirements;
• support the user story format;
• automatic propagation of changes in any of the formats (DSL,
diagrams and source code) to all the others to better support
iterative refinement and validation of software.
Fig. 7 Time specification and modelling – single entity
The LUCAMTool has been tested in selected environments, but
testing of the tool and its extensions should be expanded to a larger
range of corporate environments.
6 Acknowledgment
The authors acknowledge the financial support received from
IFMG, FAPEMIG and PUCMinas Brazil.
7 References
[1] El-Attar, M.: ‘A systematic approach to assemble sequence diagrams from use
case scenarios’. 2011 3rd Int. Conf. Computer Research and Development
(ICCRD), March 2011, vol. 4, pp. 171–175
[2] Savic, D., Antovic, I., Vlajic, S., et al.: ‘Language for use case specification’.
Fig. 8 Time specification and modelling – composite entity 2011 34th IEEE Software Engineering Workshop (SEW), June 2011, pp. 19–
26
This standardisation increases productivity and establishes a clear [3] Fowler, M., Parsons, R.: ‘Domain-specific languages’ ‘(The Addison-Wesley
Signature Series) (Addison-Wesley, Upper Saddle River (NJ), Boston, Paris,
and precise team communication standard. It alleviates frequent 2011)
problems arising from natural language use, such as ambiguity, [4] Heering, J., Mernik, M.: ‘Domain-specific languages for software
uncertainty and complexity. The LUCAMTool also enables the engineering’. Proc. 35th Annual Hawaii Int. Conf. System Sciences, 2002,
automatic and consistent generation of use case, class and sequence HICSS, January 2002, pp. 3649–3650
[5] Tiwari, S., Gupta, A.: ‘A systematic literature review of use case
diagrams, which can be used to generate source code prototypes. specifications research’, Inf. Softw. Technol., 2015, 67, pp. 128–158
Every DSL is defined by syntactic and semantic rules, which [6] ‘Openup’. Available at http://epf.eclipse.org/wikis/openup/index.htm,
makes user training sessions an essential activity. As a result of our accessed 2 August 2 2015
tests, we realised that we can mitigate productivity losses resulting [7] ‘Astah’. Available at http://astah.net/editions/professional, accessed 30
August 2015
from the use of an unfamiliar language by training users in the use [8] Li, L.: ‘Translating use cases to sequence diagrams’. Proc. 15th IEEE Int.
of the tools [3, 16]. We learned that DSL designers must clearly Conf. Automated Software Engineering, ser. ASE ‘00, Washington, DC,
understand the DSL's purpose and how its potential users work. USA, 2000, p. 293
The DSL's syntax and semantics should be simple and built [9] Williams, C., Kaplan, M., Klinger, T., et al.: ‘Toward engineered, useful use
cases’, J. Object Technol., 2005, 4, (6), pp. 45–57
straightforwardly on the concepts and vocabulary that users already [10] Hoffmann, V., Lichter, H., Nyßen, A., et al.: ‘Towards the integration of
understand. This makes the DSL easier to learn. UML-and textual use case modeling’, J. Object Technol., 2009, 8, (3), pp. 85–
We concluded that it is possible to automatically generate 100
software artefacts from a DSL. This has some advantages: It [11] Thakur, J.S., Gupta, A.: ‘Automatic generation of sequence diagram from use
case specification’. Proc. 7th India Software Engineering Conf., ser.
enables the reuse of existing software artefacts. It also produces ISEC ’14, New York, NY, USA, 2014, pp. 20:1–20:6
standardised artefacts based on consistent models, thus potentially [12] ‘Stanford parser’. Available at http://nlp.stanford.edu/, accessed 5 August
increasing productivity, decreasing errors and improving quality. 2015
By providing a consistent set of representations, it facilitates [13] Yue, T., Briand, L.C., Labiche, Y.: ‘Atoucan: an automated framework to
derive UML analysis models from use case models’, ACM Trans. Softw. Eng.
communication among analysts, software developers and others. Methodol., May 2015, 24, (3), pp. 13:1–13:52
Although simulated environments are quite useful in debugging [14] Heijstek, W., Chaudron, M.: ‘The impact of model driven development on the
software tools, they often do not capture all the relevant software architecture process’. 2010 36th EUROMICRO Conf. Software
characteristics of real-world software development environments. Engineering and Advanced Applications (SEAA), September 2010, pp. 333–
341
Some situations only arise on large projects in production [15] Ghosh, D.: ‘DSL for the uninitiated’, Commun. ACM, 2011, 54, (7), pp. 44–
environments. Thus, the opportunity to conduct tests in real-world 50
environments was invaluable. It enabled us to identify potential [16] Gupta, G.: ‘Language-based software engineering’, Sci. Comput. Program.,
features of the LUCAMTool and helped us plan future steps of the 2015, 97, (Part 1), pp. 37–40, special issue on new ideas and emerging results
in understanding software
project.
What are the possible future steps? Possible extensions to
LUCAMTool include: