About

DDJ DDJ is a debugger for Java based on the algorithmic debugging technique introduced by Shapiro (E. Shapiro. Algorithmic Program Debugging. MIT Press, 1982).

Version 1.0 was developed at the Universidad Complutense de Madrid. Version 2.0 has been implemented at the Universidad Politécnica de Valencia.

The main features are the following:

  • Implementation Language: Java.
  • Target Language: Java.
  • Algorithmic Debugging Strategies Implemented:
    • Single Stepping,
    • Top-Down,
    • Heaviest First,
    • Divide & Query,
    • Hirunkitti's Divide & Query,
    • Hat Delta’s Heuristics,
    • Less YES First, and
    • Divide by YES and Query
  • Memorization: It uses a database to record the answers of the oracle. This can be used intra- and inter sessions.
  • Front-End / Back-End: The front-end of DDJ creates a Java Vistual Machine, and it executes the program. As a result, an Execution Tree is constructed. The back-end is completely independent of the front-end, and thus, it could be used with other languages.
  • Accepted Answers: The following answers are accepted by the debugger:
    • Yes, (when the equation is correct)
    • No, (when the equation is wrong)
    • I Don’t Know, and (to skip this question)
    • Trusted. (when the equation is trusted)
  • ET Exploration: The back-end allows the user to freely explore the execution tree. It also allows to combine different strategies.
  • ET optimization transformations: The technique implements different transformation to optimize the execution tree before debugging. Some transformations implemented are: Tree Compression, Loop Expanssion and Tree Balancing.
  • Undo: It allows us to undo a wrong answer.
  • Trusting: It is possible to trust functions.
  • GUI: The back-end has a graphical user interface which allows to collapse and expand subcomputations.
  • Debugging With Uncompleted ETs. The debugger allows to start a debuging session even before the whole ET has been produced. The debugging session can start as soon as the first ET node is completed.

Advantages

It collects all the computations performed during the execution of the program and the programmer only has to answer the questions performed by the debugger in order to find a bug. The questions are of the form: Executing this routine with this inputs should obtain these outputs? or in other words: Does this routine behaves as expected?