Colored Local Type Inference

Martin Odersky, Matthias Zenger, Christoph Zenger, EPFL Lausanne

Proc. ACM Symposium on Principles of Programming Languages, 2001.

Abstract

We present a type system for a language based on $F_\subtp$, which allows certain type annotations to be elided in actual programs. Local type inference determines types by a combination of type propagation and local constraint solving, rather than by global constraint solving. We refine the previously existing local type inference system of Pierce and Turner\cite{pierce-turner:popl98} by allowing partial type information to be propagated. This is expressed by coloring types to indicate propagation directions. Propagating partial type information allows us to omit type annotations for the visitor pattern, the analogue of pattern matching in languages without sum types.

Paper

in .ps or .ps.gz or .pdf

BibTeX Entry

@InProceedings{ozz:colored-local,
  author = 	 {Martin Odersky and Matthias Zenger and Christoph Zenger},
  title = 	 {Colored Local Type Inference},
  booktitle = 	 {Proc. ACM Symposium on Principles of Programming Languages},
  year =	 2001,
  pages =        {41-53}
}

Martin Odersky
Last modified: Tue May 14 14:04:09 DST 2002