In this paper, we introduce logic programming as a domain that exhibits some characteristics of being
ill-defined. In order to diagnose student errors in such a domain, we need a means to hypothesise the student’s intention, that is the strategy underlying her solution. This is achieved by weighting constraints, so that hypotheses about solution strategies, programming patterns and error diagnoses can be ranked and selected. Since diagnostic accuracy becomes an increasingly important issue, we present an evaluation methodology that measures diagnostic accuracy in terms of (1) the ability to identify the actual solution strategy, and (2) the reliability of error diagnoses. The evaluation results confirm that the system is able to analyse a major share of real student solutions, providing highly informative and precise feedback.