[MLton-devel] grant proposals

Matthew Fluet fluet@CS.Cornell.EDU
Mon, 22 Jul 2002 10:26:30 -0400 (EDT)


Two other projects that might be interesting.  We always say that the SSA
IL is great for implementing traditional (i.e., imperative) optimizations.
It would be nice to incorporate some specifically functional
optimizations.  In particular, I've thought that deforestation of some
sort would be nice.  (I've seen examples in SSA CFGs where lists are
reversed twice; List.rev o List.map will produce this because the
implementation of List.map in the basis ends by reversing the folded
list.)  This is probably more practical in MLton than in other strict
language implementations because enough effect inference can be performed.
Even better, though, would be to know when effects can be reordered
without changing program behaviour.  For example, we should be able to
fuse
List.foldl (op +) 0 (List.map (fn x => 2 * x) l)
into
List.foldl (fn (x,s) => 2 * x + s) 0 l
even in the presence of the overflow exceptions because the context can't
distinguish where the overflow was raised. 

Another area might be to incorporate compile-time garbage collection in a
type-safe manner in the SSA/RSSA IL.  For example, the intermediate list
in the implementation of List.map is immediately reversed (and then is
dead). It would be nice to do the reverse just by pointer reversals,
rather than allocating a new list.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel