Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Caml Machine and GP
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Caml Machine and GP
> I work on genetic programming with typed terms. I would like to use
> OCaml bytecode-system to run my programs.

If I understand correctly your needs, there are two approaches that
don't involve hacking the OCaml system to death:

1- The pedestrian approach: pretty-print your programs in OCaml syntax
to a file, invoke the "ocamlc" compiler with Sys.command,
then dynamically load the compiled bytecode using the Dynlink library.

2- The principled approach: have a look at MetaOCaml
(http://www.cs.rice.edu/~taha/MetaOCaml/), which provides clean
mechanisms for meta-programming in Caml, i.e. manipulating and
executing Caml code from within Caml programs.

Hope this helps,

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners