Skip to main content
Log in

Generation of Positive and Negative Tests for Parsers

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

Abstract

A methodology for automatic positive and negative test set generation for testing parsers is described. Coverage criteria for such test sets based on the model approach to testing are proposed. Methods for the generation of test sets satisfying these criteria are discussed. Results of the application of the proposed methodology for testing parsers for various languages including C and Java are presented.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

REFERENCES

  1. Lammel, R., Grammar Testing, Proc. Fundamental Approaches to Software Engineering (FASE), Genoa, 2001, Lect. Notes Comput. Sci., 2001, vol. 2029, pp. 201–216.

    Google Scholar 

  2. Lammel, R. and Verhoef, C., Cracking the 500-Language Problem, IEEE Software, 2001, vol. 18, no.6, pp. 78–88.

    Article  Google Scholar 

  3. Mernik, M., Gerlic, G., Zumer, V., and Bryant, B.R., Can a Parser be Generated from Examples? Proc. 2003 ACM Symp. on Applied Computing, 2003, pp. 1063–1067.

  4. Petrenko, A.K., Specification-Based Testing: Towards Practice, Lect. Notes Comput. Sci., 2001, vol. 2244, pp. 287–300.

    MathSciNet  MATH  Google Scholar 

  5. Purdom, P., A Sentence Generator for Testing Parsers, BIT, 1972, no. 2, pp. 336–375.

  6. Guilmette, R.F., TGGS: A Flexible System for Generating Efficient Test Case Generators, 1999.

  7. McKeeman, W., Differential Testing for Software, Digital Tech. J., 1998, vol. 10, no.1, pp. 100–107.

    Google Scholar 

  8. Maurer, P.M., Generating Test Data with Enhanced Context-Free Grammars, IEEE Software, 1990, pp. 50–55.

  9. Maurer, P.M., The Design and Implementation of a Grammar-Based Data Generator, Software Practice Experience, 1992, vol. 22, no.3. pp. 223–244.

    Google Scholar 

  10. Harm, J. and Lammel, R., Two-Dimensional Approximation Coverage, Informatica J., 2000, vol. 24, no.3.

  11. DeMillo, R.A. and Offut, A.J., Constraint-Based Automatic Test Data Generation, IEEE Trans. Software Eng., 1991, vol. 17, no.9, pp. 900–910.

    Google Scholar 

  12. Offut, A.J. and Lee, S.D., An Empirical Evaluation of Weak Mutation, IEEE Trans. Software Eng., 1994, vol. 20, no.5, pp. 337–344.

    Google Scholar 

  13. Beizer, B., Software Testing Techniques, van Nostrand Reinhold, 1990.

  14. Zelenov, S.V., Zelenova, S.A., Kosachev, A.S., and Petrenko, A.K., Test Generation for Compilers and Other Word Processors, Programmirovanie, 2003, no. 2, pp. 59–69.

  15. Zelenov, S.V., Zelenova, S.A., Kosachev, A.S., and Petrenko, A.K., Application of the Model Approach to the Automatic Testing of Optimizing Compilers, http://www.citforum.ru/SE/testing/compilers/.

  16. Petrenko, A.K. et al., Testing Compilers on the basis on the Formal Language Model, Preprint of Keldysh Inst. of Appl. Math., Russian Acad. Sci., Moscow, 1992, no. 45.

    Google Scholar 

  17. Aho, A., Sethi, R., and Ullman, J., Compilers, Principles, Techniques, and Tools, Reading, Mass.: Addison-Wesley, 1986. Translated under the title Kompilyatory: printsipy, tekhnologii, instrumenty, Moscow: 2001.

    Google Scholar 

  18. Demakov, A.V., Zelenov, S.V., and Zelenova, S.A., Testing Parsers of Texts in Formal Languages, Programmnye sistemy i instrumenty: Tematicheskii sbornik facul'teta VMK, Moscow State Univ., 2001, issue 2, pp. 150–156.

  19. Offut, A.J. and Untch, R.H., “Mutation 2000: Uniting the Orthogonal,” in Mutation 2000: Mutation Testing in the Twentieth and the Twenty First Centuries, San Jose, Calif., 2000, pp. 45–55.

  20. GCC, http://gcc.gnu.org/.

  21. The mpC Programming Language Specification, Inst. for System Programming, Russian Academy of Sciences, http://www.ispras.ru/∼mpc.

  22. J@T. http://unitesk.com/products/jat/.

  23. JavaCC, http://javacc.dev.java.net/.

  24. CTesK, http://unitesk.com/products/ctesk/.

Download references

Author information

Authors and Affiliations

Authors

Additional information

__________

Translated from Programmirovanie, Vol. 31, No. 6, 2005.

Original Russian Text Copyright © 2005 by Zelenov, Zelenova.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Zelenov, S.V., Zelenova, S.A. Generation of Positive and Negative Tests for Parsers. Program Comput Soft 31, 310–320 (2005). https://doi.org/10.1007/s11086-005-0040-6

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11086-005-0040-6

Keywords

Navigation