Learning Communicating State Machines

  • Alexandre PetrenkoEmail author
  • Florent Avellaneda
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11823)


We consider the problems of learning and conformance testing of components in a modular system. We assume that each component can be modelled as a Finite State Machine (FSM), the topology of the system is known, but some (or all) component FSMs are unknown and have to be learned by testing the whole system, as it cannot be disassembled. Thus the classical problem of active inference of an automaton in isolation is now further lifted to a system of communicating FSMs of an arbitrary topology. As opposed to the existing work on automata learning, the proposed approach neither needs a Minimally Adequate Teacher, also called the Oracle, nor uses it a conformance tester to approximate equivalence queries. The approach further enhances a SAT solving method suggested by the authors and allows to adaptively test conformance of a system with unknown components assuming that internal communications are observable. The resulting tests are much smaller than the classical universal conformance tests derived from the composite machine of the system.


Component-based systems Communicating FSMs Active inference FSM learning Conformance testing Adaptive testing Testing in context SAT solving 



This work was partially supported by MEI (Ministère de l’Économie et Innovation) of Gouvernement du Québec and NSERC of Canada.


  1. 1.
    Abel, A., Reineke, J.: Gray-box learning of serial compositions of mealy machines. In: Rayadurgam, S., Tkachuk, O. (eds.) NFM 2016. LNCS, vol. 9690, pp. 272–287. Springer, Cham (2016). Scholar
  2. 2.
    Angluin, D.: Learning regular sets from queries and counterexamples. Inf. Comput. 75(2), 87–106 (1987)MathSciNetCrossRefGoogle Scholar
  3. 3.
    Bennaceur, A., Giannakopoulou, D., Hähnle, R., Meinke, K.: Machine Learning for Dynamic Software Analysis: Potentials and Limits. LNCS, vol. 11026. Springer, Cham (2018). Scholar
  4. 4.
    Berg, T., Grinchtein, O., Jonsson, B., Leucker, M., Raffelt, H., Steffen, B.: On the correspondence between conformance testing and regular inference. In: Cerioli, M. (ed.) FASE 2005. LNCS, vol. 3442, pp. 175–189. Springer, Heidelberg (2005). Scholar
  5. 5.
    Biermann, A.W., Feldman, J.A.: On the synthesis of finite-state machines from samples of their behavior. IEEE Trans. Comput. 100(6), 592–597 (1972)MathSciNetCrossRefGoogle Scholar
  6. 6.
    De la Higuera, C.: Grammatical Inference: Learning Automata and Grammars. Cambridge University Press, Cambridge (2010)CrossRefGoogle Scholar
  7. 7.
    Eén, N., Sörensson, N.: An extensible SAT-solver. In: Giunchiglia, E., Tacchella, A. (eds.) SAT 2003. LNCS, vol. 2919, pp. 502–518. Springer, Heidelberg (2004). Scholar
  8. 8.
    Gold, E.M.: Complexity of automaton identification from given data. Inf. Control 37(3), 302–320 (1978)MathSciNetCrossRefGoogle Scholar
  9. 9.
    Groz, R., Li, K., Petrenko, A., Shahbaz, M.: Modular system verification by inference, testing and reachability analysis. In: Suzuki, K., Higashino, T., Ulrich, A., Hasegawa, T. (eds.) FATES/TestCom -2008. LNCS, vol. 5047, pp. 216–233. Springer, Heidelberg (2008). Scholar
  10. 10.
    Groz, R., Li, K., Petrenko, A.: Integration testing of communicating systems with unknown components. Ann. Telecommun. 70(3–4), 107–125 (2015)CrossRefGoogle Scholar
  11. 11.
    Groz, R., Simao, A., Petrenko, A., Oriat, C.: Inferring FSM models of systems without reset. In: Bennaceur, A., Hähnle, R., Meinke, K. (eds.) Machine Learning for Dynamic Software Analysis: Potentials and Limits. LNCS, vol. 11026, pp. 178–201. Springer, Cham (2018). Scholar
  12. 12.
    Heule, M.J.H., Verwer, S.: Exact DFA identification using SAT solvers. In: Sempere, J.M., García, P. (eds.) ICGI 2010. LNCS (LNAI), vol. 6339, pp. 66–79. Springer, Heidelberg (2010). Scholar
  13. 13.
    Jaffar-ur Rehman, M., Jabeen, F., Bertolino, A., Polini, A.: Testing software components for integration: a survey of issues and techniques. Softw. Test. Verif. Reliab. 17, 95–133 (2007)CrossRefGoogle Scholar
  14. 14.
    Kella, J.: Sequential machine identification. IEEE Trans. Comput. 100(3), 332–338 (1971)CrossRefGoogle Scholar
  15. 15.
    Luo, G., von Bochmann, G., Petrenko, A.: Test selection based on communicating nondeterministic finite-state machines using a generalized Wp-method. IEEE Trans. Softw. Eng. 20(2), 149–162 (1994)CrossRefGoogle Scholar
  16. 16.
    Meinke, K.: CGE: a sequential learning algorithm for mealy automata. In: Sempere, J.M., García, P. (eds.) ICGI 2010. LNCS (LNAI), vol. 6339, pp. 148–162. Springer, Heidelberg (2010). Scholar
  17. 17.
    Peled, D., Vardi, M.Y., Yannakakis, M.: Black box checking. J. Automat. Lang. Comb. 7(2), 225–246 (2001)MathSciNetzbMATHGoogle Scholar
  18. 18.
    Petrenko, A., Avellaneda, F., Groz, R., Oriat, C.: From passive to active FSM inference via checking sequence construction. In: Yevtushenko, N., Cavalli, A.R., Yenigün, H. (eds.) ICTSS 2017. LNCS, vol. 10533, pp. 126–141. Springer, Cham (2017). Scholar
  19. 19.
    Petrenko, A., Avellaneda, F., Groz, R., Oriat, C.: FSM inference and checking sequence construction are two sides of the same coin. Softw. Qual. J. (2018). Scholar
  20. 20.
    Petrenko, A., Avellaneda, F.: Conformance testing and inference of embedded components. In: Medina-Bulo, I., Merayo, M.G., Hierons, R. (eds.) ICTSS 2018. LNCS, vol. 11146, pp. 119–134. Springer, Cham (2018). Scholar
  21. 21.
    Shahbaz, M., Shashidhar, K.C., Eschbach, R.: Iterative refinement of specification for component based embedded systems. In: Proceedings of the 2011 International Symposium on Software Testing and Analysis, pp. 276–286 (2011)Google Scholar
  22. 22.
    Steffen, B., et al.: Active automata learning: from DFAs to interface programs and beyond. In: ICGI, pp. 195–209 (2012)Google Scholar
  23. 23.
    Vasilevski, M.P.: Failure diagnosis of automata. Cybernetics 9(4), 653–665 (1973)CrossRefGoogle Scholar
  24. 24.
    Villa, T., Yevtushenko, N., Brayton, R.K., Mishchenko, A., Petrenko, A., Sangiovanni-Vincentelli, A.L.: The Unknown Component Problem: Theory and Applications. Springer, Heidelberg (2012). Scholar
  25. 25.
    Villa, T., Petrenko, A., Yevtushenko, N., Mishchenko, A., Brayton, R.: Component-based design by solving language equations. Proc. IEEE 103(11), 2152–2167 (2015)CrossRefGoogle Scholar
  26. 26.
    Zafiropulo, P., West, C., Rudin, H., Cowan, D., Brand, D.: Towards analyzing and synthesizing protocols. IEEE Trans. Commun. 28(4), 651–661 (1980)CrossRefGoogle Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.CRIMMontrealCanada

Personalised recommendations