Hostname: page-component-586b7cd67f-2plfb Total loading time: 0 Render date: 2024-11-25T14:03:38.976Z Has data issue: false hasContentIssue false

Concolic testing in logic programming*

Published online by Cambridge University Press:  03 September 2015

FRED MESNARD
Affiliation:
LIM - Université de la Réunion, France (e-mail: [email protected], [email protected])
ÉTIENNE PAYET
Affiliation:
LIM - Université de la Réunion, France (e-mail: [email protected], [email protected])
GERMÁN VIDAL
Affiliation:
MiST, DSIC, Universitat Politècnica de València (e-mail: [email protected])

Abstract

Software testing is one of the most popular validation techniques in the software industry. Surprisingly, we can only find a few approaches to testing in the context of logic programming. In this paper, we introduce a systematic approach for dynamic testing that combines both concrete and symbolic execution. Our approach is fully automatic and guarantees full path coverage when it terminates. We prove some basic properties of our technique and illustrate its practical usefulness through a prototype implementation.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2015 

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.)

Footnotes

*

This work has been partially supported by the EU (FEDER) and the Spanish Ministerio de Economía y Competitividad under grant TIN2013-44742-C4-1-R and by the Generalitat Valenciana under grant PROMETEOII/2015/013. Part of this research was done while the third author was visiting the University of Reunion; G. Vidal gratefully acknowledges their hospitality.

References

Albert, E., Arenas, P., Gómez-Zamalloa, M., and Rojas, J. 2014. Test Case Generation by Symbolic Execution: Basic Concepts, a CLP-Based Instance, and Actor-Based Concurrency. In SFM 2014. Springer LNCS 8483, 263309.Google Scholar
Apt, K. 1997. From Logic Programming to Prolog. Prentice Hall.Google Scholar
Belli, F. and Jack, O. 1993. Implementation-based analysis and testing of Prolog programs. In ISSTA. 7080.Google Scholar
Carlsson, M. and Mildner, P. 2012. SICStus Prolog - the first 25 years. Theory and Practice of Logic Programming 12, 1–2, 3566.Google Scholar
Claessen, K. and Hughes, J. 2000. QuickCheck: a lightweight tool for random testing of Haskell programs. In Proc. of (ICFP 2000). ACM, 268279.Google Scholar
Clarke, L. 1976. A program testing system. In Proceedings of the 1976 Annual Conference (ACM'76). 488491.Google Scholar
Degrave, F., Schrijvers, T., and Vanhoof, W. 2008. Automatic generation of test inputs for Mercury. In Logic-Based Program Synthesis and Transformation, 18th International Symposium, LOPSTR 2008. 7186.Google Scholar
Godefroid, P., Klarlund, N., and Sen, K. 2005. DART: directed automated random testing. In Proc. of PLDI'05. ACM, 213223.Google Scholar
Godefroid, P., Levin, M., and Molnar, D. 2012. Sage: whitebox fuzzing for security testing. CACM 55, 3, 4044.Google Scholar
Gómez-Zamalloa, M., Albert, E., and Puebla, G. 2010. Test case generation for object-oriented imperative languages in CLP. TPLP 10, 4–6, 659674.Google Scholar
Hermenegildo, M. V., Bueno, F., Carro, M., López-García, P., Mera, E., Morales, J. F., and Puebla, G. 2012. An overview of Ciao and its design philosophy. TPLP 12, 1–2, 219252.Google Scholar
King, J. C. 1976. Symbolic execution and program testing. CACM 19, 7, 385394.Google Scholar
Lloyd, J. 1987. Foundations of Logic Programming. Springer-Verlag, Berlin. 2nd Ed.Google Scholar
Martelli, A. and Montanari, U. 1982. An Efficient Unification Algorithm. ACM Transactions on Programming Languages and Systems 4, 258282.Google Scholar
Mera, E., López-García, P., and Hermenegildo, M. V. 2009. Integrating software testing and run-time checking in an assertion verification framework. In 25th International Conference on Logic Programming, ICLP 2009, Pasadena. 281295.Google Scholar
Pasareanu, C. and Rungta, N. 2010. Symbolic PathFinder: symbolic execution of Java bytecode. In ASE, Pecheur, C., Andrews, J., and Nitto, E. D., Eds. ACM, 179180.Google Scholar
Plotkin, G. 1970. A note on inductive generalization. Machine intelligence 5, 153163.Google Scholar
Schimpf, J. and Shen, K. 2012. ECL i PS e - from LP to CLP. Theory and Practice of Logic Programming 12, 1–2, 127156.Google Scholar
Sen, K., Marinov, D., and Agha, G. 2005. CUTE: a concolic unit testing engine for C. In Proc. of ESEC/SIGSOFT FSE 2005. ACM, 263272.Google Scholar
Somogyi, Z., Henderson, F., and Conway, T. 1996. The execution algorithm of Mercury, an efficient purely declarative Logic Programming language. The Journal of Logic Programming 29, 1–3, 1764.Google Scholar
Ströder, T., Emmes, F., Schneider-Kamp, P., Giesl, J., and Fuhs, C. 2011. A Linear Operational Semantics for Termination and Complexity Analysis of ISO Prolog. In LOPSTR'11. Springer LNCS 7225, 237252.Google Scholar
Vasak, T. and Potter, J. 1986. Characterization of terminating logic programs. In Proc. of the 1986 Intl. Symp. on Logic Programming. IEEE, 140147.Google Scholar
Vidal, G. 2015. Concolic Execution and Test Case Generation in Prolog. In Proc. of the 24th International Symposium on Logic-Based Program Synthesis and Transformation (LOPSTR'14), Proietti, M. and Seki, H., Eds. Springer LNCS 8981, 167181.Google Scholar
Wielemaker, J., Schrijvers, T., Triska, M., and Lager, T. 2012. SWI-Prolog. Theory and Practice of Logic Programming 12, 1–2, 6796.Google Scholar
Supplementary material: PDF

Mesnard supplementary material

Online Appendix

Download Mesnard supplementary material(PDF)
PDF 227.8 KB