2 STATE-OF-THE-ART
Several works exist to ease UML modeling learning.
For example, (Hasker and Rowe, 2011) has imple-
mented the tool U mlInt that syntactically corrects use
case and class diagrams of learners to provide them
feedback on their modeling so they can avoid some
common errors. Learners submit a generated model
with IBM’s Rational Rose modeling tool via a web
platform. UmlInt then analyzes it to check some
predefined errors. Another example is (Striewe and
Goedicke, 2011), which integrates a modeling soft-
ware and uses teachers’ defined rules for each exer-
cise to correct learners’ class diagrams. We have also
(ONDIK, 2016) that allows for correcting previously
fixed errors in some UML diagrams. For each error
to correct, rules have to be set up. The rules contain
a verification expression, which checks the validity of
the specified element attribute and the error message
to be displayed. The solution was implemented as an
extension of the modeling tool named Sparx Enter-
prise Architect.
The tool Kora proposed in (Correia et al., 2017)
allows students to correct any UML diagram mod-
eling exercise based on a predefined basic solution.
It corrects syntactically and semantically UML dia-
grams. Indeed it works on a graph comparison sys-
tem. Once the student has finished and submitted
his modeling at the interface level, Kora transforms
it into a graph and syntactically corrects it based on a
set of rules. Kora semantically corrects the diagram
by comparison to a basic solution (also under a graph
form) and then returns a set of differences. Other
works like (Hoggarth and Lockyer, 1998), (Hasker,
2011), (Vesin et al., 2018), (Vachharajani and Pareek,
2014), (Thomas, 2013), and (Thomas et al., 2008)
perform UML diagrams syntax correction based on
predefined errors or rules. On the other hand, the tool
presented in (Soler et al., 2010) is an online class di-
agrams modeling learning platform. For each exer-
cise, the teacher provides an attributes list and a set of
possible correct solutions. The teacher defines all the
classes, attributes, associations, relations, multiplic-
ities, and directions of the arrows (unidirectional or
bidirectional). Correction is based on these elements
checking by using attribute names.
To the best of our knowledge, state-of-the-art tools
ask for some restrictions. Some require teachers to fill
out answers to the exercises or rules. Others require
some programming knowledge to provide the rules.
This paper proposes a solution based on the image of
the diagram that is more accessible to learners.
3 OUR APPROACH
We propose a generic tool to syntactically correct
UML use case diagrams only based on their images.
Our process has three main steps: 1) use case di-
agrams elements detection, 2) connected elements
identification, and 3) diagrams correction based on
UML rules. We explain each step in the rest of this
section.
3.1 Use Case Diagrams Elements
Detection
We have established a list of main elements encoun-
tered in use case diagrams:
• use cases, represented by ellipses,
• actors, represented by stick figures and rectangles
with actor stereotype,
• system, represented by a large rectangle,
• associations, represented by simples lines, and
• relationships, represented by dotted arrows (in-
clude and exclude relationships) and solid lines
arrows (generalization relationships).
Figure 1 illustrates these elements.
Figure 1: Use case diagrams elements.
Firstly, we detect some of these elements (actors,
use cases, and arrows) by completing a data collec-
tion campaign and collecting images on the internet
to generate a dataset and build a detection model. We
had 699 images of use case diagrams and their el-
ements at the end of this collection. After annota-
tion, preprocessing (gray levels, automatic contrast
adjustment, resizing 416 x 416, and automatic im-
age orientation), and augmentation (rotation, varia-
tion of the brightness between -25% and +25%, blur-
ring and noise introduction) of these images with the
Roboflow platform, we obtained 1691 images for our
dataset, We then divided 70% of the images in the
training set, 20% of the images in the validation set
DeLTA 2022 - 3rd International Conference on Deep Learning Theory and Applications
194