Summary: GENERIC FEATURE MODULES:
TWO-STAGED PROGRAM CUSTOMIZATION
Sven Apel, Martin Kuhlemann, and Thomas Leich
P.O. Box 4120, Magdeburg, Germany
Keywords: Feature-oriented programming, generics, program customization, software reuse, software product lines
Abstract: With feature-oriented programming (FOP) and generics programmers have proper means for structuring soft-
ware so that its elements can be reused and extended. This paper addresses the issue whether both approaches
are equivalent. While FOP targets at large-scale building blocks and compositional programming, generics
provide fine-grained customization at type-level. We contribute an analysis that reveals the individual ca-
pabilities of both approaches with respect to program customization. Therefrom, we extract guidelines for
programmers in what situations which approach suffices. Furthermore, we present a fully implemented lan-
guage proposal that integrates FOP and generics in order to combine their strengths. Our approach facilitates
two-staged program customization: (1) selecting sets of features; (2) parameterizing features subsequently.
This allows a broader spectrum of code reuse to be covered reflected by proper language level mechanisms.
We underpin our proposal by means of a case study.
Feature-oriented programming (FOP) aims at feature
modularity in software product lines (Batory et al.,