Articles
A Declarative Debugging System for Lazy Functional Logic Programs

https://doi.org/10.1016/S1571-0661(04)80349-9Get rights and content
Under a Creative Commons license
open access

Abstract

We present a declarative debugger for lazy functional logic programs with polymorphic type discipline. Whenever a 0computed answer is considered wrong by the user (error symptom), the debugger locates a program fragment (function defining rule) responsible for the error. The notions of symptom and error have a declarative meaning w.r.t. to an intended program semantics. Debugging is performed by searching in a computation tree which is a logical representation of the computation. Following a known technique, our tool is based on a program transformation: transformed programs return computation trees along with the results expected by source programs. Our transformation is provably correct w.r.t. well-typing and program semantics. As additional improvements w.r.t. related approaches, we solve a previously open problem concerning the use of curried functions, and we provide a correct method for avoiding redundant questions to the user during debugging. A prototype implementation of the debugger is available. Case studies and extensions are planned as future work.

Cited by (0)

1

Work partially supported by the Spanish CICYT (project CICYT-TIC98-0445-C03-02/97 “TREND”)