About 7 years ago such a tool existed:

http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/GHood/

GHood was never intended to visualize graph reduction
directly (*). instead, it visualized observations - ie, you
could see if and when which parts of an observed data
structure was inspected during a program run, but not
the reductions themselves, and definitely not sharing as
in the cyclic programming example earlier in this thread.

GHood was very helpful in visualizing some aspects of
non-strict evaluation, and its main advantage over Hood
was in observing relative strictness, dynamically: you could not only see which parts of an observed data
structure were used at all, but by observing both the
input and the output of a function, you could see the
demands for the output drive the demands for the
input. very useful for spotting strictness bugs, such
as demanding too much of the input too early, instead
of just as much as needed to produce just as much as
used for producing the output. see the example applets
on that GHood page.

claus

(*) it was, however, the lack of reduction animation
in haskell implementations that kept me looking for such opportunities (i had grown up, functionally, with the kiel reduction systems, and their built-in support for displaying and editing intermediate reduction results, with higher-order functions, free variables, avoiding name clashes, and all, and was missing all that support in the supposedly more modern world of haskell..) an earlier, simpler, example was the use of overloading to visualize intermediate expressions, so you could see the difference between foldr and foldl, etc:

http://www.cs.kent.ac.uk/people/staff/cr3/toolbox/haskell/R.hs

btw, in one of the previous incarnations of this thread,
Wolfram Kahl used the HOP System to generate
graphical traces of term-graph reductions:

http://www.cas.mcmaster.ca/~kahl/HOPS/


_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to