skip to main content
10.1145/1085099.1085102acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

A declarative debugger of incorrect answers for constraint functional-logic programs

Published:29 September 2005Publication History

ABSTRACT

Debugging is one of the essential parts of the software development cycle. However, the usual debugging techniques used in imperative languages such as the step by step execution often are not suitable for debugging declarative programming languages. We present here a graphical debugging environment for constraint lazy functional-logic programs based on declarative debugging. The debugger displays the computation tree associated with a computation which has produced an incorrect answer, and navigates it with the assistance of the user until the error, an incorrect program rule, is found out. The debugger supports programs including equality and disequality constraints.

References

  1. M. Abengózar-Carneros et al. Toy: A multiparadigm declarative language. Version 1.0. Technical Report SIP-119/00, Universidad Complutense de Madrid, February 2002.]]Google ScholarGoogle Scholar
  2. R. Caballero and W. Lux. Declarative Debugging of Encapsulated Search. Electronic Notes in Theoretical Computer Science, 76, pages 1--13 2002.]]Google ScholarGoogle ScholarCross RefCross Ref
  3. R. Caballero, F. López-Fraguas, and M. Rodríguez-Artalejo. Theoretical Foundations for the Declarative Debugging of Lazy Functional Logic Programs. In Proc. FLOPS'01, number 2024 in LNCS, pages 170--184. Springer, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. R. Caballero and M. Rodríguez-Artalejo. A Declarative Debugging System for Lazy Functional Logic Programs. Electronic Notes in Theoretical Computer Science, 64, 2002.]]Google ScholarGoogle Scholar
  5. R. Caballero and M. Rodríguez-Artalejo. DDT: a Declarative Debugging Tool for Functional-Logic Languages. In Proc. FLOPS'04, number 2998 in LNCS, pages 70--84. Springer, 2004.]]Google ScholarGoogle Scholar
  6. M. Hanus. The Integration of Functions into Logic Programming: A Survey. J. of Logic Programming 19-20. Special issue "Ten Years of Logic Programming", pages 583--628, 1994.]]Google ScholarGoogle Scholar
  7. M. Hanus. Curry: An Integrated Functional Logic Language (version 0.8, April 15, 2003). Available at: http://www.informatik.uni-kiel.de/~mh/curry/+, 2003.]]Google ScholarGoogle Scholar
  8. S. P. Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.]]Google ScholarGoogle Scholar
  9. F. López-Fraguas, M. Rodríguez-Artalejo, and R. d. Vado-Vírseda. Constraint functional logic programming revisited. In Proc. WRLA'2004, volume 117 of Elec. Notes on Theor. Comp. Science, pages 5--50, 2004.]]Google ScholarGoogle Scholar
  10. H. Nilsson. How to look busy while being lazy as ever: The implementation of a lazy functional debugger. Journal of Functional Programming 11(6), pages 629--671, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. Shapiro. Algorithmic Program Debugging. The MIT Press, 1982.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Wadler. Why no one uses Functional Languages. SIGPLAN Notices 33(8), pages 23--27, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A declarative debugger of incorrect answers for constraint functional-logic programs

        Recommendations

        Reviews

        Hans J. Schneider

        The idea of declarative debugging is to generate a computation tree and locate a node whose result is incorrect, but has correct results at all of its children nodes. This paper presents a (pseudo-)graphical system supporting the user in finding a buggy node. Section 2 summarizes the constraint functional language TOY (with lazy semantics and pattern matching). In the next section, the author briefly defines the computation tree and discusses its simplification to reduce the number of questions the user must answer. The debugger is based on a transformed program that returns the computation tree in addition to the result. This transformation is described in section 4. Then, Caballero reviews a debugging session. The user can navigate through the tree, change the validity of nodes, remove valid subtrees, and so on, until the debugger is able to indicate the function definition that seems to be the cause of the error. In section 6, the author discusses some efficiency issues. Whereas the number of questions can be suitably reduced by the divide-and-query strategy, the memory overhead is the major drawback and restricts the application of the present system to small examples. The paper is clearly written, and is an interesting contribution to debugging functional programs. The reader gets a good impression of the running system and its limits. Online Computing Reviews Service

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          WCFLP '05: Proceedings of the 2005 ACM SIGPLAN workshop on Curry and functional logic programming
          September 2005
          78 pages
          ISBN:1595930698
          DOI:10.1145/1085099

          Copyright © 2005 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 29 September 2005

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Upcoming Conference

          ICFP '24

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader