Abstract
State machines are a commonly used formalism for specifying the behavior of a software component, which could also be helpful for program comprehension. Therefore, it is desirable to extract state machine models from code and also from legacy models. The main drawback of fully-automatic state machine mining approaches is that the mined models are too detailed and not understandable. In our previous work [1], we presented different measures for the interaction with the state machine extraction process, such as selecting a subset of state variables, reducing the state variable range and providing additional user constraints. These measures aimed to reduce the complexity of the mined state machines to an understandable degree. In this article, which is an extended version of [1], we evaluate the approach through a case study with twelve professional developers from the automotive supplier company Bosch. The study shows that adding our interactive measures to the model mining process leads to understandable state machines, which can be very helpful in a rich set of use cases in addition to program comprehension, such as debugging, validation and verification. Furthermore, we conduct an experiment to evaluate the required computation time of the interactive measures against the fully-automatic mining. The experiment shows that the interactive approach can drastically reduce the computation time.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
The combination of all Es from symbolic execution defines the function f.
- 4.
In all our experiments in this paper, we concentrate on the structure and complexity of the resulting state machines regarding the number of states and transitions. Therefore, we do not show transition conditions in the figures.
- 5.
In the figure, we show only five states, because the other five states (with !Sync) are not connected by any transitions.
- 6.
References
Said, W., Quante, J., Koschke, R.: Towards interactive mining of understandable state machine models from embedded software. In: Proceedings of the 6th International Conference on Model-Driven Engineering and Software Development: MODELSWARD, vol. 1, pp. 117–128 (2018)
Fjeldstad, R.K., Hamlen, W.T.: Application program maintenance study: report to our respondents. In: Proceedings of GUIDE 48 (1984)
Ko, A.J., Myers, B.A., Coblenz, M.J., Aung, H.H.: An exploratory study of how developers seek, relate, and collect relevant information during software maintenance tasks. IEEE Trans. Softw. Eng. 32, 971–987 (2006)
Minelli, R., Mocci, A., Lanza, M.: I know what you did last summer: an investigation of how developers spend their time. In: Proceedings of 23rd International Conference on Program Comprehension, pp. 25–35 (2015)
Roehm, T., Tiarks, R., Koschke, R., Maalej, W.: How do professional developers comprehend software? In: Proceedings of 34th ICSE, pp. 255–265 (2012)
Broy, M., Kirstan, S., Krcmar, H., Schätz, B., Zimmermann, J.: What is the benefit of a model-based design of embedded software systems in the car industry? In: Software Design and Development: Concepts, Methodologies, Tools, Applications, pp. 310–334 (2013)
Kung, D.C., Suchak, N., Gao, J.Z., Hsia, P., Toyoshima, Y., Chen, C.: On object state testing. In: Proceedings of 18th International Computer Software and Applications Conference (COMPSAC), pp. 222–227 (1994)
Sen, T., Mall, R.: Extracting finite state representation of Java programs. Softw. Syst. Model. 15, 497–511 (2016)
Cheng, K.T., Krishnakumar, A.S.: Automatic functional test generation using the extended finite state machine model. In: Proceedings of 30th ACM/IEEE Design Automation Conference, pp. 86–91 (1993)
King, J.C.: Symbolic execution and program testing. J. ACM 19, 385–394 (1976)
Godefroid, P., Klarlund, N., Sen, K.: DART: directed automated random testing. In: Proceedings of PLDI, pp. 213–223 (2005)
Hoffmann, A., Quante, J., Woehrle, M.: Experience report: white box test case generation for automotive embedded software. In: Proceedings of 9th International Conference on Software Testing, Verification and Validation Workshops, TAIC-PART Workshop, pp. 269–274 (2016)
Said, W., Quante, J., Koschke, R.: On state machine mining from embedded control software. In: Proceedings of the 34th International Conference on Software Maintenance and Evolution (ICSME). (2018)
Quante, J.: A program interpreter for arbitrary abstractions. In: 16th International Working Conference on Source Code Analysis and Manipulation, pp. 91–96 (2016)
Nejmeh, B.A.: NPATH: a measure of execution path complexity and its applications. Commun. ACM 31, 188–200 (1988)
Miranda, D., Genero, M., Piattini, M.: Empirical validation of metrics for UML statechart diagrams. In: Camp, O., Filipe, J.B.L., Hammoudi, S., Piattini, M. (eds.) Enterprise Information Systems V, pp. 101–108. Springer, Netherlands (2005). https://doi.org/10.1007/1-4020-2673-0_12
Weiser, M.: Program slicing. In: Proceedings of 5th International Conference on Software Engineering (1981) 439–449
Horwitz, S., Reps, T.W., Binkley, D.: Interprocedural slicing using dependence graphs. In: Proceedings of Conference on Programming Language Design and Implementation, pp. 35–46 (1988)
Cadar, C., Dunbar, D., Engler, D.R.: KLEE: unassisted and automatic generation of high-coverage tests for complex systems programs. In: 8th USENIX Symposium on Operating Systems Design and Implementation, pp. 209–224 (2008)
Ammons, G., Bodík, R., Larus, J.R.: Mining specifications. In: Proceedings of 29th Symposium on Principles of Programming Languages, pp. 4–16 (2002)
Whaley, J., Martin, M.C., Lam, M.S.: Automatic extraction of object-oriented component interfaces. SIGSOFT Softw. Eng. Notes 27, 218–228 (2002)
Lo, D., Khoo, S.C., Liu, C.: Efficient mining of iterative patterns for software specification discovery. In: Proceedings of 13th International Conference on Knowledge Discovery and Data Mining, pp. 460–469 (2007)
Shoham, S., Yahav, E., Fink, S.J., Pistoia, M.: Static specification mining using automata-based abstractions. IEEE Trans. Softw. Eng. 34, 651–666 (2008)
Eisenbarth, T., Koschke, R., Vogel, G.: Static object trace extraction for programs with pointers. J. Syst. Softw. 77, 263–284 (2005)
Walkinshaw, N., Bogdanov, K., Ali, S., Holcombe, M.: Automated discovery of state transitions and their functions in source code. Softw. Test. Verif. Reliab. 18, 99–121 (2008)
Walkinshaw, N., Bogdanov, K., Holcombe, M., Salahuddin, S.: Reverse engineering state machines by interactive grammar inference. In: Proceedings of 14th Working Conference on Reverse Engineering (WCRE), pp. 209–218 (2007)
Corbett, J.C., Dwyer, M.B., Hatcliff, J., Laubach, S., Pasareanu, C.S., Robby, Zheng, H.: Bandera: extracting finite-state models from Java source code. In: Proceedings of 22nd ICSE, pp. 439–448 (2000)
Xie, T., Martin, E., Yuan, H.: Automatic extraction of abstract-object-state machines from unit-test executions. In: Proceedings of 28th ICSE, pp. 835–838 (2006)
Tonella, P., Potrich, A.: Reverse Engineering of Object Oriented Code. Springer, New York (2011). https://doi.org/10.1007/b102522
Dallmeier, V., Lindig, C., Wasylkowski, A., Zeller, A.: Mining object behavior with ADABU. In: Proceedings of International Workshop on Dynamic Systems Analysis, pp. 17–24 (2006)
van den Brand, M., Serebrenik, A., van Zeeland, D.: Extraction of state machines of legacy C code with Cpp2XMI. In: Proceedings of 7th Belgian-Netherlands Software Evolution Workshop, pp. 28–30 (2008)
Knor, R., Trausmuth, G., Weidl, J.: Reengineering C/C++ source code by transforming state machines. In: van der Linden, F. (ed.) ARES 1998. LNCS, vol. 1429, pp. 97–105. Springer, Heidelberg (1998). https://doi.org/10.1007/3-540-68383-6_15
Abadi, M., Feldman, Y.A.: Automatic recovery of statecharts from procedural code. In: International Conference on Automated Software Engineering, pp. 238–241 (2012)
Somé, S.S., Lethbridge, T.: Enhancing program comprehension with recovered state models. In: 10th International Workshop on Program Comprehension (IWPC), pp. 85–93 (2002)
Jiresal, R., Makkapati, H., Naik, R.: Statechart extraction from code - an approach using static program analysis and heuristics based abstractions. In: Proceedings of 2nd India Workshop on Reverse Engineering (2011)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Switzerland AG
About this paper
Cite this paper
Said, W., Quante, J., Koschke, R. (2019). Interactive Measures for Mining Understandable State Machines from Embedded Software: Experiments and Case Studies. In: Hammoudi, S., Pires, L., Selic, B. (eds) Model-Driven Engineering and Software Development. MODELSWARD 2018. Communications in Computer and Information Science, vol 991. Springer, Cham. https://doi.org/10.1007/978-3-030-11030-7_10
Download citation
DOI: https://doi.org/10.1007/978-3-030-11030-7_10
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-11029-1
Online ISBN: 978-3-030-11030-7
eBook Packages: Computer ScienceComputer Science (R0)