Version française
Home     About     Download     Resources     Contact us    
Browse thread
Running bytecode...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alex Baretta <alex@b...>
Subject: Re: [Caml-list] Running bytecode...
Jonathan Roewen wrote:
>>The short answer is you can't. It's a pity, but to the present day the
>>vanilla Ocaml distribution does not support mixing native and byte-code.
>>Also, it is not possibile to Dynlink native code, which is even more of
>>a pity.
> 
> 
> Well, dynlink with native code probably isn't desirable, as can't
> really verify it.

Actually, this is very desirable. Ask Jon Skaller, who is developing the
Felix language mainly because Ocaml does not have this feature. It also
very desirable to us for the AS/Xcaml project, where server side
applications (Xlets) are dynlinked upon client request for their
execution. In order to run a native instance of an AS/Xcaml application,
the code for all the relevant xlets must be statically linked into the
xcaml daemon.

Scaml does this, but there is no correctness proof for it. It is a patch
to 3.07. Unluckily Xavier wants to have an provably perfect solution to
this problem, which is definitely a good thing, but this delays such a
great feature as native dynlink.

> How about embedding the bytecode interpreter in an ocaml native
> program? How would one go about that?


This is exactly what Asmdynlink did. It was a bytecode interpreter
written in Ocaml and ideally compiled with Ocamlopt. I do not believe
that is has been ported to 3.08, though.


Alex

-- 
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>