Version française
Home     About     Download     Resources     Contact us    
Browse thread
DSL for handling parsing binary memory structures?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] DSL for handling parsing binary memory structures?
On Thu, May 17, 2007 at 10:21:57PM +0100, Richard Jones wrote:
> 
> 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.

I had a play with some code to do this.  A write-up of my experiment
is here:

http://et.redhat.com/~rjones/hvcalls/

Rich.

-- 
Richard Jones
Red Hat