Feature Oriented Programming

DeLesley Hutchins, Edinburgh University

Feature-oriented programming is a mechanism for program composition which is similar to aspect-oriented programming and multi-dimensional separation of concerns. A feature is a high-level unit of program behavior. Typically, features cannot be encapsulated within a single function or class; instead, they cross-cut the implementation of many functions and classes throughout the source code.

In this talk, I will give a brief introduction to features, and discuss why they are useful, and how they are related to other approaches. I will then introduce a simple "feature calculus". Current implementations of features have no formal semantics. They are layered on top of Java or C++, and are implemented by means of source code transformation. In my calculus, feature composition is treated as a form of type intersection over self-recursive records. I believe that this is a particularly elegant way of thinking about features, and one which clearly shows how they fit in to the larger realm of progamming languages in general.