[Hat] GUI for Hat

Peter Nuttall p.s.nuttall at durham.ac.uk
Fri Jul 28 12:59:24 EDT 2006


Hello all, 

I'm doing my dissertation on writing a GUI for hat, and Neil Mitchell
suggested I send a mail saying what i was planning to see if you guys
had any good ideas or comments. This is the proposal:

The problem

Hat provides a easy way to generate a trace, and various tools have
been developed to examine the traces produced by it. However, these
tools have two main flaws: They are hard to learn and use and they are
not linked together. Ideally we would like hat to be as easy to use as
possible. This way it can both be used to debug real programs by Haskell
programmers, but can be used as a teaching tool for beginners, so they
can see how lazy evaluation works and find simple bugs when they write
their first programs.

The solution

Write a graphical user interface to Hat. A clickable GUI will be easier to
use than a ncurses GUI, and will seem easier to use. The
GUI will provide the same functionality as the hat tools do already,
but it will be easier to use. This will be done by separating out the
current user interface from the functionality as much as possible, then
making the functionality into a library. As part of this, I will try and
upgrade the tools to use the new tracing library written by Tom Shackell.

The GUI's will be implemented in GTK2HS . It will consist of a Window
with tabs for each tool. Neil Mitchell has already constructed a GUI,
and I plan to use this as a starting point.

The tools that will be usable though the GUI will be:

Search

This will let the user search though all the functions called, and see
that function.s inputs and output. The UI will be based on that of JuK,
with searching using haskell.s pattern matching syntax.

Monad

A step over debugger for do blocks. This will be similar to normal
debuggers

Stack.

When loading a a trace that has terminated with an error, the GUI
will show a listing of the last functions called and their inputs and
outputs. It will collapse any loops.

Cover

It will use hs-colour to try and show which functions are being used
for a set of inputs. If the new tracing library is used, and it supports
taking the union of traces, this will be used to show coverage from lots
of traces. This can be tied into quickcheck.


Ethereal bit.

Ethereal is a tool for examining network traffic, and my plan is to
. borrow from it's "follow TCP stream" feature, which shows you all the
traffic in a stream, and lets you see messages and replies. It will
show text moving in and out of handles, and display the logical time
between messages. 

Display bit.

This will allow the user to see how redexes happen and allow the use to
see laziness in action. This will be based on hat-amin. It is dependent
on writing a good graph drawing function.

algorithmic

This will be a normal algorithmic debugger,  though I haven.t thought
of how it will work in a GUI.

Any suggestions, comments?

Pete





More information about the Hat mailing list