Skip to main content

Declarative Diagnosis of Missing Answers in Constraint Functional-Logic Programming

  • Conference paper
Functional and Logic Programming (FLOPS 2008)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 4989))

Included in the following conference series:

Abstract

We present a declarative method for diagnosing missing computed answers in \(CFLP{\mathcal (D)}\), a generic scheme for lazy Constraint Functional-Logic Programming which can be instantiated by any constraint domain \({\mathcal D}\) given as parameter. As far as we know, declarative diagnosis of missing answers in such an expressive framework has not been tackled before. Our approach combines and extends previous work done separately for constraint logic programming and lazy functional programming languages. Diagnosis can be started whenever a user finds that the set of computed answers for a given goal with finite search space misses some expected solution w.r.t. an intended interpretation of the program, that provides a declarative description of its expected behavior. Diagnosis proceeds by exploring a proof tree, that provides a declarative view of the answer-collection process performed by the computation, and it ends up with the detection of some function definition in the program that is incomplete w.r.t. the intended interpretation. We can prove the logical correctness of the diagnosis method under the assumption that the recollection of computed answers performed by the goal solving system can be represented as a proof tree. We argue the plausibility of this assumption, and we describe the prototype of a tool which implements the diagnosis method.

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. Boye, J., Drabent, W., Maluszynski, J.: Declarative diagnosis of contraint programs: An assertion-based approach. In: Automated and Algorithmic Debugging, pp. 123–140 (1997)

    Google Scholar 

  2. Brassel, B., Hanus, M., Huch, F.: Encapsulating non-determinism in functional logic computations. Journal of Functional and Logic Programming (2004)

    Google Scholar 

  3. Brassel, B., Hanus, M., Huch, F., Vidal, G.: A semantics for tracing declarative multi-paradigm programs. In: PPDP 2004, pp. 179–190. ACM Press, New York (2004)

    Chapter  Google Scholar 

  4. Caballero, R.: A declarative debugger of incorrect answers for constraint functional-logic programs. In: WCFLP 2005, pp. 8–13. ACM Press, New York (2005)

    Chapter  Google Scholar 

  5. Caballero, R., García-Ruiz, Y., Sáenz-Pérez, F.: A new proposal for debugging datalog programs. In: WFLP 2007 (2007)

    Google Scholar 

  6. Caballero, R., Rodríguez-Artalejo, M.: A declarative debugging system for lazy functional logic programs. Electr. Notes Theor. Comput. Sci. 64 (2002)

    Google Scholar 

  7. Rodríguez-Artalejo, M., Caballero, R.: \(\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 

  8. Caballero, R., Rodríguez-Artalejo, M., del Vado-Vírseda, R.: Declarative diagnosis of wrong answers in constraint functional-logic programming. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 421–422. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  9. Caballero, R., Rodríguez-Artalejo, M., del Vado-Vírseda, R.: Declarative debugging of missing answers in constraint functional-logic programming. In: Dahl, V., Niemelä, I. (eds.) ICLP 2007. LNCS, vol. 4670, pp. 425–427. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  10. Caballero, R., Rodríguez-Artalejo, M., del Vado-Vírseda, R.: Algorithmic debugging of missing answers in constraint functional-logic programming. Technical Report DSIC 2/08, Universidad Complutense de Madrid (2008), http://gpd.sip.ucm.es/papers.html

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

  12. Estévez, S., del Vado-Vírseda, R.: Designing an efficient computation strategy in CFLP(\(\mathcal{FD}\)) using definitional trees. In: WCFLP 2005, pp. 23–31. ACM Press, New York (2005)

    Google Scholar 

  13. Fernández, A.J., Hortalá-González, M.T., Sáenz-Pérez, F., del Vado-Vírseda, R.: Constraint functional logic programming over finite domains. Theory and Practice of Logic Programming 7(5), 537–582 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  14. Ferrand, G.: Error diagnosis in logic programming, an adaption of E. Y. Shapiro’s method. J. Log. Program. 4(3), 177–198 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  15. Ferrand, G., Lesaint, W., Tessier, A.: Towards declarative diagnosis of constraint programs over finite domains. ArXiv Computer Science e-prints (2003)

    Google Scholar 

  16. Hanus, M.: Curry: An integrated functional logic language (version 0.8.2 of march 28, 2006) (2006), http://www.informatik.uni-kiel.de/~curry

  17. Hermenegildo, M., Puebla, G., Bueno, F., López-García, P.: Abstract verification and debugging of constraint logic programs. In: O’Sullivan, B. (ed.) CologNet 2002. LNCS (LNAI), vol. 2627, pp. 1–14. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  18. Lloyd, J.W.: Declarative error diagnosis. New Gen. Comput. 5(2), 133–154 (1987)

    Article  MATH  Google Scholar 

  19. López-Fraguas, F.J., Rodríguez-Artalejo, M., del Vado-Vírseda, R.: A lazy narrowing calculus for declarative constraint programming. In: PPDP 2004, pp. 43–54. ACM Press, New York (2004)

    Chapter  Google Scholar 

  20. López-Fraguas, F.J., Rodríguez-Artalejo, M., Vado-Vírseda, R.d.: A new generic scheme for functional logic programming with constraints. Higher-Order and Symbolic Computation 20(1-2), 73–122 (2007)

    Article  MATH  Google Scholar 

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

    Google Scholar 

  22. Naish, L.: A declarative debugging scheme. Journal of Functional and Logic Programming 1997(3) (1997)

    Google Scholar 

  23. Naish, L., Barbour, T.: A declarative debugger for a logical-functional language. DSTO General Document 5(2), 91–99 (1995)

    Google Scholar 

  24. 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  MathSciNet  MATH  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. B. Pope. A Declarative Debugger for Haskell. PhD thesis, Department of Computer Science and Software Engineering, University of Melbourne (2006)

    Google Scholar 

  27. Pope, B., Naish, L.: Practical aspects of declarative debugging in haskell 98. In: PPDP 2003, pp. 230–240. ACM Press, New York (2003)

    Chapter  Google Scholar 

  28. Shapiro, E.Y.: Algorithmic Program Debugging. MIT Press, Cambridge, MA, USA (1983)

    Google Scholar 

  29. Silva, J.: A comparative study of algorithmic debugging strategies. In: Puebla, G. (ed.) LOPSTR 2006. LNCS, vol. 4407, pp. 143–159. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

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

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jacques Garrigue Manuel V. Hermenegildo

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Caballero, R., Rodríguez Artalejo, M., del Vado Vírseda, R. (2008). Declarative Diagnosis of Missing Answers in Constraint Functional-Logic Programming. In: Garrigue, J., Hermenegildo, M.V. (eds) Functional and Logic Programming. FLOPS 2008. Lecture Notes in Computer Science, vol 4989. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-78969-7_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-78969-7_22

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-78968-0

  • Online ISBN: 978-3-540-78969-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics