Variant Path Types for Scalable Extensibility

Atsushi Igarashi and Mirko Viroli

Much recent work in the design of object-oriented programming languages has been focusing on identifying suitable features to support so-called scalable extensibility, where the usual extension mechanism by inheritance works in different scales of software components--that is, classes, groups of classes, groups of groups and so on. Mostly, this issue has been addressed by means of dependent type systems, where nested types are seen as properties of objects. In this work, we seek instead for a different and possibly simpler solution, retaining the Java-like approach of nested types as properties of classes. We introduce the mechanism of \emph{variant path types}, which provides a flexible means to intra-group relationship (among classes) that has to be preserved through extension. Featuring the new notions of exact and inexact qualifications, these types also provide rich abstractions to express various kinds of set of objects, thanks to a flexible subtyping mechanism. We formalize a safe type system for variant path types on top of Featherweight Java. Though a full study of applicability and expressiveness is ongoing work, our development currently results in a complete solution for scalable extensibility, similarly to previous attempts based on dependent type systems.

[Full paper (pdf)]

o

Presented at FOOL/WOOD; Saturday, 20 January 2007; Nice, France