/usr/bin/hat-delta
hat-delta1
Find a bug by algorithmic debugging, with delta debugging optimisations.
Usage
hat-delta [-chv]
[-d
depth]
[-f
heuristicFunction]
[-s
sliceDepth]
prog
[.hat]
Overview
hat-delta is an interactive tool for finding bugs in the trace of a Haskell program prog supplied as its argument. The user must answer a sequence of yes/no questions. Each question asked by hat-delta concerns the reduction of a function application to a value. You answer yes if the reduction is correct with respect to your intentions, and no otherwise. After a number of questions hat-delta reports an example equation which is the cause of the observed faulty behaviour - that is, which function definition is incorrect.
Options
-
-c -
Disable compression of the EDT based on reporting the same answer for several questions.
-
-d depth -
Set the maximum depth hat-delta will consider making a jump into the EDT.
-
-f function -
Set the heuristic function that hat-delta should use. Heuristic functions are input in the form of a Haskell data structure as discussed in the Heuristic functions section.
-
-h -
Display help message and exit.
-
-s sliceDepth -
Set the number of child connections hat-delta will follow when generating a program slice.
-
-v -
Print hat-delta's version number, and exit.
Interactive commands
The hat-delta browser asks you questions, so the basic mode of interaction is to type answers:
yes-
Yes, the equation looks correct by my understanding of the meaning of the function.
no-
No, the equation looks incorrect. Given the displayed arguments, the function is returning the wrong result.
The following other commands are available. They each begin with a colon.
:show-
Show the EDTs hat-detect is currently searching for bugs
:quit-
Exit the interactive tool.
:help-
Shows help text giving an overview of the commands available.
:source-
Shows (in a separate window) the source code for the reduction currently being queried.
:anim-
Start the hat-anim browser in a new window, beginning with the currently queried rediction.
:delta-
or
:splitStart the hat-delta browser in a new window, beginning with the currently queried reduction.
:detect-
Start the hat-detect browser in a new window, beginning with the currently queried reduction.
:explore-
Start the hat-explore browser in a new window, beginning with the currently queried reduction.
:trail-
Start a hat-trail browser in a new window, beginning with the currently queried reduction.
:set-
Set an option in the form `:set option value`. Options are:
depthLimitSet the maximum depth hat-delta will consider making a jump into the EDT. Must be greater than 0.sliceDepthSet the number of child connections hat-delta will follow when generating a program slice. Must be positive. A depth of 0 indicates that the whole function definition should be used as a slice.heuristicSet the heuristic function, as described in the Heuristic functions section.
Heuristic functions
Heuristic functions calculate an estimate of how likely a particular program slice is to be the buggy one. They may be specified by the user in the form of a Haskell data structure using the following constructors.
|
Constant 0.0 |
|---|---|
|
Constant 1.0 |
|
The number of correct evaluations of the slice. |
|
The number of incorrect evaluations of the slice. |
Add f1 f2
|
Add the values of f1 and f2. |
Negate f
|
Negate the value of f. |
Multiply f1 f2
|
Multiply the values of f1 and f2. |
Invert f
|
Invert the value of f. |
If no heuristic is specified, the system will use Negate (Multiply Correct (Invert (Add Correct Incorrect))).
Files
Releases
Unchanged in 2 releases since Debian 4.0 (Etch).