evaluating the scalar expression to produce program P. An interesting property of cube design is that the order in which dimensions are contracted does not matter—any permutation of dimensions during contraction results in a different scalar expression (i.e. a different program design), but all expressions produce the same value (program). For example, another expression (design) to produce calculator C contracts dimensions in the opposite order from its original specification: C = Mcb + Mwb + Mct + Mwt Or more generally: P = Ki1...in Note: Underlying cube designs is a commutative diagram, such that there are an exponential number of paths from the empty program 0 to program P. Each path denotes a particular contraction of a cube, and corresponds to a unique incremental design of P. Included among these paths are cube aggregations that contract cubes using different dimensional orders. The significance of program cubes is that it provides a structured way in which to express and build multi-dimensional models of SPLs. Further, it provides scalable specifications. If each dimension has k values, an n-cube specification of a program requires O(kn) terms, as opposed to O(kn) cube elements that would otherwise have to be identified and then composed. In general, cubes provide a compact way to specify complex programs. Applications The expression problem (EP; a.k.a. the extensibility problem) is a fundamental problem in programming languages aimed at type systems that can add new classes and methods to a program in a type-safe manner. It is also a fundamental problem in multi-dimensional SPL design. The expression problem is an example of an SPL of rank 2. The following applications either explain/illustrate the expression problem or show how it scales to product lines of large programs. EP is really a SPL of ~30 line programs; the applications below show how these ideas scale to programs of >30K lines (a 103 increase in size). Expression Problem Illustration of Small Expression Problem Extensible IDEs Multi-Dimensional Separation of Concerns Calculator Product Line Also, FOSD metamodels can be viewed as special cases of program cubes. References Feature-oriented programming