Skip to main content Accesibility Help

Test case generation for object-oriented imperative languages in CLP*


Testing is a vital part of the software development process. Test Case Generation (TCG) is the process of automatically generating a collection of test-cases which are applied to a system under test. White-box TCG is usually performed by means of symbolic execution, i.e., instead of executing the program on normal values (e.g., numbers), the program is executed on symbolic values representing arbitrary values. When dealing with an object-oriented (OO) imperative language, symbolic execution becomes challenging as, among other things, it must be able to backtrack, complex heap-allocated data structures should be created during the TCG process and features like inheritance, virtual invocations and exceptions have to be taken into account. Due to its inherent symbolic execution mechanism, we pursue in this paper that Constraint Logic Programming (CLP) has a promising application field in tcg. We will support our claim by developing a fully CLP-based framework to TCG of an OO imperative language, and by assessing it on a corresponding implementation on a set of challenging Java programs.

Hide All
Albert, E., Gómez-Zamalloa, M. and Puebla, G. 2009. Test data generation of bytecode by CLP partial evaluation. In 18th International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR'08). Lecture Notes in Computer Science, vol. 5438. Springer, 423.
Albert, E., Gómez-Zamalloa, M. and Puebla, G. 2010. PET: A partial evaluation-based test case generation tool for java bytecode. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics-based Program Manipulation (PEPM). ACM Press, Madrid, 2528.
Albert, E., Puebla, G. and Gallagher, J. 2006. Non-leftmost unfolding in partial evaluation of logic programs with impure predicates. In 15th International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR'05). Lecture Notes in Computer Science, vol. 3901. Springer, 115132.
Charreteur, F., Botella, B., and Gotlieb, A. 2009. Modelling dynamic memory management in constraint-based testing. The Journal of Systems and Software 82, 11, 17551766.
Charreteur, F. and Gotlieb, A. JAUT: A tool for automatic test case generation. url:
DeMillo, R. A. and Offutt, A. J. 1991. Constraint-based automatic test data generation. IEEE Transactions on Software Engineering 17, 9, 900910.
Flanagan, C. 2004. Automatic software model checking via constraint logic. Science of Computer Programming 50, 1–3, 253270.
Futamura, Y. 1971. Partial evaluation of computation process—An approach to a compiler-compiler. Systems, Computers, Controls 2, 5, 4550.
Gómez-Zamalloa, M., Albert, E. and Puebla, G. 2009. Decompilation of java bytecode to prolog by partial evaluation. Information and Software Technology 51, 14091427.
Goodrich, M., Tamassia, R. and Zamore, R. 2003. The net.datastructures package, version 3. Available at
Gotlieb, A., Botella, B. and Rueher, M. 1998. Automatic test data generation using constraint solving techniques. SIGSOFT Software Engineering Notes 23, 2, 5362.
Gotlieb, A., Botella, B. and Rueher, M. 2000. A clp framework for computing structural test data. In Computational Logic, 399–413.
King, J. C. 1976. Symbolic execution and program testing. Communications of the ACM 19, 7, 385394.
Meudec, C. 2001. Atgen: Automatic test data generation using constraint logic programming and symbolic execution. Software Testing, Verification and Reliability 11, 2, 8196.
Müller, R. A., Lembeck, C. and Kuchen, H. 2004. A symbolic java virtual machine for test case generation. In IASTED Conference on Software Engineering. IASTED, 365371.
Schrijvers, T., Degrave, F. and Vanhoof, W. 2009. Towards a framework for constraint-based test case generation. In 19th International Symposium on Logic-based Program Synthesis and Transformation (LOPSTR'09), 128–142.
Tillmann, N. and de Halleux, J. 2008. Pex-white box test generation for .NET. In Tests and Proofs. Springer, 134153.
Vaziri, M. and Jackson, D. 2003. Checking properties of heap-manipulating procedures with a constraint solver. In TACAS, Garavel, H. and Hatcliff, J., Eds. Lecture Notes in Computer Science, vol. 2619. Springer, 505520.
Visvanathan, S. and Gupta, N. 2002. Generating test data for functions with pointer inputs. In ASE '02: Proceedings of the 17th IEEE international conference on Automated software engineering. IEEE Computer Society, Washington, DC, 149.
Zhao, R. and Li, Q. 2007. Automatic test generation for dynamic data structures. In SERA '07: Proceedings of the 5th ACIS International Conference on Software Engineering Research, Management & Applications. IEEE Computer Society, Washington, DC, 545549.
Zhu, H., Hall, P. A. V. and May, J. H. R. 1997. Software unit test coverage and adequacy. ACM Computing Surveys 29, 4, 366427.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Theory and Practice of Logic Programming
  • ISSN: 1471-0684
  • EISSN: 1475-3081
  • URL: /core/journals/theory-and-practice-of-logic-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *



Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed