Learning-Based Testing for Reactive Systems Using Term Rewriting Technology

  • Karl Meinke
  • Fei Niu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7019)


We show how the paradigm of learning-based testing (LBT) can be applied to automate specification-based black-box testing of reactive systems using term rewriting technology. A general model for a reactive system can be given by an extended Mealy automata (EMA) over an abstract data type (ADT). A finite state EMA over an ADT can be efficiently learned in polynomial time using the CGE regular inference algorithm, which builds a compact representation as a complete term rewriting system. We show how this rewriting system can be used to model check the learned automaton against a temporal logic specification by means of narrowing. Combining CGE learning with a narrowing model checker we obtain a new and general architecture for learning-based testing of reactive systems. We compare the performance of this LBT architecture against random testing using a case study.


Model Check Transmission Control Protocol Random Testing System Under Test Test Case Generation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Baader, F., Snyder, W.: Unification theory. In: Handbook of Automated Reasoning, pp. 447–531. Elsevier, Amsterdam (2001)Google Scholar
  2. 2.
    Chauhan, P., Clarke, E.M., Kukula, J.H., Sapra, S., Veith, H., Wang, D.: Automated abstraction refinement for model checking large state spaces using sat based conflict analysis. In: Aagaard, M.D., O’Leary, J.W. (eds.) FMCAD 2002. LNCS, vol. 2517. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  3. 3.
    Clarke, E., Gupta, A., Kukula, J., Strichman, O.: Sat-based abstraction refinement using ilp and machine learning. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, p. 265. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  4. 4.
    Comon, H.: Disunification: a survey. In: Computational Logic: Essays in Honor of Alan Robinson, pp. 322–359. MIT Press, Cambridge (1991)Google Scholar
  5. 5.
    de Moura, L., Bjorner, N.: An efficient smt solver. In: Tools and Algorithms for the Construction and Analysis of Systems, TACAS (2008)Google Scholar
  6. 6.
    Escobar, S., Bevilacqua, V.: Symbolic model checking of infinite-state systems using narrowing. In: Baader, F. (ed.) RTA 2007. LNCS, vol. 4533, pp. 153–168. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  7. 7.
    Escobar, S., Meseguer, J., Sasse, R.: Variant narrowing and equational unification. In: Proc. WRLA 2008. ENTCS, vol. 238(3), Springer, Heidelberg (2009)Google Scholar
  8. 8.
    Fraser, G., Wotawa, F., Ammann, P.E.: Testing with model checkers: A survey. Tech. rep. 2007-p2-04, TU Graz (2007)Google Scholar
  9. 9.
    Groce, A., Peled, D., Yannakakis, M.: Adaptive model checking. Logic Journal of the IGPL 14(5), 729–744 (2006)MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    Guha, B., Mukherjee, B.: Network security via reverse engineering of tcp code: vulnerability analysis and proposed solutions. IEEE Network 11(4), 40–49 (2007)CrossRefGoogle Scholar
  11. 11.
    Hullot, J.M.: Canonical forms and unification. In: Bibel, W. (ed.) CADE 1980. LNCS, vol. 87, pp. 122–128. Springer, Heidelberg (1980)Google Scholar
  12. 12.
    Markey, N.: Temporal logic with past is exponentially more succinct. EATCS Bulletin 79, 122–128 (2003)MathSciNetzbMATHGoogle Scholar
  13. 13.
    Meinke, K.: Automated black-box testing of functional correctness using function approximation. In: ISSTA 2004: Proceedings of the 2004 ACM SIGSOFT International Symposium on Software Testing and Analysis, pp. 143–153. ACM, New York (2004)CrossRefGoogle Scholar
  14. 14.
    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)CrossRefGoogle Scholar
  15. 15.
    Meinke, K., Niu, F.: A learning-based approach to unit testing of numerical software. In: Petrenko, A., Simão, A., Maldonado, J.C. (eds.) ICTSS 2010. LNCS, vol. 6435, pp. 221–235. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  16. 16.
    Meinke, K., Sindhu, M.: Incremental learning-based testing for reactive systems. In: Gogolla, M., Wolff, B. (eds.) TAP 2011. LNCS, vol. 6706, pp. 134–151. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  17. 17.
    Meinke, K., Tucker, J.V.: Universal algebra. In: Handbook of Logic in Computer Science, vol. 1, pp. 189–411. Oxford University Press, Oxford (1993)Google Scholar
  18. 18.
    Middeldorp, A., Hamoen, E.: Completeness results for basic narrowing. Applicable Algebra in Engineering, Communication and Computing 5(3-4), 213–253 (1994)MathSciNetzbMATHCrossRefGoogle Scholar
  19. 19.
    Peled, D., Vardi, M.Y., Yannakakis, M.: Black-box checking. In: Formal Methods for Protocol Engineering and Distributed Systems FORTE/PSTV, pp. 225–240. Kluwer, Dordrecht (1999)Google Scholar
  20. 20.
    Raffelt, H., Steffen, B., Margaria, T.: Dynamic testing via automata learning. In: Yorav, K. (ed.) HVC 2007. LNCS, vol. 4899, pp. 136–152. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  21. 21.
    Walkinshaw, N., Bogdanov, K., Derrick, J., Paris, J.: Increasing functional coverage by inductive testing: a case study. In: Petrenko, A., Simão, A., Maldonado, J.C. (eds.) ICTSS 2010. LNCS, vol. 6435, pp. 126–141. Springer, Heidelberg (2010)CrossRefGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2011

Authors and Affiliations

  • Karl Meinke
    • 1
  • Fei Niu
    • 1
  1. 1.School of Computer Science and CommunicationRoyal Institute of TechnologyStockholmSweden

Personalised recommendations