Authors:
Andreas Grosche
1
;
Burkhard Igel
2
and
Olaf Spinczyk
3
Affiliations:
1
Behr-Hella Thermocontrol GmbH, Hansastraße 40, 59557 Lippstadt, Germany
;
2
Fachhochschule Dortmund, Sonnenstraße 96, 44139 Dortmund, Germany
;
3
Universität Osnabrück, Wachsbleiche 27, 49090 Osnabrück, Germany
Keyword(s):
State Machine Extraction, Model Mining, Reverse Engineering, Program Comprehension, Refactoring.
Abstract:
Automated extraction of state machine models from source code can improve comprehension of software system behavior required for many maintenance tasks and reuse in general. Furthermore, it can be used for subsequent automated processing such as refactoring and model-based verification. This paper presents an approach based on normalizing transformations of an input program and a pattern to find state machine implementations in the program and to extract relevant information. The results are used to create state machine models containing states, transitions, events, guards and actions. Fine-grained traceability between the model and the source code enables navigation and refactoring of model elements. We evaluate the approach by applying a prototypical implementation to industrial automotive embedded code and show that 74 % of the expected state machine implementations can be completely identified and 8 % partially.