[MLton-user] Fwd: Plans for pickling in MLton?

Matthew Fluet fluet at tti-c.org
Wed Oct 31 17:19:00 PST 2007


On Mon, 15 Oct 2007, Roland Olsson wrote:
> Matthew writes:
>> defunctionalization, the natural serialization of a closure doesn't
>> include any code.  Hence, the closure could only be deserialized in
>> another instance of the same program that created the closure; i.e., you
>> can't send code from one program to another program in any meaningful way.
>
> The OCaml solution is to require that only copies of the same binary
> serialize and deserialize objects, which is sufficient for a "single
> binary / multiple data" programming model such as in MPI and PVM. It may
> then be possible in MLton to include function pointers in objects to be
> transmitted, which has been possible in OCaml for a few years already.

What does OCaml do if the serialized function closures include mutable 
reference cells?  And, more importantly, what happens when you deserialize 
multiple function closures that each include the same mutable reference 
cell?  Do the deserialized functions share the cell?

You might look at the AliceML project/language.  It includes very 
sophisticated pickling of code.

> I noticed that Matthew is also working on the Manticore project. Could
> Manticore be suitable not only for many-core processors but also for a
> cluster of say 32 PCs, each with a multi or many core processor?

Not really.  Manticore focuses on single machine, multiple processors. 
The distributed model of a cluster of (single- or multi-core) PCs is very 
different, and one would make different design decisions in that 
environment.



More information about the MLton-user mailing list