A large body of research has been devoted to designing and developing
type systems of varying complexity, power, and purpose.
Unfortunately, programmers who wish to use these type systems are
at the whim of language designers; relatively few of these ideas have found
their way into mainstream programming languages.
Extensible compilers promise
to provide developers the power to customize their languages, including
their type systems, as they see fit.
While these compilers are indeed powerful, they tend to be large,
complex systems that take a significant effort to learn.
In this thesis we present TypMix, a modular and easy-to-use
framework for implementing type systems that is suitable for inclusion
inside an extensible compiler.
We describe the two key components of TypMix:
an attribute langauge for declaring scoping rules,
and a small logic language for declaring typing rules.
We discuss how these components can be implemented inside an existing
extensible compiler, and
we demonstrate how they can be used to create and extend type systems
by studying their application to both an
ML-like language and a Java-like langauge.