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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 87D97BC58 for ; Tue, 12 Oct 2010 11:48:56 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An4BAPXLs0zRVdivkGdsb2JhbAChSggVAQEBAQkJDAcRAx+hS4lKghiGfC6IVgEBAwWFQwSKQYVp X-IronPort-AV: E=Sophos;i="4.57,319,1283724000"; d="scan'208";a="73190866" Received: from mail-qy0-f175.google.com ([209.85.216.175]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 Oct 2010 11:48:56 +0200 Received: by qyk30 with SMTP id 30so604019qyk.6 for ; Tue, 12 Oct 2010 02:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=/95FomdMFNlyQfegG4eNyFWrLW1Ba1K6IN9x/iTU2i0=; b=iy6k44HxWWkrmvx40ElCn0xlPMxG020CeYVFZNAoossi5YvvQ+FHUARKkjk0jKIXYr /pE/hLMcM2AZBmseb+8UkDwUCkPS9DfIqNPcag0dgHKcpp5YtfuBUUBYuLYxW6exFkJe nRjSf16UAW5TaiNThTjCZFBIizEHIGNl+Gl/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=CgDP/aEEOUtgoMVJBBYfe2gI0aQpEG9xP3aJ8u23mWM9h0rk2yNEHVGsbVB3TtuAiK xFU1DH4w1A5y8/6hm2hjdXLcfUBy146etzxw3meCNJRwAWDPFfiym/qwj9nq745F+0nl lBSonCi7fFVas9CQC7JbmTYESfTgVhh70s02Q= MIME-Version: 1.0 Received: by 10.229.229.194 with SMTP id jj2mr6053467qcb.269.1286876934404; Tue, 12 Oct 2010 02:48:54 -0700 (PDT) Received: by 10.229.105.141 with HTTP; Tue, 12 Oct 2010 02:48:54 -0700 (PDT) In-Reply-To: References: <1286545686.19478.40.camel@bohrium.pps.jussieu.fr> <1286875570.30240.30.camel@bohrium.pps.jussieu.fr> Date: Tue, 12 Oct 2010 11:48:54 +0200 Message-ID: Subject: Re: [Caml-list] Marshalling question From: Alexey Rodriguez To: Julien Signoles Cc: Mathias Kende , caml users Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; marshalling:01 pitfalls:01 cheers:01 signoles:01 signoles:01 nodes:01 nodes:01 node:01 node:01 lri:01 mathias:98 mathias:98 equality:01 wrote:01 faq:01 Julien, Mathias, Thanks for the detailed description of this issue. Mathias, we use the same solution: concrete graphs and explicit identifiers so we do not suffer from the deserialization issue. Good to know about the pitfalls of abstract graphs though. Cheers, Alexey On Tue, Oct 12, 2010 at 11:42 AM, Julien Signoles wrote: > > > 2010/10/12 Mathias Kende >> >> To represent "abstract" graphs (those were the >> equality for the nodes type is not used to check if two nodes of a graph >> are the same), the library uses an internal counter. This counter must >> be serialised along with the graphs and then it must be updated >> correctly when graphs are unserialised to avoid creating a node with the >> same identifier than o node in the unserialised graphs. >> >> This is explained in the FAQ : >> http://ocamlgraph.lri.fr/FAQ > > I didn't remember myself that the OcamlGraph FAQ contains a section about > that ;-). > >> But I bielieve that the FAQ got it wrong in case multiple graphs are >> unserialised, or nodes are created before the unserialisation of other >> nodes. In these situation using concrete graphs, which do not suffer >> from this problem, is certainly easier (as advertised by the manual). >> And I manually add identifiers to the nodes if I need many nodes with >> the same label. > > Of course you're right (see also my own answer to Alexey) : I will update > the OcamlGraph FAQ accordingly. > > Thanks, > Julien > >