Hostname: page-component-586b7cd67f-rdxmf Total loading time: 0 Render date: 2024-11-25T06:01:07.396Z Has data issue: false hasContentIssue false

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

Published online by Cambridge University Press:  09 July 2010

MIGUEL GÓMEZ-ZAMALLOA
Affiliation:
DSIC, Complutense University of Madrid (UCM), E-28040 Madrid, Spain
ELVIRA ALBERT
Affiliation:
DSIC, Complutense University of Madrid (UCM), E-28040 Madrid, Spain
GERMÁN PUEBLA
Affiliation:
DLSIIS, Technical University of Madrid (UPM), E-28660 Boadilla del Monte, Madrid, Spain

Abstract

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.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2010

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

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.Google Scholar
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.Google Scholar
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.CrossRefGoogle Scholar
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.CrossRefGoogle Scholar
Charreteur, F. and Gotlieb, A. JAUT: A tool for automatic test case generation. url: http://www.irisa.fr/lande/gotlieb/resources/jaut.html.Google Scholar
DeMillo, R. A. and Offutt, A. J. 1991. Constraint-based automatic test data generation. IEEE Transactions on Software Engineering 17, 9, 900910.CrossRefGoogle Scholar
Flanagan, C. 2004. Automatic software model checking via constraint logic. Science of Computer Programming 50, 1–3, 253270.Google Scholar
Futamura, Y. 1971. Partial evaluation of computation process—An approach to a compiler-compiler. Systems, Computers, Controls 2, 5, 4550.Google Scholar
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.CrossRefGoogle Scholar
Goodrich, M., Tamassia, R. and Zamore, R. 2003. The net.datastructures package, version 3. Available at http://net3.datastructures.netGoogle Scholar
Gotlieb, A., Botella, B. and Rueher, M. 1998. Automatic test data generation using constraint solving techniques. SIGSOFT Software Engineering Notes 23, 2, 5362.Google Scholar
Gotlieb, A., Botella, B. and Rueher, M. 2000. A clp framework for computing structural test data. In Computational Logic, 399–413.Google Scholar
King, J. C. 1976. Symbolic execution and program testing. Communications of the ACM 19, 7, 385394.CrossRefGoogle Scholar
Meudec, C. 2001. Atgen: Automatic test data generation using constraint logic programming and symbolic execution. Software Testing, Verification and Reliability 11, 2, 8196.CrossRefGoogle Scholar
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.Google Scholar
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.Google Scholar
Tillmann, N. and de Halleux, J. 2008. Pex-white box test generation for .NET. In Tests and Proofs. Springer, 134153.CrossRefGoogle Scholar
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.Google Scholar
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.Google Scholar
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.Google Scholar
Zhu, H., Hall, P. A. V. and May, J. H. R. 1997. Software unit test coverage and adequacy. ACM Computing Surveys 29, 4, 366427.Google Scholar