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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id B6415BBAF for ; Tue, 12 Oct 2010 11:26:52 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcBAEfHs0yGnQCBlGdsb2JhbACDH54zFQEBAQEJCwgJEQMfqneSWoEigzJ0BI1E X-IronPort-AV: E=Sophos;i="4.57,319,1283724000"; d="scan'208";a="72360526" Received: from shiva.jussieu.fr ([134.157.0.129]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Oct 2010 11:26:48 +0200 Received: from hydrogene.pps.jussieu.fr (hydrogene.pps.jussieu.fr [134.157.168.1]) by shiva.jussieu.fr (8.14.4/jtpda-5.4) with ESMTP id o9C9QkMU035171 ; Tue, 12 Oct 2010 11:26:46 +0200 (CEST) X-Ids:166 Received: from [134.157.168.107] (bohrium.pps.jussieu.fr [134.157.168.107]) by hydrogene.pps.jussieu.fr (8.13.4/jtpda-5.4) with ESMTP id o9C9Qjsx015102 ; Tue, 12 Oct 2010 11:26:45 +0200 Subject: Re: [Caml-list] Marshalling question From: Mathias Kende To: Alexey Rodriguez Cc: caml users In-Reply-To: References: <1286545686.19478.40.camel@bohrium.pps.jussieu.fr> Content-Type: text/plain; charset="UTF-8" Date: Tue, 12 Oct 2010 11:26:10 +0200 Message-ID: <1286875570.30240.30.camel@bohrium.pps.jussieu.fr> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 Content-Transfer-Encoding: 8bit X-Miltered: at jchkmail.jussieu.fr with ID 4CB429D6.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 4CB429D6.000/134.157.168.1/hydrogene.pps.jussieu.fr/hydrogene.pps.jussieu.fr/ X-Spam: no; 0.00; marshalling:01 0200,:01 nodes:01 nodes:01 node:01 node:01 lri:01 cheers:01 mathias:98 mathias:98 equality:01 faq:01 faq:01 abstract:01 graph:01 Le mardi 12 octobre 2010 à 10:42 +0200, Alexey Rodriguez a écrit : > Mathias, can you elaborate on "additional care"? We are using the > functional graphs from ocamlgraph, so I am very interested in your > experiences with it. There is not much to say. 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 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. Mathias > > Cheers, > > Alexey