Software developers rely on high-quality software libraries to mitigate the cost of building complex applications. However, many software libraries provide complex interfaces to make the library adaptable to application-specific needs. This complexity raises the cost of adoption and reduces the benefits of software reuse. Researchers discovered that libraries can be made more versatile and easier to use if the underlying programming language provides library authors with constructs for reasoning, during the compilation of the application, about program metadata and for customizing the library implementation based on this information. Current programming languages provide these features in an immature form and the state of the art in programming language theory does not yet reach this combination of features. The investigators are advancing the theory to bring type safety and modularity to this context and they are working closely with the C++ Standards Committee to transfer their results to industrial practice.
The combination of language features needed to reason about metadata and customize libraries is called reflective metaprogramming. Previous research in this area provides type safety and modularity for metaprogramming but not reflective metaprogramming. The investigators are researching type safety for reflective metaprogramming through a careful integration of 1) a meta-language that provides computation over values and types and that provides reflection over all the program's metadata, 2) a facility for classifying types, and 3) a type system that provides hooks into the meta-language using dependent types. By developing a more reliable and expressive metaprogramming system, this research improves programmer productivity for both the developers and users of software libraries because many more bugs will be caught early in the development cycle by the modular type system.