Skip to main content

Refactoring of Legacy Software Using Model Learning and Equivalence Checking: An Industrial Experience Report

  • Conference paper
  • First Online:
Integrated Formal Methods (IFM 2016)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 9681))

Included in the following conference series:


Many companies struggle with large amounts of legacy software that is difficult to maintain and to extend. Refactoring legacy code typically requires large efforts and introduces serious risks because often crucial business assets are hidden in legacy components. We investigate the support of formal techniques for the rejuvenation of legacy embedded software, concentrating on control components. Model learning and equivalence checking are used to improve a new implementation of a legacy control component. Model learning is applied to both the old and the new implementation. The resulting models are compared using an equivalence check of a model checker. We report about our experiences with this approach at Philips. By gradually increasing the set of input stimuli, we obtained implementations of a power control service for which the learned behaviour is equivalent.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.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

Similar content being viewed by others


  1. 1.

  2. 2.


  1. Aarts, F., Jonsson, B., Uijen, J., Vaandrager, F.W.: Generating models of infinite-state communication protocols using regular inference with abstraction. Formal Methods Syst. Des. 46(1), 1–41 (2015)

    Article  MATH  Google Scholar 

  2. Aarts, F., Kuppens, H., Tretmans, G.J., Vaandrager, F.W., Verwer, S.: Improving active Mealy machine learning for protocol conformance testing. Mach. Learn. 96(1–2), 189–224 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  3. Akers, R.L., Baxter, I.D., Mehlich, M., Ellis, B.J., Luecke, K.R.: Case study: re-engineering C++ component models via automatic program transformation. Inf. Softw. Technol. 49(3), 275–291 (2007)

    Article  Google Scholar 

  4. Angluin, D.: Learning regular sets from queries and counterexamples. Inf. Comput. 75(2), 87–106 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  5. Ansel, J., Arya, K., Cooperman, G.: DMTCP: transparent checkpointing for cluster computations and the desktop. In: IEEE Parallel and Distributed Processing Symposium (2009)

    Google Scholar 

  6. Cassel, S.: Learning component behavior from tests: theory and algorithms for automata with data. Ph.D. thesis, University of Uppsala (2015)

    Google Scholar 

  7. Cranen, S., Groote, J.F., Keiren, J.J.A., Stappers, F.P.M., de Vink, E.P., Wesselink, W., Willemse, T.A.C.: An overview of the mCRL2 toolset and its recent advances. In: Piterman, N., Smolka, S.A. (eds.) TACAS 2013 (ETAPS 2013). LNCS, vol. 7795, pp. 199–213. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  8. de Ruiter, J., Poll, E.: Protocol state fuzzing of tls implementations. In: 24th USENIX Security Symposium (USENIX Security 2015), pp. 193–206. USENIX Association (2015)

    Google Scholar 

  9. Dorofeeva, R., El-Fakih, K., Maag, S., Cavalli, A.R., Yevtushenko, N.: FSM-based conformance testing methods: a survey annotated with experimental evaluation. Inf. Softw. Technol. 52(12), 1286–1297 (2010)

    Article  Google Scholar 

  10. Engelfriet, J.: Determinacy - (observation equivalence = trace equivalence). Theor. Comput. Sci. 36, 21–25 (1985)

    Article  MathSciNet  MATH  Google Scholar 

  11. Feng, L., Lundmark, S., Meinke, K., Niu, F., Sindhu, M.A., Wong, P.Y.H.: Case studies in learning-based testing. In: Yenigün, H., Yilmaz, C., Ulrich, A. (eds.) ICTSS 2013. LNCS, vol. 8254, pp. 164–179. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  12. Fiterău-Broştean, P., Janssen, R., Vaandrager, F.: Learning fragments of the TCP network protocol. In: Lang, F., Flammini, F. (eds.) FMICS 2014. LNCS, vol. 8718, pp. 78–93. Springer, Heidelberg (2014)

    Google Scholar 

  13. Groce, A., Peled, D., Yannakakis, M.: Adaptive model checking. Logic J. IGPL 14(5), 729–744 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  14. Henrix, M.: Performance improvement in automata learning. Master thesis, Radboud University, Nijmegen (2015)

    Google Scholar 

  15. Howar, F., Isberner, M., Merten, M., Steffen, B.: LearnLib tutorial: from finite automata to register interface programs. In: Margaria, T., Steffen, B. (eds.) ISoLA 2012, Part I. LNCS, vol. 7609, pp. 587–590. Springer, Heidelberg (2012)

    Google Scholar 

  16. Isberner, M.: Foundations of active automata learning: an algorithmic perspective. Ph.D. thesis, Technical University of Dortmund (2015)

    Google Scholar 

  17. Kalsing, A.C., do Nascimento, G.S., Iochpe, C., Thom, L.H.: An incremental process mining approach to extract knowledge from legacy systems. In: Enterprise Distributed Object Computing Conference (EDOC), pp. 79–88 (2010)

    Google Scholar 

  18. Margaria, T., Niese, O., Raffelt, H., Steffen, B.: Efficient test-based model generation for legacy reactive systems. In: 9th IEEE International High-Level Design Validation and Test Workshop, pp. 95–100 (2004)

    Google Scholar 

  19. Raffelt, H., Steffen, B., Berg, T., Margaria, T.: LearnLib: a framework for extrapolating behavioral models. STTT 11(5), 393–407 (2009)

    Article  Google Scholar 

  20. Smeenk, W.: Applying automata learning to complex industrial software. Master thesis, Radboud University, Nijmegen, September 2012

    Google Scholar 

  21. Smeenk, W., Moerman, J., Vaandrager, F., Jansen, D.N.: Applying automata learning to embedded control software. In: Butler, M., et al. (eds.) ICFEM 2015. LNCS, vol. 9407, pp. 67–83. Springer, Heidelberg (2015). doi:10.1007/978-3-319-25423-4_5

    Chapter  Google Scholar 

  22. Steffen, B., Howar, F., Merten, M.: Introduction to active automata learning from a practical perspective. In: Bernardo, M., Issarny, V. (eds.) SFM 2011. LNCS, vol. 6659, pp. 256–296. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  23. van der Aalst, W.: Process Mining - Discovery Conformance and Enhancement of Business Processes. Springer, Heidelberg (2011)

    MATH  Google Scholar 

  24. Wagner, C.: Model-Driven Software Migration: A Methodology. Springer Vieweg, Heidelberg (2014)

    Book  Google Scholar 

  25. Warren, I.: The Renaissance of Legacy Systems - Method Support for Software System Evolution. Springer, London (1999)

    Book  MATH  Google Scholar 

Download references


We are most grateful to Joshua Moerman for helping with the experiments with the TTT algorithm. We also thank Petra van den Bos for careful proofreading of an earlier version. This research was supported by STW project 11763 (ITALIA) and the Dutch national program COMMIT.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Mathijs Schuts .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Schuts, M., Hooman, J., Vaandrager, F. (2016). Refactoring of Legacy Software Using Model Learning and Equivalence Checking: An Industrial Experience Report. In: Ábrahám, E., Huisman, M. (eds) Integrated Formal Methods. IFM 2016. Lecture Notes in Computer Science(), vol 9681. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-33692-3

  • Online ISBN: 978-3-319-33693-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics