Divide-and-query and subterm dependency tracking in the mercury declarative debugger

  • Authors:
  • Ian MacLarty;Zoltan Somogyi;Mark Brown

  • Affiliations:
  • University of Melbourne, Australia;University of Melbourne, Australia;University of Melbourne, Australia

  • Venue:
  • Proceedings of the sixth international symposium on Automated analysis-driven debugging
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

We have implemented a declarative debugger for Mercury that is capable of finding bugs in large, long-running programs. This debugger implements several search strategies. We discuss the implementation of two of these strategies and the conditions under which each strategy is useful.The divide and query strategy tries to minimize the number of questions asked of the user. While divide and query can reduce the number of questions to roughly logarithmic in the size of the computation, implementing it presents practical difficulties for computations whose representations do not fit into memory. We discuss how we get around this problem, making divide and query practical.Our declarative debugger allows users to specify exactly which part of an atom is wrong. The subterm dependency tracking strategy exploits this extra information to jump directly to the part of the program that computed the wrong subterm. In many cases, only a few such jumps are required to arrive at the bug. Subterm dependency tracking can converge on the bug even more quickly than divide and query, and it tends to yield question sequences that are easier for users to answer.