Model-based diagnosis aims at providing a general theory of diagnosis. In this paper we propose the use of model-based diagnosis techniques in software diagnosis rather than in diagnosing physical systems. In particular, we define the concept of "model-based" diagnosis of logic programs and a preference relation among diagnoses. Based on the concept of leading diagnoses (according to the preference order), we show that bug localization by model-based diagnosis stops where traditional approaches would still query the user. We then present an algorithm for computing diagnoses and we briefly discuss its correctness and completeness. We finally compare the definition to other approaches to logic program debugging.
展开▼