caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kaustuv Chaudhuri <kaustuv.chaudhuri@gmail.com>
To: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Inspect and dump values on the OCaml heap
Date: Thu, 15 Apr 2010 04:09:02 +0200	[thread overview]
Message-ID: <n2tf02e7f931004141909rce52bc29i29786b88c8ba8689@mail.gmail.com> (raw)
In-Reply-To: <3FB04EDC-37F4-4336-A435-13ACF038051D@gmail.com>

On Wed, Apr 14, 2010 at 5:02 PM, Kaspar Rohrer <kaspar.rohrer@gmail.com> 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.

  http://www.lix.polytechnique.fr/~kaustuv/misc/ocaml_show.html

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


  parent reply	other threads:[~2010-04-15  2:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14 15:02 Kaspar Rohrer
2010-04-14 22:45 ` [Caml-list] " Richard Jones
2010-04-14 23:23   ` Kaspar Rohrer
2010-04-15  0:40     ` Martin Jambon
2010-04-15  5:19     ` rixed
2010-04-15  2:09 ` Kaustuv Chaudhuri [this message]
2010-04-15  5:31   ` rixed
2010-04-15  5:42   ` Martin Jambon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=n2tf02e7f931004141909rce52bc29i29786b88c8ba8689@mail.gmail.com \
    --to=kaustuv.chaudhuri@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).