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.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.REFERENCES
Lammel, R., Grammar Testing, Proc. Fundamental Approaches to Software Engineering (FASE), Genoa, 2001, Lect. Notes Comput. Sci., 2001, vol. 2029, pp. 201–216.
Lammel, R. and Verhoef, C., Cracking the 500-Language Problem, IEEE Software, 2001, vol. 18, no.6, pp. 78–88.
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.
Petrenko, A.K., Specification-Based Testing: Towards Practice, Lect. Notes Comput. Sci., 2001, vol. 2244, pp. 287–300.
Purdom, P., A Sentence Generator for Testing Parsers, BIT, 1972, no. 2, pp. 336–375.
Guilmette, R.F., TGGS: A Flexible System for Generating Efficient Test Case Generators, 1999.
McKeeman, W., Differential Testing for Software, Digital Tech. J., 1998, vol. 10, no.1, pp. 100–107.
Maurer, P.M., Generating Test Data with Enhanced Context-Free Grammars, IEEE Software, 1990, pp. 50–55.
Maurer, P.M., The Design and Implementation of a Grammar-Based Data Generator, Software Practice Experience, 1992, vol. 22, no.3. pp. 223–244.
Harm, J. and Lammel, R., Two-Dimensional Approximation Coverage, Informatica J., 2000, vol. 24, no.3.
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.
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.
Beizer, B., Software Testing Techniques, van Nostrand Reinhold, 1990.
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.
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/.
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.
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.
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.
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.
GCC, http://gcc.gnu.org/.
The mpC Programming Language Specification, Inst. for System Programming, Russian Academy of Sciences, http://www.ispras.ru/∼mpc.
J@T. http://unitesk.com/products/jat/.
JavaCC, http://javacc.dev.java.net/.
CTesK, http://unitesk.com/products/ctesk/.
Author information
Authors and Affiliations
Additional information
__________
Translated from Programmirovanie, Vol. 31, No. 6, 2005.
Original Russian Text Copyright © 2005 by Zelenov, Zelenova.
Rights 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
Received:
Issue Date:
DOI: https://doi.org/10.1007/s11086-005-0040-6