the same stimulus originating from the same state. In
contrast, statecharts supported by the UML seman-
tics are by definition not underspecified. The default
states of composite states are always unique. Fur-
ther, ambiguities in the transition relation are elim-
inated by using priorities (Eshuis, 2009). Model-
ing underspecified statecharts is especially useful in
early development stages where most of the system
requirements are unknown. When additional require-
ments become known in later development stages, un-
derspecification can be removed by changing the re-
spective statechart syntactically to restrict the possible
system behaviors accordingly. Then, semantic differ-
encing facilitates developers in detecting whether the
new statechart version is indeed a refinement of its
predecessor version.
A method to verify statecharts against computa-
tion tree logic formulas is introduced in (Zhao and
Krogh, 2006). The method is generic and thus appli-
cable to a general statechart class. The approach is
based on step-semantics and assumes that statecharts
exhibit bounded behaviors. Extending the approach
could yield semantic differencing methods for state-
charts with bounded behaviors under step semantics.
In (Maggiolo-Schettini et al., 1996), statecharts
are translated to labeled transition systems, which
represent their semantics. Based on the translation,
several equivalence relations for statecharts are de-
fined. The semantics used in the approach is a vari-
ant of the semantics described in (Pnueli and Shalev,
1991). Transfering the equivalence relations to our
approach is interesting for the development of further
abstraction methods.
Another approach (Meng et al., 2004) that con-
siders refinement of statecharts uses a coalgebraic se-
mantics inspired by the operational semantics intro-
duced in (Latella et al., 1999). The approach uses
another semantics than the one in this paper and does
not describe an automated method for checking re-
finement. However, the paper introduces eight refine-
ment rules that are correct by construction. Devel-
oping such rules for statecharts using this paper’s se-
mantics is interesting future work.
9 CONCLUSION
This paper formally defined a reduced abstract syntax
for UML/P statecharts modeling the behavior of ob-
jects in object-oriented systems. We further defined
a semantics for statecharts based on the behaviors in-
duced by taking transitions during statechart execu-
tions. Subsequently, this paper presented a semantics-
preserving translation from statecharts to NFAs. The
translation enables to reduce semantic differencing of
statecharts to language inclusion checking between
NFAs, which is fully automatable. Afterwards, this
paper defined event hiding and event matching as two
abstraction methods that enable to apply semantic dif-
ferencing to statecharts on different levels of abstrac-
tion. The result is a fully automated semantic differ-
encing method for a statechart variant that supports
underspecification. For future work, we plan to in-
vestigate the method’s performance. The method ul-
timately facilitates semantic evolution analysis for de-
velopers of statecharts specifying the behavior of ob-
jects in object-oriented systems.
REFERENCES
Cengarle, M. V., Gr
¨
onniger, H., and Rumpe, B. (2009).
Variability within Modeling Language Definitions. In
Conference on Model Driven Engineering Languages
and Systems (MODELS’09).
Eshuis, R. (2009). Reconciling statechart semantics. Sci-
ence of Computer Programming, 74(3).
Gr
¨
onniger, H. and Rumpe, B. (2011). Modeling Language
Variability. In Workshop on Modeling, Development
and Verification of Adaptive Systems.
Harel, D. (1987). Statecharts: A Visual Formalism for
Complex Systems. Science of Computer Program-
ming, 8.
Harel, D. and Gery, E. (1997). Executable Object Model-
ing with Statecharts. In International Conference on
Software Engineering.
Harel, D. and Kugler, H. (2004). The Rhapsody Seman-
tics of Statecharts (or, On the Executable Core of the
UML). In Integration of Software Specification Tech-
niques for Applications in Engineering.
Harel, D., Lachover, H., Naamad, A., Pnueli, A., Politi, M.,
Sherman, R., and Shtul-Trauring, a. (1988). State-
mate: A Working Environment for the Development
of Complex Reactive Systems. In Proceedings of the
10th International Conference on Software Engineer-
ing.
Harel, D. and Naamad, A. (1996). The STATEMATE Se-
mantics of Statecharts. ACM Transactions on Soft-
wware Engineering Methodology, 5(4).
Harel, D. and Politi, M. (1998). Modeling Reactive Systems
with Statecharts: The Statemate Approach. McGraw-
Hill, Inc.
Hopcroft, J. E., Motwani, R., and Ullman, J. D. (2006). In-
troduction to Automata Theory, Languages, and Com-
putation (3rd Edition). Addison-Wesley Longman
Publishing Co., Inc., Boston, MA, USA.
Latella, D., Majzik, I., and Massink, M. (1999). Towards
a Formal Operational Semantics of UML Statechart
Diagrams. In Formal Methods for Open Object-Based
Distributed Systems.
Semantic Differencing of Statecharts for Object-oriented Systems
279