pose, mechanisms for specifying frame conditions in
UML/OCL have been suggested only recently Kosiu-
czenko (2013); Brucker et al. (2014).
However, while frame conditions are indeed able
to solve the frame problem, properly defining them is
a non-trivial process. Similarly as the definition of the
UML/OCL model itself, it requires a full understan-
ding of the considered system as well as its depen-
dencies. But while the designer is aided by several
tools and methods when defining the UML/OCL mo-
del (see, e. g., Gogolla et al. (2007, 2009); Demuth
and Wilke (2009)), almost no support exists yet for
the proper definition of frame conditions. In fact,
initial approaches providing the designer with pro-
posals for frame conditions and/or a classification of
model elements that may be affected by an opera-
tion have recently been proposed in Niemann et al.
(2015b). But they cannot guarantee that the deri-
ved frame conditions are indeed correct or complete
the specification of the model in the actually inten-
ded way. While for UML/OCL models in general,
corresponding methods for validation and verification
are available (see, e. g., Anastasakis et al. (2007); Ca-
bot et al. (2008, 2009); Brucker and Wolff (2008);
Choppy et al. (2011); Soeken et al. (2011); Hilken
et al. (2014); Przigoda et al. (2015a, 2016b)), no dedi-
cated analysis method for frame conditions exists so
far.
In this work, we close this gap by providing a
methodology for the dedicated analysis of frame con-
ditions in UML/OCL models. To this end, we first
discuss primary objectives for such an analysis—
yielding a notion of consistency, equivalence, and in-
dependence of frame conditions. Based on that, a
method is introduced afterwards, which automatically
analyzes a given set (or sets) of frame conditions with
respect to these objectives. An application of the re-
sulting methodology confirms the benefits of the pro-
posed approach. In fact, designers are aided with a
tool that allows them to efficiently check whether the
derived frame conditions are consistent with the gi-
ven UML/OCL model and complete the specification
of the model in the actually intended way.
The remainder of this paper is structured as fol-
lows: All ideas and concepts covered in this work
are illustrated by means of a simple UML/OCL mo-
del specifying an access control system which serves
as a running example and is introduced in Section 2.
Afterwards, Section 3 briefly reviews the frame pro-
blem as well as the different UML/OCL description
means introduced in the past to define frame conditi-
ons. Based on that, primary objectives for analyzing
the respectively obtained frame conditions are intro-
duced and discussed in Section 4 and an automatic
method for conducting these analyses is described in
Section 5. Finally, an implementation of the resulting
methodology is discussed in Section 6 and the paper
is concluded in Section 7.
2 PRELIMINARIES
In this section, we introduce basic concepts and noti-
ons of UML/OCL by means of the running example
that will also be later on used to illustrate the basic
concepts of frame conditions as well as the proposed
analysis methodology.
The running example, a slightly modified ver-
sion of the one originally presented in Przigoda et al.
(2015b), specifies a control system which grants
access to buildings based on magnetic cards as au-
thentication method. The cards are checked at turn-
stiles at the buildings’ entries and exits. The system
model is given in terms of a UML class diagram enri-
ched with textual OCL constraints and is depicted in
Fig. 1. The pure UML part describes the structure of
the system in terms of classes (e. g., Building, Mag-
neticCard, Turnstile), attributes and available ope-
rations of each class (e. g., Building::inside or
Turnstile::goThrough()) as well as relationships
between the classes in terms of associations. For the
sake of a convenient reference, we will refer to the
union of all attributes (of all classes) together with all
relations of a model as the set of model elements.
In this particular case, there is a single relationship
stating that each turnstile is associated with a unique
building and that each building contains at least two
turnstiles (gates). Such multiplicity constraints—
besides inheritance of classes which is not present in
the running example—are essentially the only con-
straints that can be stated in class diagrams using pure
UML.
To enforce further constraints or properties of
a system, textual OCL constraints are applied. On
the one hand, invariants describe properties such as
the uniqueness of a magnetic card’s ID (invariant
uniqueID), the existence of at least one entry and one
exit for each building (invariants atLeastOneEntry
and atLeastOneExit) or the fact that permanently
either the green or the red light of a turnstile is
lit (invariant eitherGreenOrRedLight). On the
other hand, OCL is employed to formulate so-called
operation contracts Meyer (1992) which comprise
preconditions (denoted by C) that are necessary to
invoke an operation call in the first place as well
as postconditions (denoted by B) that can be taken
for granted after the execution of the operation
has been completed. For instance, the operation
MODELSWARD 2018 - 6th International Conference on Model-Driven Engineering and Software Development
140