From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C63FABB81 for ; Thu, 11 Nov 2004 17:23:33 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iABGNXFU020531 for ; Thu, 11 Nov 2004 17:23:33 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA17871 for ; Thu, 11 Nov 2004 17:23:32 +0100 (MET) Received: from mail.davidb.org (adsl-64-172-240-129.dsl.sndg02.pacbell.net [64.172.240.129]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iABGNUEJ020517 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 11 Nov 2004 17:23:32 +0100 Received: from davidb by mail.davidb.org with local (Exim 4.42 #1 (Debian)) id 1CSHjN-0005a8-6V; Thu, 11 Nov 2004 08:23:29 -0800 Date: Thu, 11 Nov 2004 08:23:29 -0800 From: David Brown To: Alex Baretta Cc: Ocaml Subject: Re: [Caml-list] Native executable symtable Message-ID: <20041111162329.GA21287@old.davidb.org> References: <41933C5E.2010008@baretta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41933C5E.2010008@baretta.com> User-Agent: Mutt/1.5.6i X-Miltered: at concorde with ID 41939205.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41939202.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 caml-list:01 symtable:01 baretta:01 wrote:01 binary:01 type-safety:01 makefile:01 byte-code:01 cmi:01 structures:01 structures:01 marshal:01 compile:01 interfaces:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: On Thu, Nov 11, 2004 at 11:18:06AM +0100, Alex Baretta wrote: > We are writing a library implementing binary client-server protocol > based on the Marshal module. In order to guarantee some degree of > type-safety, during the handshaking phase of the communication we need > the client to send the server the MD5 checksums of all relevant modules. > The server process must verify that it has all the mentioned modules and > that the checksums are consistent with its own. As long as all of the relevant data structures are exported from some module, the extract_crc utility (which gets install in the library directory), can generate all of the CRC. It needs to be run at compile time, but can reasonably easily be put into makefile rules. It just becomes one additional module. Getting the order right is a bit tricky, since it becomes something that depends on many interfaces, some of which have implementations that depend on the crc module itself. So, many of the auto-dependency and order generators won't work. This method should be any different between native and byte-code, since the CRC is generated based on the .cmi file which will always be the same. The only dependence is that you export the relevant data structures. Dave