A Generalized Model for Algorithmic Debugging

  • David Insa
  • Josep SilvaEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9527)


Algorithmic debugging is a semi-automatic debugging technique that is present in practically all mature programming languages. In this paper we claim that the state of the practice in algorithmic debugging is a step forward compared to the state of the theory. In particular, we argue that novel techniques for algorithmic debugging cannot be supported by the standard internal data structures used in this technique, and a generalization of the standard definitions and algorithms is needed. We identify two specific problems of the standard formulation and implementations of algorithmic debugging, and we propose a reformulation to solve both problems. The reformulation has been done in a paradigm-independent manner to make it useful and reusable in different programming languages.


Source Code Code Fragment Execution Unit Code Behavior Execution Tree 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.



This work has been partially supported by the EU (FEDER) and the Spanish Ministerio de Economía y Competitividad (Secretaría de Estado de Investigación, Desarrollo e Innovación) under Grant TIN2013-44742-C4-1-R and by the Generalitat Valenciana under Grant PROMETEOII/2015/013. David Insa was partially supported by the Spanish Ministerio de Educación under FPU Grant AP2010-4415. The authors thank the anonymous referees of LOPSTR for their constructive feedback that has contributed to improve this work. They also thank Ehud Shapiro for providing historical information about algorithmic debugging.


  1. 1.
    Eclipse (2003).
  2. 2.
    Barbour, T., Naish, L.: Declarative debugging of a logical-functional language. Technical report, University of Melbourne (1994)Google Scholar
  3. 3.
    Braßel, B., Siegel, H.: Debugging lazy functional programs by asking the oracle. In: Chitil, O., Horváth, Z., Zsók, V. (eds.) IFL 2007. LNCS, vol. 5083, pp. 183–200. Springer, Heidelberg (2008) CrossRefGoogle Scholar
  4. 4.
    Caballero, R.: A declarative debugger of incorrect answers for constraint functional-logic programs. In: Proceedings of the 2005 ACM-SIGPLAN Workshop on Curry and Functional Logic Programming (WCFLP 2005), pp. 8–13. ACM Press, New York, USA (2005)Google Scholar
  5. 5.
    Caballero, R., Martin-Martin, E., Riesco, A., Tamarit, S.: EDD: A declarative debugger for sequential erlang programs. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014 (ETAPS). LNCS, vol. 8413, pp. 581–586. Springer, Heidelberg (2014) CrossRefGoogle Scholar
  6. 6.
    Caballero, R., Riesco, A., Verdejo, A., Martí-Oliet, N.: Simplifying questions in maude declarative debugger by transforming proof trees. In: Vidal, G. (ed.) LOPSTR 2011. LNCS, vol. 7225, pp. 73–89. Springer, Heidelberg (2012) CrossRefGoogle Scholar
  7. 7.
    Cheda, D., Silva, J.: State of the practice in algorithmic debugging. Electron. Notes Theor. Comput. Sci. 246, 55–70 (2009)CrossRefGoogle Scholar
  8. 8.
    Davie, T., Chitil, O.: Hat-delta: one right does make a wrong. In: Butterfield, A., (ed.) Proceedings of the 17th International Workshop on Implementation and Application of Functional Languages (IFL 2005), p. 11, September 2005Google Scholar
  9. 9.
    Davie, T., Chitil, O.: Hat-delta: One right does make a wrong. In: Proceedings of the 7th Symposium on Trends in Functional Programming (TFP 2006), April 2006Google Scholar
  10. 10.
    Fritzson, P., Shahmehri, N., Kamkar, M., Gyimóthy, T.: Generalized algorithmic debugging and testing. ACM Lett. Program. Lang. Syst. (LOPLAS) 1(4), 303–322 (1992)CrossRefGoogle Scholar
  11. 11.
    González, J., Insa, D., Silva, J.: A new hybrid debugging architecture for eclipse. In: Gupta, G., Peña, R. (eds.) LOPSTR 2013, LNCS 8901. LNCS, vol. 8901, pp. 183–201. Springer, Heidelberg (2014) Google Scholar
  12. 12.
    Hermanns, C., Kuchen, H.: Hybrid debugging of java programs. In: Escalona, M.J., Cordeiro, J., Shishkov, B. (eds.) ICSOFT 2011. CCIS, vol. 303, pp. 91–107. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  13. 13.
    Insa, D., Silva, J.: An algorithmic debugger for java. In: Proceedings of the 26th IEEE International Conference on Software Maintenance (ICSM 2010), pp. 1–6 (2010)Google Scholar
  14. 14.
    Insa, D., Silva, J.: Automatic transformation of iterative loops into recursive methods. Inf. Soft. Technol. 58, 95–109 (2015)CrossRefGoogle Scholar
  15. 15.
    Insa, D., Silva, J., Riesco, A.: Speeding up algorithmic debugging using balanced execution trees. In: Veanes, M., Viganò, L. (eds.) TAP 2013. LNCS, vol. 7942, pp. 133–151. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  16. 16.
    Insa, D., Silva, J., Tomás, C.: Enhancing declarative debugging with loop expansion and tree compression. In: Albert, E. (ed.) LOPSTR 2012. LNCS, vol. 7844, pp. 71–88. Springer, Heidelberg (2013) CrossRefGoogle Scholar
  17. 17.
    Lloyd, J.: Declarative error diagnosis. New Gener. Comput. 5(2), 133–154 (1987)CrossRefzbMATHGoogle Scholar
  18. 18.
    Lux, M.: Münster Curry User’s Guide, May 2006.,
  19. 19.
    MacLarty, I.D.: Practical Declarative Debugging of Mercury Programs. Ph.D. thesis, University of Melbourne (2005)Google Scholar
  20. 20.
    Naish, L., Dart, P.W., Zobel, J.: The NU-Prolog debugging environment. In: Porto, A. (ed.) Proceedings of the 6th International Conference on Logic Programming (ICLP 1989), pp. 521–536. Lisboa, Portugal (1989)Google Scholar
  21. 21.
    Nilsson, H.: Declarative Debugging for Lazy Functional Languages. Ph.D. thesis, Linköping, Sweden, May 1998Google Scholar
  22. 22.
    Nilsson, H.: How to look busy while being as lazy as ever: the implementation of a lazy functional debugger. J. Funct. Program. 11(6), 629–671 (2001)CrossRefzbMATHGoogle Scholar
  23. 23.
    Nilsson, H., Fritzson, P.: Algorithmic debugging for lazy functional languages. J. Funct. Program. 4(3), 337–370 (1994)CrossRefGoogle Scholar
  24. 24.
    Nilsson, H., Sparud, J.: The evaluation dependence tree: an execution record for lazy functional debugging. Technical report, Department of Computer and Information Science, Linköping (1996)Google Scholar
  25. 25.
    Nilsson, H., Sparud, J.: The evaluation dependence tree as a basis for lazy functional debugging. Autom. Softw. Eng. 4(2), 121–150 (1997)CrossRefGoogle Scholar
  26. 26.
    Pope, B.: A Declarative Debugger for Haskell. Ph.D. thesis, The University of Melbourne, Australia (2006)Google Scholar
  27. 27.
    Shapiro, E.: Algorithmic Program Debugging. MIT Press, Cambridge (1982)zbMATHGoogle Scholar
  28. 28.
    Shapiro, E.Y.: Inductive inference of theories from facts. Technical report RR 192, Yale University (New Haven, CT US) (1981)Google Scholar
  29. 29.
    Silva, J.: A survey on algorithmic debugging strategies. Adv. Eng. Softw. 42(11), 976–991 (2011)CrossRefGoogle Scholar
  30. 30.
    Silva, J.: A vocabulary of program slicing-based techniques. ACM Comput. Surv. 44(3), 1–12 (2012)Google Scholar
  31. 31.
    Thompson, B., Naish, L.: A guide to the nu-prolog debugging environment. Technical report, University of Melbourne (1997)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  1. 1.Universitat Politècnica de ValènciaValenciaSpain

Personalised recommendations