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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 55242D45F for ; Sat, 5 Nov 2005 23:33:21 +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 jA5MXKwF018191 for ; Sat, 5 Nov 2005 23:33:20 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA26399 for ; Sat, 5 Nov 2005 23:33:20 +0100 (MET) Received: from mz3.forethought.net (mzpi5.forethought.net [216.241.36.14]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA5MXHL0013199 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 5 Nov 2005 23:33:19 +0100 Received: from [216.241.35.41] (helo=[10.0.0.2]) by mz3.forethought.net with esmtp (Exim 4.51) id 1EYWb6-0005Fw-Pn for caml-list@inria.fr; Sat, 05 Nov 2005 15:33:16 -0700 Message-ID: <436D3343.3020809@gushee.net> Date: Sat, 05 Nov 2005 15:33:39 -0700 From: Matt Gushee User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051002) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Testing Camlp4-generated code Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 436D3330.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 436D332E.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; hashtbl:01 mutable:01 bool:01 ...:98 abstract:01 defined:01 data:02 data:02 instances:02 implemented:02 output:02 output:02 string:03 string:03 module:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 I have developed a tool that generates a module using Camlp4, and I would like to be able to test the output. The structure is fairly small and simple, so it should be sufficient to verify that a generated module is equivalent to a certain hand-coded module ... but is there a reliable way to do that? If it makes a difference, the output consists mainly of two values: a data structure which is of an abstract type, and an object. The former is implemented as follows: type data = S of string | L of string list | D of t and t = { data : (string, data) Hashtbl.t; mutable locked : bool; } and the latter is an immediate object, but it inherits from a class defined in another module. The object is associated with two instances of the above type, has public methods that get and set values, and may contain one or more sub-objects similar to itself. Thanks in advance for any suggestions. -- Matt Gushee Englewood, CO, USA