Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2010-04-15 (02:09)
From: Kaustuv Chaudhuri <kaustuv.chaudhuri@g...>
Subject: Re: [Caml-list] Inspect and dump values on the OCaml heap
On Wed, Apr 14, 2010 at 5:02 PM, Kaspar Rohrer <> wrote:
> [...]

Implementing dumpers seems like a teething procedure for
OCaml hackers. Here's my own attempt from a couple of years ago.
It handles cycles, renders SVGs (via Graphviz), and can accept
data structure "descriptions" to produce better names for the
internal nodes. It is almost 100% OCaml.

I am convinced that such things have *no* usefulness. If you
are trying to debug your data structure, state its global
invariants, prove (at whatever level of formality you are most
comfortable with) that all API functions preserve the invariants,
and use the module system to hide functions that do not
preserve them. You will be done faster than trying to make
sense of graphs and your code will be better.

-- Kaustuv