From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id CC6FEBC57 for ; Thu, 15 Apr 2010 01:23:14 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuADADLrxUtIDtyaimdsb2JhbACRRIoPCBUBAQEKCQwHDwUfrHOBcIV+LohNAQEDBYUIBA X-IronPort-AV: E=Sophos;i="4.52,208,1270418400"; d="scan'208";a="48502015" Received: from fg-out-1718.google.com ([72.14.220.154]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Apr 2010 01:23:14 +0200 Received: by fg-out-1718.google.com with SMTP id e12so248825fga.3 for ; Wed, 14 Apr 2010 16:23:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=DHgurtyV1G1a1G6ub3BixPlIImqUxTyW45uZqlL9HLA=; b=DkXVvnPPwF3dFxQBVgiJGEc0r3IBSDeAjSPP7JiNO7t7aE33+1letgFjVDocFDYiam 372JF/2hkTC79N3SxO8h5EzVPPTrpK3Sgs4pgAiPMKklLSzEWjTDEsky5Aha9wff2V0j 0RA90rMJU5IJcx0biDtSfPnoyaBXxitvRHiR8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=Yb//htOQknYVRpxD4xl/shqmwO1Py44uuUi5EZK2jtV50cTeBdczeTmDXxctOvUes9 xGIdkrED/cbhXee4I10CB5zeM1xnGPHj3V0gesL1cEr6+DjLvHPxkjF+Oo7fqbCKo4MJ p2AENpVm9HIM51hoteAipXEZ7gQ+2xhINR4g8= Received: by 10.86.6.16 with SMTP id 16mr6502665fgf.55.1271287393972; Wed, 14 Apr 2010 16:23:13 -0700 (PDT) Received: from [192.168.2.3] (77-57-172-115.dclient.hispeed.ch [77.57.172.115]) by mx.google.com with ESMTPS id 4sm617685fgg.12.2010.04.14.16.23.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 14 Apr 2010 16:23:13 -0700 (PDT) Subject: Re: [Caml-list] Inspect and dump values on the OCaml heap Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Kaspar Rohrer In-Reply-To: <20100414224529.GA24089@annexia.org> Date: Thu, 15 Apr 2010 01:23:09 +0200 Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: quoted-printable Message-Id: References: <3FB04EDC-37F4-4336-A435-13ACF038051D@gmail.com> <20100414224529.GA24089@annexia.org> To: Richard Jones X-Mailer: Apple Mail (2.1077) X-Spam: no; 0.00; ocaml:01 graphviz:01 graphviz:01 blog:98 wrote:01 graph:01 graph:01 heap:01 caml-list:01 closure:01 output:02 interpret:03 std:03 library:03 library:03 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)