@TechReport{shao97:_flexib_repres_analy,
  author =	 {Zhong Shao},
  title =	 {Flexible Representation Analysis},
  institution =	 {Yale University},
  year =	 1997,
  number =	 {YALEU/DCS/TR-1125},
  month =	 {April},
  abstract =	 {Statically typed languages with Hindley-Milner
                  polymorphism have long been compiled using
                  inefficient and fully boxed data
                  representations. Recently, several new compilation
                  methods have been proposed to support more efficient
                  and unboxed multi-word
                  representations. Unfortunately, none of these
                  techniques is fully satisfactory. For example,
                  Leroy's coercion-based approach does not handle
                  recursive data types and mutable types well. The
                  type-passing approach (proposed by Harper and
                  Morrisett) handles all data objects, but it involves
                  extensive runtime type analysis and code
                  manipulations. \par This paper presents a new
                  flexible representation analysis technique that
                  combines the best of both approaches. Our new scheme
                  supports unboxed representations for recursive and
                  mutable types, yet it only requires little runtime
                  type analysis. In fact, we show that there is a
                  continuum of possibilities between the
                  coercion-based approach and the type-passing
                  approach. By varying the amount of boxing and the
                  type information passed at runtime, a compiler can
                  freely explore any point in the continuum--choosing
                  from a wide range of representation strategies based
                  on practical concerns. Finally, our new scheme also
                  easily extends to handle type abstractions across
                  ML-like higher-order modules. \par }
}

