Test Data Generation for Event-B Models Using Genetic Algorithms

  • Ionut Dinca
  • Alin Stefanescu
  • Florentin Ipate
  • Raluca Lefticaru
  • Cristina Tudose
Part of the Communications in Computer and Information Science book series (CCIS, volume 181)


Event-B is a formal modeling language having set theory as its mathematical foundation and abstract state machines as its behavioral specifications. The language has very good tool support based on theorem proving and model checking technologies, but very little support for test generation. Motivated by industrial interest in the latter domain, this paper presents an approach based on genetic algorithms that generates test data for Event-B test paths. For that, new fitness functions adapted to the set-theoretic nature of Event-B are devised. The approach was implemented and its efficiency was proven on a carefully designed benchmark using statistically sound evaluations.


Genetic Algorithm Test Generation Random Testing Abstract State Machine Large State Space 
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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abrial, J.-R.: Modeling in Event-B - System and Software Engineering. Cambridge University Press, Cambridge (2010)CrossRefzbMATHGoogle Scholar
  2. 2.
    Arcuri, A., Briand, L.: A practical guide for using statistical tests to assess randomized algorithms in software engineering. In: Proc. ICSE (to appear, 2011)Google Scholar
  3. 3.
    Binder, R.V.: Testing Object-Oriented Systems: Models, Patterns, and Tools, Object Technology. Addison-Wesley, London (1999)Google Scholar
  4. 4.
    Börger, E., Stärk, R.: Abstract State Machines: A Method for High-Level System Design and Analysis. Springer, Heidelberg (2003)CrossRefzbMATHGoogle Scholar
  5. 5.
    Derderian, K., Hierons, R.M., Harman, M., Guo, Q.: Estimating the feasibility of transition paths in extended finite state machines. Autom. Softw. Eng. 17(1), 33–56 (2010)CrossRefGoogle Scholar
  6. 6.
    Goldberg, D.E., Deb, K.: A comparative analysis of selection schemes used in genetic algorithms. In: FOGA, pp. 69–93 (1990)Google Scholar
  7. 7.
    Meffert, K., et al:. JGAP - Java Genetic Algorithms and Genetic Programming Package, (last visited March 2011)
  8. 8.
    Lefticaru, R., Ipate, F.: Functional search-based testing from state machines. In: Proc. ICST 2008, pp. 525–528. IEEE Computer Society Press, Los Alamitos (2008)Google Scholar
  9. 9.
    Leuschel, M., Butler, M.J.: ProB: an automated analysis toolset for the B method. Int. J. Softw. Tools Technol. Transf. 10(2), 185–203 (2008)CrossRefGoogle Scholar
  10. 10.
    McMinn, P.: Search-based software test data generation: A survey. Softw. Test. Verif. Reliab. 14(2), 105–156 (2004)CrossRefGoogle Scholar
  11. 11.
    McMinn, P., Holcombe, M.: Evolutionary testing of state-based programs. In: GECCO 2005: Proceedings of the 2005 conference on Genetic and evolutionary computation, pp. 1013–1020. ACM, New York (2005)Google Scholar
  12. 12.
    Michalewicz, Z.: Genetic algorithms + data structures = evolution programs (3rd ed.). Springer, London (1996)Google Scholar
  13. 13.
    Mitchell, M.: An Introduction to Genetic Algorithms. MIT Press, Cambridge (1998)zbMATHGoogle Scholar
  14. 14.
    Satpathy, M., Butler, M., Leuschel, M., Ramesh, S.: Automatic Testing from Formal Specifications. In: Gurevich, Y., Meyer, B. (eds.) TAP 2007. LNCS, vol. 4454, pp. 95–113. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  15. 15.
    Sheskin, D.J.: Handbook of Parametric and Nonparametric Statistical Procedures, 4th edn. Chapman & Hall/CRC (2007)Google Scholar
  16. 16.
    Stefanescu, A., Ipate, F., Lefticaru, R., Tudose, C.: Towards search-based testing for Event-B models. In: Proc. of 4th Workshop on Search-Based Software Testing (SBST 2011). IEEE, Los Alamitos (to appear, 2011)Google Scholar
  17. 17.
    Tracey, N.J.: A Search-based Automated Test-Data Generation Framework for Safety-Critical Software. PhD thesis, University of York (2000)Google Scholar
  18. 18.
    Utting, M., Legeard, B.: Practical Model-Based Testing: A Tools Approach. Morgan Kaufmann Publishers Inc, San Francisco (2006)Google Scholar
  19. 19.
    Wieczorek, S., Kozyura, V., Roth, A., Leuschel, M., Bendisposto, J., Plagge, D., Schieferdecker, I.: Applying Model Checking to Generate Model-Based Integration Tests from Choreography Models. In: Núñez, M., Baker, P., Merayo, M.G. (eds.) TESTCOM 2009. LNCS, vol. 5826, pp. 179–194. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  20. 20.
    Yano, T., Martins, E., de Sousa, F.L.: Generating feasible test paths from an executable model using a multi-objective approach. In: Proc. ICSTW 2010, pp. 236–239. IEEE Computer Society, Los Alamitos (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Ionut Dinca
    • 1
  • Alin Stefanescu
    • 1
  • Florentin Ipate
    • 1
  • Raluca Lefticaru
    • 1
  • Cristina Tudose
    • 1
  1. 1.Department of Computer ScienceUniversity of PitestiPitestiRomania

Personalised recommendations