Implementing typed intermediate languages

  • Authors:
  • Zhong Shao;Christopher League;Stefan Monnier

  • Affiliations:
  • Dept. of Computer Science, Yale University, New Haven, CT;Dept. of Computer Science, Yale University, New Haven, CT;Dept. of Computer Science, Yale University, New Haven, CT

  • Venue:
  • ICFP '98 Proceedings of the third ACM SIGPLAN international conference on Functional programming
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Recent advances in compiler technology have demonstrated the benefits of using strongly typed intermediate languages to compile richly typed source languages (e.g., ML). A type-preserving compiler can use types to guide advanced optimizations and to help generate provably secure mobile code. Types, unfortunately, are very hard to represent and manipulate efficiently; a naive implementation can easily add exponential overhead to the compilation and execution of a program. This paper describes our experience with implementing the FLINT typed intermediate language in the SML/NJ production compiler. We observe that a type-preserving compiler will not scale to handle large types unless all of its type-preserving stages preserve the asymptotic time and space usage in representing and manipulating types. We present a series of novel techniques for achieving this property and give empirical evidence of their effectiveness.