a calculator. Element gb adds code that displays the core functionality as a GUI; element wb adds code that displays the core functionality via the web. Similarly, element ct adds trigonometric code to the core calculator functionality; elements gt and wt add code to display the trigonometric functionality as a GUI and web front-ends. A calculator is uniquely specified by two sequences of features: one sequence defines the calculator functionality, the other the front-end. For example, calculator C that offers both base and trig functionality in a web format is defined by the expression: C = Mcb + Mct + Mwb + Mwt = Mij Note: Each dimension is a collection of base programs and features. Not all of their compositions are meaningful. A feature model defines the legal combinations of features. Thus, each dimension would have its own feature model. It is possible that selected features along one dimension may preclude or require features along other dimensions. In any case, these feature models define the legal combinations of features in a multidimensional product line. Cubes In general, a cube is an n-dimensional array. The rank of a cube is its dimensionality. A scalar is a cube of rank 0, a vector is a cube of rank 1, and a matrix is rank 2. Following tensor notation: the number of indices a cube has designates its rank. A scalar S is rank 0 (it has no indices), Vk is a vector (rank 1), Mij is a matrix (rank 2), Cijk is a cube (rank 3). Program Cubes are n-dimensional arrays of functions (program transformations) that represent n-dimensional product lines. The values along each axis of a cube denote either a base program or a feature that could elaborate a base program. The rank of a product line is the rank of its cube. Note: program cubes are inspired by tensors and data cubes in databases. The primary difference is that data cube elements are numerical values that are added during cube contraction; program cube elements are transformations that are composed. Both use tensor notations and terminology. A program in an n-dimensional SPL is uniquely specified by n sequences of features S1..Sn, one per dimension. The design of a program is a scalar (expression) that is formed by (1) projecting the cube of its unneeded elements, and (2) contracting the resultant kcube to a scalar: P = Ki1...in Program generation is