Version française
Home     About     Download     Resources     Contact us    
Browse thread
Inspect and dump values on the OCaml heap
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Kaspar Rohrer <kaspar.rohrer@g...>
Subject: Re: [Caml-list] Inspect and dump values on the OCaml heap
On Apr 15, 2010, at 12:45 AM, Richard Jones wrote:
> Graphviz output is interesting, but I would add that such a thing
> exists as the 'Std.dump' function in extlib.

The last time I've checked, Std.dump had several shortcomings. It did not handle cycles in the object graph that well (that's probably an understatement, it did not print much information about some value types (e.g. custom, closure).
I tried to remedy that in my library. I also do not try to interpret the values (e.g. lists are printed as either 0 or (BL0#2 hd tl) ). The library simply dumps the object graph, with references or links where appropriate or needed.

I will go into more detail if anybody is interested, but right now I just want to get the code out there.

In the meantime, there are two sample pictures of graphviz dumps on my personal blog: http://lambdamuesli.blogspot.com/ (I apologize for the shameless plug)