Skip to main content

A Theoretical Framework for the Declarative Debugging of Functional Logic Programs with Lambda Abstractions

  • Conference paper
Book cover Functional and Constraint Logic Programming (WFLP 2009)

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

Included in the following conference series:

Abstract

In this paper, we extend the well-known Naish’s declarative debugging scheme for diagnosing wrong computed answers in first-order lazy functional-logic programs to the higher-order setting of the simply typed λ-calculus, where programs are presented by conditional pattern rewrite systems. Our approach generalizes and combines declarative debugging techniques previously developed for less expressive declarative programming paradigms involving applicative rewrite rules instead of λ-abstractions and decidable higher-order unification. Debugging starts with the observation of a wrong computed answer which the user regards as incorrect w.r.t. an intended model that provides a declarative description of the program’s semantics. Debugging proceeds by exploring an abridged proof tree built on a higher-order rewriting logic with λ-abstractions that provides a purely declarative view of the computation. Finally, debugging ends with the detection of a defined function rule in the program that is incorrect w.r.t. the intended model. We prove the logical correctness of the debugging method for any sound goal solving system whose computed answers are logical consequences of the program.

This work has been partially supported by the Spanish projects TIN2005-09207-C03-03 (MERIT-FORMS), TIN2008-06622-C03-01 (FAST-STAMP), S-0505/TIC/0407 (PROMESAS-CAM), and UCM-BSCH-GR58/08-910502 (GPD-UCM).

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. Caballero, R., López-Fraguas, F.J., Rodríguez-Artalejo, M.: Theoretical Foundations for the Declarative Debugging of Lazy Functional-Logic Programs. In: Kuchen, H., Ueda, K. (eds.) FLOPS 2001. LNCS, vol. 2024, pp. 170–184. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  2. Caballero, R., Rodríguez-Artalejo, M.: \(\mathcal{DDT}\): A Declarative Debugging Tool for Functional-Logic Languages. In: Kameyama, Y., Stuckey, P.J. (eds.) FLOPS 2004. LNCS, vol. 2998, pp. 70–84. Springer, Heidelberg (2004)

    Google Scholar 

  3. López-Fraguas, F.J., Rodríguez-Artalejo, M., del Vado-Vírseda, R.: A New Generic Scheme for Functional-Logic Programming with Constraints. Journal of Higher-Order and Symbolic Computation 20(1/2), 73–122 (2007)

    Article  MATH  Google Scholar 

  4. González-Moreno, J.C., Hortalá-González, M.T., Rodríguez-Artalejo, M.: A higher-order rewriting logic for functional-logic programming. In: Proc. ICLP 1997, pp. 153–167 (1997)

    Google Scholar 

  5. González-Moreno, J.C., Hortalá-González, M.T., López-Fraguas, F.J., Rodríguez-Artalejo, M.: An approach to declarative programming based on a rewriting logic. Journal of Logic Programming 40, 47–87 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  6. Hanus, M.: Curry: an Integrated Functional Logic Language., http://www-i2.informatik.uni-kiel.de/~curry/

  7. Hanus, M., Prehofer, C.: Higher-order narrowing with definitional trees. Journal of Functional Programming 9(1), 33–75 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  8. Hindley, J.R., Seldin, J.P.: Introduction to Combinatorics and λ-Calculus. Cambridge University Press, Cambridge (1986)

    Google Scholar 

  9. Lloyd, J.W.: Combining functional and logic programming languages. In: Proc. ILPS 1994 (1994)

    Google Scholar 

  10. Lock, H.C.: The Implementation of Functional-Logic Languages. Oldenbourg Verlag (1993)

    Google Scholar 

  11. López-Fraguas, F.J., Sánchez-Hernández, J.: \(\mathcal{TOY}\): A Multiparadigm Declarative System. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 244–247. Springer, Heidelberg (1999), http://toy.sourceforge.net

  12. Paulson, L.C.: Isabelle: A Generic Theorem Prover. LNCS, vol. 828. Springer, Heidelberg (1994)

    MATH  Google Scholar 

  13. Meseguer, J.: Conditional rewriting logic as a unified model of concurrency. TCS 96, 73–155 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  14. Miller, D.: A logic programming language with λ-abstraction, function variables, and simple unification. Journal of Logic and Computation 1(4), 497–536 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  15. Nakahara, K., Middeldorp, A., Ida, T.: A complete narrowing calculus for higher-order functional-logic programming. In: Swierstra, S.D. (ed.) PLILP 1995. LNCS, vol. 982, pp. 97–114. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  16. Naish, L.: A Declarative Debugging Scheme. Journal of Functional and Logic Programming (1997)

    Google Scholar 

  17. Smolka, G.: The Definition of Kernel Oz. Technical Report DFKI Research Report RR-94-23, Saarbrücken, Germany (1994)

    Google Scholar 

  18. del Vado-Vírseda, R.: A Demand-driven Narrowing Calculus with Overlapping Definitional Trees. In: Proc. PPDP 2003, pp. 253–263. ACM, New York (2003)

    Chapter  Google Scholar 

  19. del Vado Vírseda, R.: Declarative Constraint Programming with Definitional Trees. In: Gramlich, B. (ed.) FroCos 2005. LNCS (LNAI), vol. 3717, pp. 184–199. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  20. del Vado Vírseda, R.: A Higher-Order Demand-Driven Narrowing Calculus with Definitional Trees. In: Jones, C.B., Liu, Z., Woodcock, J. (eds.) ICTAC 2007. LNCS, vol. 4711, pp. 169–184. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  21. del Vado-Vírseda, R.: A Higher-Order Logical Framework for the Algorithmic Debugging and Verification of Declarative Programs. In: Proc. PPDP 2009, pp. 49–60. ACM Press, New York (2009)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

del Vado Vírseda, R., Castiñeiras, I. (2010). A Theoretical Framework for the Declarative Debugging of Functional Logic Programs with Lambda Abstractions. In: Escobar, S. (eds) Functional and Constraint Logic Programming. WFLP 2009. Lecture Notes in Computer Science, vol 5979. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11999-6_11

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-11999-6_11

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-11998-9

  • Online ISBN: 978-3-642-11999-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics