Skip to main content

A Generalized Model for Algorithmic Debugging

  • Conference paper
  • First Online:
Logic-Based Program Synthesis and Transformation (LOPSTR 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9527))

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://www.dsic.upv.es/~jsilva/HDJ/.

  2. 2.

    In the ET, nodes represent computations. Hence, depending on the underlying paradigm, they can represent methods, functions, procedures, clauses, etc. Our discussions in this paper can be applied to both the imperative and the declarative paradigms, but, for the sake of concreteness, we will focuss the discussion on the imperative paradigm and our examples on Java.

  3. 3.

    Note the careful use of the word “statement" to refer to either imperative instructions, declarative expressions, etc.

References

  1. Eclipse (2003). http://www.eclipse.org/

  2. Barbour, T., Naish, L.: Declarative debugging of a logical-functional language. Technical report, University of Melbourne (1994)

    Google Scholar 

  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)

    Chapter  Google Scholar 

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

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  7. Cheda, D., Silva, J.: State of the practice in algorithmic debugging. Electron. Notes Theor. Comput. Sci. 246, 55–70 (2009)

    Article  Google Scholar 

  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 2005

    Google Scholar 

  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 2006

    Google Scholar 

  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)

    Article  Google Scholar 

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

    Chapter  Google Scholar 

  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. Insa, D., Silva, J.: Automatic transformation of iterative loops into recursive methods. Inf. Soft. Technol. 58, 95–109 (2015)

    Article  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  17. Lloyd, J.: Declarative error diagnosis. New Gener. Comput. 5(2), 133–154 (1987)

    Article  MATH  Google Scholar 

  18. Lux, M.: Münster Curry User’s Guide, May 2006. http://danae.uni-muenster.de/lux/curry/user.pdf,

  19. MacLarty, I.D.: Practical Declarative Debugging of Mercury Programs. Ph.D. thesis, University of Melbourne (2005)

    Google Scholar 

  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. Nilsson, H.: Declarative Debugging for Lazy Functional Languages. Ph.D. thesis, Linköping, Sweden, May 1998

    Google Scholar 

  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)

    Article  MATH  Google Scholar 

  23. Nilsson, H., Fritzson, P.: Algorithmic debugging for lazy functional languages. J. Funct. Program. 4(3), 337–370 (1994)

    Article  Google Scholar 

  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. Nilsson, H., Sparud, J.: The evaluation dependence tree as a basis for lazy functional debugging. Autom. Softw. Eng. 4(2), 121–150 (1997)

    Article  Google Scholar 

  26. Pope, B.: A Declarative Debugger for Haskell. Ph.D. thesis, The University of Melbourne, Australia (2006)

    Google Scholar 

  27. Shapiro, E.: Algorithmic Program Debugging. MIT Press, Cambridge (1982)

    MATH  Google Scholar 

  28. Shapiro, E.Y.: Inductive inference of theories from facts. Technical report RR 192, Yale University (New Haven, CT US) (1981)

    Google Scholar 

  29. Silva, J.: A survey on algorithmic debugging strategies. Adv. Eng. Softw. 42(11), 976–991 (2011)

    Article  Google Scholar 

  30. Silva, J.: A vocabulary of program slicing-based techniques. ACM Comput. Surv. 44(3), 1–12 (2012)

    Google Scholar 

  31. Thompson, B., Naish, L.: A guide to the nu-prolog debugging environment. Technical report, University of Melbourne (1997)

    Google Scholar 

Download references

Acknowledgements

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.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Josep Silva .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Insa, D., Silva, J. (2015). A Generalized Model for Algorithmic Debugging. In: Falaschi, M. (eds) Logic-Based Program Synthesis and Transformation. LOPSTR 2015. Lecture Notes in Computer Science(), vol 9527. Springer, Cham. https://doi.org/10.1007/978-3-319-27436-2_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-27436-2_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-27435-5

  • Online ISBN: 978-3-319-27436-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics