Skip to main content

Interactive Measures for Mining Understandable State Machines from Embedded Software: Experiments and Case Studies

  • Conference paper
  • First Online:
Model-Driven Engineering and Software Development (MODELSWARD 2018)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://www.etas.com/en/products/ascet_software_products.php.

  2. 2.

    https://www.mathworks.com/products/simulink.html.

  3. 3.

    The combination of all Es from symbolic execution defines the function f.

  4. 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. 5.

    In the figure, we show only five states, because the other five states (with !Sync) are not connected by any transitions.

  6. 6.

    http://www-03.ibm.com/software/products/de/ratirhap.

References

  1. 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)

    Google Scholar 

  2. Fjeldstad, R.K., Hamlen, W.T.: Application program maintenance study: report to our respondents. In: Proceedings of GUIDE 48 (1984)

    Google Scholar 

  3. 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)

    Article  Google Scholar 

  4. 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)

    Google Scholar 

  5. Roehm, T., Tiarks, R., Koschke, R., Maalej, W.: How do professional developers comprehend software? In: Proceedings of 34th ICSE, pp. 255–265 (2012)

    Google Scholar 

  6. 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)

    Google Scholar 

  7. 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)

    Google Scholar 

  8. Sen, T., Mall, R.: Extracting finite state representation of Java programs. Softw. Syst. Model. 15, 497–511 (2016)

    Article  Google Scholar 

  9. 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)

    Google Scholar 

  10. King, J.C.: Symbolic execution and program testing. J. ACM 19, 385–394 (1976)

    Article  MathSciNet  Google Scholar 

  11. Godefroid, P., Klarlund, N., Sen, K.: DART: directed automated random testing. In: Proceedings of PLDI, pp. 213–223 (2005)

    Article  Google Scholar 

  12. 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)

    Google Scholar 

  13. 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)

    Google Scholar 

  14. Quante, J.: A program interpreter for arbitrary abstractions. In: 16th International Working Conference on Source Code Analysis and Manipulation, pp. 91–96 (2016)

    Google Scholar 

  15. Nejmeh, B.A.: NPATH: a measure of execution path complexity and its applications. Commun. ACM 31, 188–200 (1988)

    Article  Google Scholar 

  16. 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

    Chapter  Google Scholar 

  17. Weiser, M.: Program slicing. In: Proceedings of 5th International Conference on Software Engineering (1981) 439–449

    Google Scholar 

  18. 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)

    Google Scholar 

  19. 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)

    Google Scholar 

  20. Ammons, G., Bodík, R., Larus, J.R.: Mining specifications. In: Proceedings of 29th Symposium on Principles of Programming Languages, pp. 4–16 (2002)

    Google Scholar 

  21. Whaley, J., Martin, M.C., Lam, M.S.: Automatic extraction of object-oriented component interfaces. SIGSOFT Softw. Eng. Notes 27, 218–228 (2002)

    Article  Google Scholar 

  22. 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)

    Google Scholar 

  23. Shoham, S., Yahav, E., Fink, S.J., Pistoia, M.: Static specification mining using automata-based abstractions. IEEE Trans. Softw. Eng. 34, 651–666 (2008)

    Article  Google Scholar 

  24. Eisenbarth, T., Koschke, R., Vogel, G.: Static object trace extraction for programs with pointers. J. Syst. Softw. 77, 263–284 (2005)

    Article  Google Scholar 

  25. 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)

    Article  Google Scholar 

  26. 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)

    Google Scholar 

  27. 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)

    Google Scholar 

  28. 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)

    Google Scholar 

  29. Tonella, P., Potrich, A.: Reverse Engineering of Object Oriented Code. Springer, New York (2011). https://doi.org/10.1007/b102522

    Book  MATH  Google Scholar 

  30. 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)

    Google Scholar 

  31. 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)

    Google Scholar 

  32. 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

    Chapter  Google Scholar 

  33. Abadi, M., Feldman, Y.A.: Automatic recovery of statecharts from procedural code. In: International Conference on Automated Software Engineering, pp. 238–241 (2012)

    Google Scholar 

  34. Somé, S.S., Lethbridge, T.: Enhancing program comprehension with recovered state models. In: 10th International Workshop on Program Comprehension (IWPC), pp. 85–93 (2002)

    Google Scholar 

  35. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Wasim Said .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics