A Declarative Debugger of Wrong Answers for Lazy Functional Logic Programs
Rafel Caballero, Mario Rodriguez-Artalejo
In Proc. of the International Workshop on Functional and (Constraint) Logic Programming (WFLP 2001)
, Report No. 2017, University of Kiel
We describe the design of a declarative debugger
for diagnosing wrong answers in lazy functional logic programs with
polymorphic type discipline. Following a known technique, the debugger is based on a
program transformation: transformed programs return the computation trees
needed for debugging, in addition to the results expected by source programs.
Thanks to a careful specification of the translation, we are able to prove its
correctness 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 allowing
"maybe" answers and avoiding redundant questions to the user during debugging.
A prototype implementation of the debugger is available. Extensions of the debugger
to deal with missing answers and constraints are planned as future work.