Integrating nominal and structural subtyping

I have designed a language that combines nominal subtyping and structural subtyping. Nominal subtyping (or user-defined subtyping) and structural subtyping each have their own strengths and weaknesses. For example, nominal subtyping allows programmers to explicitly express design intent, and when types are associated with run time tags, enables run-time type tests (e.g., downcasts) and external/multimethod dispatch. On the other hand, structural subtyping is flexible and compositional, allowing unanticipated reuse. But, to date, nearly all object-oriented languages fully support only one subtyping paradigm or the other.

I have designed a language, Unity, that integrates both these subtyping disciplines. The type system has been formalized and proven sound. This work was published at ECOOP '08 and FOOL '07; see the publications page.

I have also performed an empirical study to determine where structural subtyping could be useful in Java programs; this work was published at ESOP '09 (see publications).

Multiple inheritance

I am exploring alternative solutions to modular typechecking of external methods/multimethods in the presence of multiple inheritance. Multiple inheritance--particularly the ``diamond'' problem--makes it difficult to perform modular ambiguity checking of external methods.

I offer a novel solution to the diamond inheritance problem: a language that supports multiple inheritance but forbids diamond inheritance. Expressiveness is retained through a ``requires'' construct (inspired by Scala) that provides subtyping without inheritance diamonds and a virtual super call that is similar to that found in traits. The novel no-diamond restriction offers two benefits: it allows multiple inheritance to co-exist neatly with fields, without resorting to tactics such as virtual inheritance. Second, it allows multiple dispatch and multiple inheritance to co-exist with modular typechecking; previous work disallowed multiple inheritance across module boundaries.

I've implemented a typechecker for the language (called CZ, for cubic zirconia) as an extension to JastAddJ. A paper on this was presented at FOOL '09 (see publications).

Lightweight exception specifications

Previously, I worked on a system for lightweight specification of exceptions, similar to Java "throws" clauses, but without the high specification overhead and cost of maintenance. I worked on a methodology and tool that provides integrated support for specifying, understanding, and evolving exception policies. See the publications page for more information.