[MLton] HOL's Moscow ML implementation, and pushing MLton to emulate it

Daniel C. Wang danwang@CS.Princeton.EDU
Thu, 07 Apr 2005 14:20:28 -0400


Stephen Weeks wrote:
>
> A while ago, I read Nick Benton's paper
> (http://mlton.org/References#Benton05) and really liked it, but if I
> recall correctly, its solution to the problem involved coercions.
> These are slow because they take time proportional to the size to the
> data structure being coerced.  Plus, there are difficulties with
> sharing (I don't remember if the paper adequately addressed those).

Here's a paper that does to some extend :)
  http://www.cs.princeton.edu/~danwang/drafts/recursion-schemes.pdf

The basic idea is to use the partial unboxing techqiues that Shao describes 
for compiling polymorphic data-structures...

Basically, you lazily coerce the "head" of the data structure into a 
universal rep as you need to traverse...

I think many of the compliation boxing/unboxing tricks for compiling ML 
style polymorophim efficently into uniform machine representations can be 
used for the interpreter problem. It is in fact the same problem.