Interfaces-the collection of procedures and data structures that define a l
ibrary, a subsystem, a module-are syntactically poor programming languages.
They have state (defined both by the interface's data structures and inter
nally), operations on this state (defined by the interface's procedures), a
nd semantics associated with these operations. Given a way to incorporate i
nterface semantics into compilation, interfaces can be compiled in the same
manner as traditional languages such as ANSI C or FORTRAN. This paper make
s two contributions. First, ii proposes and explores the metaphor of interf
ace compilation, and provides the beginnings of a programming methodology f
or exploiting it. Second, ii presents MAGIK, a system built to support inte
rface compilation. Using MAGIK, software developers call build optimizers a
nd checkers for their interface languages, and have these extensions incorp
orated into compilation, with a corresponding gain in efficiency and safety
. This organization contrasts with traditional compilation, which relegates
programmers to the role of passive consumers, rather than active exploiter
s of a complier's transformational abilities.