[MLton] flattening

Lukasz S Ziarek lziarek@cs.purdue.edu
Tue, 24 Feb 2004 10:47:32 -0500 (EST)

Dear All Mlton users,

I have recently finished coding up a new flattener that will flatten
arbitrarily nested tuples. It is a two pass flattener, consisting of a
labeling algorithm (which can be changed), and a flattening algorithm
which flattnes based on a labeling of a program. I have also added a
simple flag (-flatten {true|false}) which enables my flattener. The
current scheme is to label all tuples as flat. Whenever we flatten a tuple
we also emit coercion statements to build back up the tuple, effectively
passing around both a flat and a non flat version of the tuple. The
shrinker will then eliminate any unecessary variables that we have emitted.
Right now I am trying to run the benchmark suite with my flattening
algorithm to see what this brute force flattening yields. Where would I
pass my -flatten true flag in the makefile for the benchmarks?

Hopefully, if there are no sneaky bugs left, I should have some initial
results for everyone shortly. Over the weekend I plan to sart writting a
paper about our flattening ideas. If there is interest I can post a
summary of the changes as well as our ideas.