<vincenz>
No I was just curious on how it was done
<vincenz>
But in this case the executables must not be EXACTLY the same, msuit they?
<Submarine>
Well, I suspect that in native code, marshalling works by marshalling the adress inside the code or similar.
<Submarine>
Generally speaking, marshalling of closures is fairly restricted.
<Submarine>
Problem: objects contain closures.
<vincenz>
you mean oop objects?
<vincenz>
The reason I was curious is because I was curious to see how easy it would be to make some library that distributes a computationally intensive thing over multiple computers (let's say a func x must be called n times and the results must be combined afterwards)
<vincenz>
Astree is pretty impressive :)
<vincenz>
Quite interesting
<Submarine>
oop objects yeah
<Submarine>
Afaik, they're internally records w/ closures for the methods.
<Submarine>
vincenz: That's exactly what we do in ASTREE
<Submarine>
except it's experimental
<Submarine>
we do a repartition over several computers, each computer forking processes
* vincenz
wishes he could find a c++ parser to ast written in ocaml (one that does templates)
<Submarine>
We have a C one, not C++.
<vincenz>
I'll surf around some more
<vincenz>
I found a c++ parser (wonder above wonder) named elsa
<vincenz>
if I can't find an ocaml one I can always parse it's output
<vincenz>
(or write wrappers
<vincenz>
)
<Submarine>
The best way to write a parser is to take the ISO spec of the lan guage,
<Submarine>
There's an informative section about syntax.
<Submarine>
Just translate it to ocamlyacc.
<vincenz>
I'm not a CS buff
<Submarine>
[of course for C there's a lexical tie-in]
<vincenz>
plusI doubt a simple translation to ocamlyacc wil lwork
<monotonom>
I do not agree it is the best way. I agree it is the most correct way. It is not best in terms of effort spent.
* vincenz
nods
<monotonom>
Ah well, if there is no ocamlyacc or happy version in circulation, I guess you have to do it the hard way.
<vincenz>
but maybe ther'es a parser in another lang whose output can be parsed
<monotonom>
Yes true. Is there one that emits xml for example? :)
<vincenz>
WOW
<vincenz>
By default, Elkhound generates a parser in C++. By specifying
<vincenz>
option lang_OCaml;
<vincenz>
And there's a thing built on top of elkhound which can parse c++