Abstract
Glass-box test data generation (TDG) is the process of automatically generating test input data for a program by considering its internal structure. This is generally accomplished by performing symbolic execution of the program where the contents of variables are expressions rather than concrete values. The main idea in CLP-based TDG is to translate imperative programs into equivalent CLP ones and then rely on the standard evaluation mechanism of CLP to symbolically execute the imperative program. Performing symbolic execution on large programs becomes quickly expensive due to the large number and the size of paths that need to be explored. In this paper, we propose compositional reasoning in CLP-based TDG where large programs can be handled by testing parts (such as components, modules, libraries, methods, etc.) separately and then by composing the test cases obtained for these parts to get the required information on the whole program. Importantly, compositional reasoning also gives us a practical solution to handle native code, which may be unavailable or written in a different programming language. Namely, we can model the behavior of a native method by means of test cases and compositional reasoning is able to use them.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Albert, E., Gómez-Zamalloa, M., Puebla, G.: Test Data Generation of Bytecode by CLP Partial Evaluation. In: Hanus, M. (ed.) LOPSTR 2008. LNCS, vol. 5438, pp. 4–23. Springer, Heidelberg (2009)
Albert, E., Gómez-Zamalloa, M., Puebla, G.: 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), Madrid, Spain, January 2010, pp. 25–28. ACM Press, New York (2010)
Anand, S., Godefroid, P., Tillmann, N.: Demand-driven compositional symbolic execution. In: Ramakrishnan, C.R., Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 367–381. Springer, Heidelberg (2008)
Arons, T., Elster, E., Ozer, S., Shalev, J., Singerman, E.: Efficient symbolic simulation of low level software. In: DATE, pp. 825–830. IEEE, Los Alamitos (2008)
Clarke, L.A.: A system to generate test data and symbolically execute programs. IEEE Trans. Software Eng. 2(3), 215–222 (1976)
Engel, C., Hähnle, R.: Generating unit tests from formal proofs. In: Gurevich, Y., Meyer, B. (eds.) TAP 2007. LNCS, vol. 4454, pp. 169–188. Springer, Heidelberg (2007)
Ferguson, R., Korel, B.: The chaining approach for software test data generation. ACM Trans. Softw. Eng. Methodol. 5(1), 63–86 (1996)
Godefroid, P.: Compositional dynamic test generation. In: Hofmann, M., Felleisen, M. (eds.) POPL, pp. 47–54. ACM, New York (2007)
Godefroid, P., Klarlund, N., Sen, K.: Dart: directed automated random testing. In: Sarkar, V., Hall, M.W. (eds.) PLDI, pp. 213–223. ACM, New York (2005)
Gómez-Zamalloa, M., Albert, E., Puebla, G.: Decompilation of Java Bytecode to Prolog by Partial Evaluation. Information and Software Technology 51, 1409–1427 (2009)
Gómez-Zamalloa, M., Albert, E., Puebla, G.: Test Case Generation for Object-Oriented Imperative Languages in CLP. In: Theory and Practice of Logic Programming, 26th Int’l. Conference on Logic Programming (ICLP 2010) Special Issue, vol. 10(4-6), pp. 659–674 (July 2010)
Goodrich, M.T., Tamassia, R., Zamore, R.: The net.datastructures package, version 3 (2003), http://net3.datastructures.net
Gotlieb, A., Botella, B., Rueher, M.: A CLP framework for computing structural test data. In: Palamidessi, C., Moniz Pereira, L., Lloyd, J.W., Dahl, V., Furbach, U., Kerber, M., Lau, K.-K., Sagiv, Y., Stuckey, P.J. (eds.) CL 2000. LNCS (LNAI), vol. 1861, pp. 399–413. Springer, Heidelberg (2000)
Gupta, N., Mathur, A.P., Soffa, M.L.: Generating test data for branch coverage. In: Automated Software Engineering, pp. 219–228 (2000)
King, J.C.: Symbolic execution and program testing. Commun. ACM 19(7), 385–394 (1976)
Kölbl, A., Pixley, C.: Constructing efficient formal models from high-level descriptions using symbolic simulation. International Journal of Parallel Programming 33(6), 645–666 (2005)
Lakhnech, Y., Bensalem, S., Berezin, S., Owre, S.: Incremental verification by abstraction. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, pp. 98–112. Springer, Heidelberg (2001)
Meudec, C.: Atgen: Automatic test data generation using constraint logic programming and symbolic execution. Softw. Test., Verif. Reliab. 11(2), 81–96 (2001)
Müller, R.A., Lembeck, C., Kuchen, H.: A symbolic java virtual machine for test case generation. In: IASTED Conf. on Software Engineering, pp. 365–371 (2004)
Pǎsǎreanu, C.S., Visser, W.: A survey of new trends in symbolic execution for software testing and analysis. Int. J. Softw. Tools Technol. Transf. 11(4), 339–353 (2009)
Schrijvers, T., Degrave, F., Vanhoof, W.: Towards a framework for constraint-based test case generation. In: De Schreye, D. (ed.) LOPSTR 2009. LNCS, vol. 6037, pp. 128–142. Springer, Heidelberg (2010)
Zhu, H., Hall, P.A.V., May, J.H.R.: Software unit test coverage and adequacy. ACM Comput. Surv. 29(4), 366–427 (1997)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2011 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Albert, E., Gómez-Zamalloa, M., Rojas, J.M., Puebla, G. (2011). Compositional CLP-Based Test Data Generation for Imperative Languages. In: Alpuente, M. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2010. Lecture Notes in Computer Science, vol 6564. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-20551-4_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-20551-4_7
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-20550-7
Online ISBN: 978-3-642-20551-4
eBook Packages: Computer ScienceComputer Science (R0)