The strong isolation guarantees of hardware virtualization have led to its widespread use. A consequence of this is that individual partitions contain much software that is designed to be used in a variety of environments and by a range of applications, while in practice only a limited subset is actually utilized. Similarly, the modular design of software has contributed greatly to the ability of application developers to quickly write sophisticated programs. However, in most instances only a small fraction of the functionality included in a particular software component is needed. To address the resulting code bloat, we describe a tool OCCAM that combines techniques from partial evaluation and type theory with the goal of reducing the code in deployed applications. OCCAM can be used without annotating or otherwise modifying a program’s source. It leverages configuration-time information to produce a version of the application that is specialized to the context in which it will be ...