[Haskell-cafe] Program for displaying graph state in lambda interpreter?

Benjamin Redelings I benjamin.redelings at duke.edu
Sat Jun 2 14:18:42 CEST 2012


On 06/01/2012 05:07 PM, Sean Leather wrote:
> Hi Benjamin,
>
> On Fri, Jun 1, 2012 at 9:54 PM, Benjamin Redelings wrote:
>
>        I have written an interpreter that operates on the lambda
>     calculus augmented with letrec, constructors, case, primitive
>     objects, and builtin operations.  I'd like to display the internal
>     state of the intepreter at various points so that I can, um, debug
>     the "programs" that I've written.
>
>        Currently I've got about 3500 nodes, and I'm dumping a graph
>     that I format using the 'dot' program in graphviz. 
>
> [...]
>
>        However, it would be nice to know of any programs that are
>     better suited for this.  For example, if I could write <>*<> and
>     draw arrows from the placeholders "<>" to the memory location
>     being referenced, that would be easier to read.  This is done here
>     http://en.wikibooks.org/wiki/Haskell/Graph_reduction to illustrate
>     that 'square (1+2)' doesn't evaluate 1+2 twice.  Any ideas?
>
>
> This may not answer your question, but it might be related and/or helpful:
>
> http://rochel.info/#graph-rewriting
>
> Regards,
> Sean
Thanks Sean,

     The note on Very Lazy evaluation was quite interesting.

     I can't directly use the graph rewriting libraries, though, since 
the interpreter is written in C++.

-BenRI
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120602/c1b20122/attachment.htm>


More information about the Haskell-Cafe mailing list