Constraint-Based Polymorphism in Cecil:
Towards a Practical and Static Type System

OOPSLA '98, the 13th ACM Conference on Object-Oriented Programming Systems, Languages and Applications, October'98

Note. The Conference Proceedings contain, by mistake, a preliminary version of the paper. The actual final version appears in the ACM Digital Library.


Vassily Litvinov
We present a static type system for object-oriented languages which strives to provide static typechecking without resorting to dynamic "type casts," restricting what code the programmer can write, or being too verbose or difficult to use in practice. The type system supports bounded parametric polymorphism where the bounds on type variables can be expressed using general recursive subtype or signature constraints, with F-bounded polymorphism and covariant type parameters being special cases.

We implemented this type system in the Cecil language and used it to successfully typecheck a 100,000-line Cecil program, the Vortex optimizing compiler. Our experience was very good: dynamically-typed code needed very little rewriting. We also observed several common programming situations that presented a challenge for our type system. We discuss these situations and ways to typecheck them statically.


To get the PostScript file, click here.

To get the PostScript file for an earlier (and more verbose) technical report (January'98, UW-CSE-98-01-01, with Craig Chambers), click here.


Cecil/Vortex Project