2 RELATED WORK
Static data-flow model analysis is inspired by pro-
gram analysis techniques (Nielson et al., 2010) and
encompasses solutions for reasoning about the value
and relations (e.g., definitions, use) of data (e.g., Vari-
ables, Objects) that influence the execution of mod-
els, without actually running them. In the context of
UML, only behavioral diagrams (State Machines, Ac-
tivity and Sequence diagrams) are eligible for static
analysis. To the best of our knowledge, we appear
to be the first to propose the use of static data-flow
analysis on UML Activity diagrams and their combi-
nation with SysML Internal Block and Block Defini-
tion diagrams. Similarly, we found no related work
that applies this type of analysis to optimizing model
compilers.
The relevance of data-flow analysis on models is
evident from the amount of work presented at in-
ternational conferences (e.g., MODELS, MODEL-
SWARD). It can be assumed that work such as (Saad
and Bauer, 2013; Schwarzl, C. and Peischl, B., 2010;
Yu et al., 2008; Kienberger et al., 2014; Lai and Car-
penter, 2013) could profit from the algorithm in this
paper to efficiently propagate the results of data-flow
equations in their respective domains.
Most related work are based on the analysis of
Statecharts for software testing (Kim et al., 1999;
Briand et al., 2005; VERIMAG, 2018). The authors
in (Kim et al., 1999) discuss the generation of test
cases, given a set of criteria to be tested, from UML
State Machines. This generation is driven by data-
flow analysis that identifies the pairs of definitions
and uses of variables. The analysis is conducted on
a control-flow graph that is retrieved by transform-
ing the diagrams into Extended Finite State Machines
where hierarchical and concurrent states are flattened.
With respect to our work, communications between
Classes are not considered and broadcast communi-
cations are eliminated when transforming Statecharts
in Extended Finite State Machines. In (Briand et al.,
2005), the main contribution is a technique that guides
the coverage of UML Statecharts for test data selec-
tion in the context of fault detection. The proposed
technique allows to select the best cost-effective data
structure (a transition tree) based on definition-use
pairs of variables. While our control-flow graph is en-
tirely derived by UML/SysML diagrams, the authors
in (Briand et al., 2005) use a special Event Action
Flow Graph that represents events and actions only,
where operation contracts and guard conditions are
expressed in the Object Constraint Language.
The IF toolset (VERIMAG, 2018) is an environ-
ment for the modeling and validation of heteroge-
neous real-time systems that is built upon an interme-
diate representation formalism, called IF. The toolset
includes a translator for input UML Statecharts and
Class diagrams and a static analyzer. The latter oper-
ates on IF representations and supports live variable
analysis, dead code elimination and variable abstrac-
tion. In IF, the main difference with respect to our
contribution is that the functionality captured by in-
put models is executed by software implementations:
mixed hardware/software or purely hardware imple-
mentations are not considered.
The work in (Yu, 2014) describes a static anal-
ysis technique to analyze UML Class diagrams that
include operations specified using the Object Con-
straint Language (OCL) (OMG, 2014). The structure
of a software project is captured with UML Class di-
agrams that are investigated against a set of scenar-
ios representing some desired or undesired behaviors.
This work addresses the needs of verification engi-
neers rather than software developers.
Following the standardization of the Foundational
Subset for Executable UML, fUML, (Seidewitz,
2014; fUML, 2018), many work analyze fUML spec-
ifications of software implementations. In (Malm
et al., 2018) static program analysis is applied to its
textual action language Alf (OMG, 2018). The au-
thors introduce a round-trip transformation chain that
applies flow analysis to Alf specifications and back-
propagates the results of this analysis to Alf programs
for further investigation. The objective of their anal-
ysis is to retrieve information about loop bounds and
infeasible paths in a model to estimate a worst-case
execution time. In (Malm et al., 2018) a model’s ex-
ecution semantics influences both the construction of
the Control-Flow Graph and the algorithm that visits
it. On the contrary, in our work, the visit algorithm
only depends on the graph’s topology.
The authors in (Waheed et al., 2008) propose an ap-
proach to build a data structure that identifies all the
associations between definitions and use (DU) of vari-
ables within states of an input UML State Machine.
Statecharts are specified with the abstract syntax of
the UML Action Specification Language (Mellor and
Balcer, 2002). An input Statechart is parsed, its con-
trol flow graph is extracted and stored in an adjacency
matrix that is traversed to identify all the DU pairs.
The authors also propose mapping rules that allow
their approach to be reused with virtually any con-
crete syntax of the UML Action Specification Lan-
guage. However, no effective analysis is proposed nor
applied on the DU pairs (e.g., dead "code" elimina-
tion).
The work in (Aldrich, 2002) performs coverage
analysis on MATLAB state diagrams in order to es-
Efficient Data-Flow Analysis of UML/SysML Diagrams for Optimized Model Compilation of Hardware-software Systems
85