Debugging functional programs
Markus Stumptner, Franz Wotawa · 1999
In this paper, we use a logic-based system description for a simple (non-logic) functional language to examine the ways in which a diagnosis system can use its system description to improve debugging performance. The key concepts for this are that the notion of expression replacement, which is the basis for repairing a program, can also serve as a fundamental heuristic for searching the source of an error. We formally define replacements in terms of fault modes, explicitly define a replacement order, and present an algorithm that uses the replacement heuristic for finding diagnoses. Finally, we incorporate the use of multiple test cases and discuss the resulting reduction of the number of computed diagnoses. Introduction Although model-based diagnosis (MBD) (Rei87; dKW87) provides a general diagnosis framework, most of its applications are within the hardware domain or use models of the physical world. However, several attempts have been made to extend the application of diagnosis met...