Skip to main content

Automatic Test Data Generation from Embedded C Code

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 3219))

Abstract

A fundamental area of software engineering that remains a challenge for software developers is the delivery of software with the minimum of remaining defects. While progress is constantly being made in the provision of static analysis tools to partly address this problem, the complementary dynamic testing approach, which remains an essential technique in the software industry for the verification and validation of software, has received less attention. Within the software testing activity, the actual generation of test data for the purpose of automated software testing is still mainly a manual task. We present CSET (C Symbolic Execution Tool) which automatically generates test data from C source code to fulfil code coverage criteria. CSET implements the symbolic execution technique with an intermediate path traversal conditions checker and a test data generation facility. We examine how the traditional problems associated with the symbolic execution technique have been overcome using Logic Programming and Constraint Logic Programming (CLP). The approach used to handle pointer manipulations is detailed. Interprocedural results on previously published sample code and industrial embedded C code with pointers are presented.

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

Buying options

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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ball, T., Rajamani, S.K.: The SLAM project: debugging system software via static analysis. ACM SIGPLAN Notices 37(1), 1–3 (2002), http://research.microsoft.com/slam/

    Article  Google Scholar 

  2. Blieberger, J., Burgstaller, B., Scholz, B.: Interprocedural symbolic evaluation of ada programs with aliases. In: González Harbour, M., la de Puente, J.A. (eds.) Ada-Europe 1999. LNCS, vol. 1622, pp. 136–145. Springer, Heidelberg (1999)

    Chapter  Google Scholar 

  3. Bush, W., Pincus, J., Sielaff, D.: A static analyzer for finding dynamic programming errors. Software-Practice and Experience 30(7), 775–802 (2000)

    Article  MATH  Google Scholar 

  4. Clarke, L.A., Richardson, D.J.: Application of symbolic evaluation. Journal of Systems Software 5, 15–35 (1985)

    Article  Google Scholar 

  5. Coward, P.D.: Symbolic execution systems—a review. Software Engineering Journal 3(6), 229–239 (1988)

    Article  Google Scholar 

  6. Czerny, B.J., D’Ambrosio, J.G., Jacob, P.O., Murray, B.T.: Identifying and understanding relevant system safety standards for use in the automotive industry. In: Proceedings of the Society of Automotive Engineers World Congress, Michigan, USA (March 2003)

    Google Scholar 

  7. DeMillo, R.A., Offutt, A.J.: Constraint-based automatic test data generation. IEEE Transactions on Software Engineering 17(9), 900–910 (1991)

    Article  Google Scholar 

  8. Dillon, E., Meudec, C.: CSET: Symbolic execution and automatic test data generation of embedded C code. In: Proceedings 16th IFIP International Conference on Testing of Communicating Systems, Oxford, UK, March 2004, Oxford, Position Paper (2004)

    Google Scholar 

  9. Doyle, J., Meudec, C.: Automatic structural coverage testing of Java bytecode. In: Proceedings of the Third Workshop on Automated Verification of Critical Systems (April 2003)

    Google Scholar 

  10. Evans, D.: Static detection of dynamic memory errors. In: Proceedings of the ACM SIGPLAN 1996 Conference on Programming Language Design and Implementation (1996)

    Google Scholar 

  11. Gallagher, M.J., Narasimhan, V.L.: ADTEST: A test data generation suite for Ada software systems. IEEE Transactions on Software Engineering 23(8), 473–484 (1997)

    Article  Google Scholar 

  12. Gotlieb, B.: Botella, and M. Rueher. Automatic test data generation using constraint solving techniques. In: Proceedings ISSTA 1998, pp. 53–62 (1998)

    Google Scholar 

  13. Grogan, M.: Visual symbolic execution. Master’s thesis, Institute of Technology, Carlow, Ireland (2002)

    Google Scholar 

  14. Hamlet, D.: Implementing prototype testing tools. Software-Practice and Experience 25(4), 347–371 (1995)

    Article  Google Scholar 

  15. Parasoft Inc. C++Test – version 2.2 (2004), http://www.parasoft.com/

  16. Jaffar, J., Lassez, J.-L.: Constraint Logic Programming. In: Proceedings 14th ACM Symposium on Principles of Programming Languages, Munich, January 1987, pp. 111–119 (1987)

    Google Scholar 

  17. King, J.C.: A new approach to program testing. In: Proceedings International Conference on reliable software, April 1975, pp. 228–233 (1975)

    Google Scholar 

  18. Korel, B.: Automated test data generation for programs with procedures. In: Proceedings ISSTA 1996, pp. 209–215 (1996)

    Google Scholar 

  19. Parc Technologies Ltd. ECLiPSe Release 5.6 (2003), http://www.icparc.ic.ac.uk/eclipse/

  20. Lyle, J.R., Binkley, D.W.: Program slicing in the presence of pointers. In: Proceedings of the Foundations of Software Engineering, Orlando, FL, USA, November 1993, pp. 255–260 (1993)

    Google Scholar 

  21. Meudec, C.: ATGen: automatic test data generation using constraint logic programming and symbolic execution. Journal of Software Testing, Verification and Reliability 11(2), 81–96 (2001)

    Article  Google Scholar 

  22. Meudec, C.: The PTC solver user manual – version 1.5.1. Technical report, Institute of Technology, Carlow, Ireland (May 2004)

    Google Scholar 

  23. Michel, C., Rueher, R., Lebbah, Y.: Constraints solving over floating-point numbers. In: Walsh, T. (ed.) CP 2001. LNCS, vol. 2239, pp. 524–538. Springer, Heidelberg (2001)

    Google Scholar 

  24. MISRA. Guidelines for the use of the C language in vehicle based software. Technical report, Motor Industry Software Reliability Association (1998)

    Google Scholar 

  25. Praxis Critical Systems Ltd., UK. The Spark Examiner (2004), http://www.sparkada.com/

  26. Seppanen, V., Kahkonen, A.-M., Oivo, M., Perunka, H., Isomursu, P., Pulli, P.: Strategic needs and future trends of embedded software. Technical Report 48/96, TEKES Development Center, Finland (October 1996)

    Google Scholar 

  27. Tracey, N., Clark, J., Mander, K.: Automated program flaw finding using simulated annealing. In: Proceedings ISSTA 1998, pp. 73–81 (1998)

    Google Scholar 

  28. Wegener, J., Baresel, A., Sthamer, H.: Evolutionary test environment for automatic structural testing. Information and Software Technology 43, 841–854 (2001)

    Article  Google Scholar 

  29. Weyuker, E.J.: Translatability and decidability questions for restricted classes of program schemas. SIAM Journal of Computers 8(4), 587–589 (1979)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2004 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Dillon, E., Meudec, C. (2004). Automatic Test Data Generation from Embedded C Code. In: Heisel, M., Liggesmeyer, P., Wittmann, S. (eds) Computer Safety, Reliability, and Security. SAFECOMP 2004. Lecture Notes in Computer Science, vol 3219. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30138-7_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-30138-7_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-23176-9

  • Online ISBN: 978-3-540-30138-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics