Skip to main content

Concolic testing in logic programming*


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.

Hide All

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.

Hide All
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.
Apt K. 1997. From Logic Programming to Prolog. Prentice Hall.
Belli F. and Jack O. 1993. Implementation-based analysis and testing of Prolog programs. In ISSTA. 7080.
Carlsson M. and Mildner P. 2012. SICStus Prolog - the first 25 years. Theory and Practice of Logic Programming 12, 1–2, 3566.
Claessen K. and Hughes J. 2000. QuickCheck: a lightweight tool for random testing of Haskell programs. In Proc. of (ICFP 2000). ACM, 268279.
Clarke L. 1976. A program testing system. In Proceedings of the 1976 Annual Conference (ACM'76). 488491.
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.
Godefroid P., Klarlund N., and Sen K. 2005. DART: directed automated random testing. In Proc. of PLDI'05. ACM, 213223.
Godefroid P., Levin M., and Molnar D. 2012. Sage: whitebox fuzzing for security testing. CACM 55, 3, 4044.
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.
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.
King J. C. 1976. Symbolic execution and program testing. CACM 19, 7, 385394.
Lloyd J. 1987. Foundations of Logic Programming. Springer-Verlag, Berlin. 2nd Ed.
Martelli A. and Montanari U. 1982. An Efficient Unification Algorithm. ACM Transactions on Programming Languages and Systems 4, 258282.
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.
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.
Plotkin G. 1970. A note on inductive generalization. Machine intelligence 5, 153163.
Schimpf J. and Shen K. 2012. ECL i PS e - from LP to CLP. Theory and Practice of Logic Programming 12, 1–2, 127156.
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.
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.
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.
Vasak T. and Potter J. 1986. Characterization of terminating logic programs. In Proc. of the 1986 Intl. Symp. on Logic Programming. IEEE, 140147.
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.
Wielemaker J., Schrijvers T., Triska M., and Lager T. 2012. SWI-Prolog. Theory and Practice of Logic Programming 12, 1–2, 6796.
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? *


Type Description Title
Supplementary Materials

Mesnard supplementary material
Online Appendix

 PDF (228 KB)
228 KB


Full text views

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

Abstract views

Total abstract views: 148 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 13th December 2017. This data will be updated every 24 hours.