Skip to main content

Using Big-Step and Small-Step Semantics in Maude to Perform Declarative Debugging

  • Conference paper
Functional and Logic Programming (FLOPS 2014)

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

Included in the following conference series:

Abstract

Declarative debugging is a semi-automatic debugging technique that abstracts the execution details to focus on results. This technique builds a debugging tree representing an incorrect computation and traverses it by asking questions to the user until the error is found. In previous works we have presented a declarative debugger for Maude specifications. Besides a programming language, Maude is a semantic framework where several other languages can be specified. However, our declarative debugger is only able to find errors in Maude specifications, so it cannot find bugs on the programs written on the languages being specified. We study in this paper how to modify our declarative debugger to find this kind of errors when defining programming languages using big-step and small-step semantics, two generic approaches that allow to specify a wide range of languages in a natural way. We obtain our debugging trees by modifying the proof trees obtained from the semantic rules. We have extended our declarative debugger to deal with this kind of debugging, and we illustrate it with an example.

Research supported by MICINN Spanish project StrongSoft (TIN2012-39391-C04-04) and Comunidad de Madrid program PROMETIDOS (S2009/TIC-1465).

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bouhoula, A., Jouannaud, J.-P., Meseguer, J.: Specification and proof in membership equational logic. Theoretical Computer Science 236, 35–132 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  2. Caballero, R.: A declarative debugger of incorrect answers for constraint functional-logic programs. In: Antoy, S., Hanus, M. (eds.) Proc. of the 2005 ACM SIGPLAN Workshop on Curry and Functional Logic Programming, WCFLP 2005, Tallinn, Estonia, pp. 8–13. ACM Press (2005)

    Google Scholar 

  3. Caballero, R., Hermanns, C., Kuchen, H.: Algorithmic debugging of Java programs. In: López-Fraguas, F. (ed.) Proc. of the 15th Workshop on Functional and (Constraint) Logic Programming, WFLP 2006, Madrid, Spain. Electronic Notes in Theoretical Computer Science, vol. 177, pp. 75–89. Elsevier (2007)

    Google Scholar 

  4. Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.: All About Maude - A High-Performance Logical Framework. LNCS, vol. 4350. Springer, Heidelberg (2007)

    MATH  Google Scholar 

  5. Şerbănuţă, T.F., Roşu, G.: K-Maude: A rewriting based tool for semantics of programming languages. In: Ölveczky, P.C. (ed.) WRLA 2010. LNCS, vol. 6381, pp. 104–122. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  6. Hennessy, M.: The Semantics of Programming Languages: An Elementary Introduction Using Structural Operational Semantics. John Wiley & Sons (1990)

    Google Scholar 

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

  8. MacLarty, I.: Practical declarative debugging of Mercury programs. Master’s thesis, University of Melbourne (2005)

    Google Scholar 

  9. Meseguer, J.: Conditional rewriting logic as a unified model of concurrency. Theoretical Computer Science 96(1), 73–155 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  10. Naish, L.: Declarative diagnosis of missing answers. New Generation Computing 10(3), 255–286 (1992)

    Article  Google Scholar 

  11. Nilsson, H.: How to look busy while being as lazy as ever: the implementation of a lazy functional debugger. Journal of Functional Programming 11(6), 629–671 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  12. Pope, B.: A Declarative Debugger for Haskell. PhD thesis, The University of Melbourne, Australia (2006)

    Google Scholar 

  13. Riesco, A.: Using semantics specified in Maude to generate test cases. In: Roychoudhury, A., D’Souza, M. (eds.) ICTAC 2012. LNCS, vol. 7521, pp. 90–104. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

  14. Riesco, A., Verdejo, A., Martí-Oliet, N., Caballero, R.: Declarative debugging of rewriting logic specifications. Journal of Logic and Algebraic Programming 81(7-8), 851–897 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  15. Shapiro, E.Y.: Algorithmic Program Debugging. ACM Distinguished Dissertation. MIT Press (1983)

    Google Scholar 

  16. Tessier, A., Ferrand, G.: Declarative diagnosis in the CLP scheme. In: Deransart, P., Małuszyński, J. (eds.) DiSCiPl 1999. LNCS, vol. 1870, pp. 151–174. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  17. Verdejo, A., Martí-Oliet, N.: Executable structural operational semantics in Maude. Technical Report 134-03, Dpto. Sistemas Informáticos y Programación, Universidad Complutense de Madrid (2003)

    Google Scholar 

  18. Verdejo, A., Martí-Oliet, N.: Executable structural operational semantics in Maude. Journal of Logic and Algebraic Programming 67, 226–293 (2006)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Riesco, A. (2014). Using Big-Step and Small-Step Semantics in Maude to Perform Declarative Debugging. In: Codish, M., Sumii, E. (eds) Functional and Logic Programming. FLOPS 2014. Lecture Notes in Computer Science, vol 8475. Springer, Cham. https://doi.org/10.1007/978-3-319-07151-0_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-07151-0_4

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-07150-3

  • Online ISBN: 978-3-319-07151-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics