From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 26252BC0A for ; Thu, 17 May 2007 23:21:59 +0200 (CEST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4HLLwpw015243 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Thu, 17 May 2007 23:21:58 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1HonQ5-0005F7-00 for ; Thu, 17 May 2007 22:21:57 +0100 Date: Thu, 17 May 2007 22:21:57 +0100 To: caml-list@inria.fr Subject: DSL for handling parsing binary memory structures? Message-ID: <20070517212157.GA20085@furbychan.cocan.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i From: Richard Jones X-Miltered: at discorde with ID 464CC776.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parsing:01 ocaml:01 alignment:01 bitfields:01 accessors:01 binary:01 binary:01 structures:02 structures:02 size:95 problem:05 structure:06 describe:06 red:92 memory:08 I wonder if anyone has thought about or developed a domain-specific language in OCaml for handling the processing of binary structures? I was thinking of writing something to make system calls into the Xen hypervisor. The main problem is that the hypervisor takes & returns binary structures which have very precise size / alignment requirements, bitfields, etc. (and the requirements change with versions of the hypervisor). It sounds like the ideal use for a DSL to describe the binary structure of each version of each call and automatically build accessors. Rich. -- Richard Jones Red Hat