<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=FOSD_program_cubes</id>
	<title>FOSD program cubes - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=FOSD_program_cubes"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=FOSD_program_cubes&amp;action=history"/>
	<updated>2026-10-26T02:55:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=FOSD_program_cubes&amp;diff=8107778&amp;oldid=prev</id>
		<title>imported&gt;GreenC bot: Move 8 urls. Wayback Medic 2.5 per WP:URLREQ#citeftp</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=FOSD_program_cubes&amp;diff=8107778&amp;oldid=prev"/>
		<updated>2025-05-27T11:07:55Z</updated>

		<summary type="html">&lt;p&gt;Move 8 urls. &lt;a href=&quot;/wiki143/index.php?title=User:GreenC/WaybackMedic_2.5&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:GreenC/WaybackMedic 2.5 (page does not exist)&quot;&gt;Wayback Medic 2.5&lt;/a&gt; per &lt;a href=&quot;/wiki143/index.php?title=WP:URLREQ&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:URLREQ (page does not exist)&quot;&gt;WP:URLREQ#citeftp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{cleanup|date=September 2011}}&lt;br /&gt;
In [[feature-oriented software development]], &amp;#039;&amp;#039;&amp;#039;feature-oriented software development program cubes&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;FOSD program cubes&amp;#039;&amp;#039;&amp;#039;) are n-dimensional arrays of functions (program transformations) that represent n-dimensional product lines. A &amp;#039;&amp;#039;program&amp;#039;&amp;#039; is a composition of features: a base program is augmented with increments in program functionality, called &amp;#039;&amp;#039;features&amp;#039;&amp;#039;, to produce a complex program. A [[software product line]] (SPL) is a family of related programs. A typical product line has F&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; as a base program, and F&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;..F&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt; as features that could be added to F&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;.  Different compositions of features yield different programs.&lt;br /&gt;
Let + denote the feature composition operation.  A program P in SPL might have the following expression:&lt;br /&gt;
&lt;br /&gt;
:   P = F&amp;lt;sub&amp;gt;8&amp;lt;/sub&amp;gt; + F&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt; + F&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; + F&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; + F&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That is, P extends program F&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; with features F&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, F&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;, F&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;, and F&amp;lt;sub&amp;gt;8&amp;lt;/sub&amp;gt; in this order.&lt;br /&gt;
&lt;br /&gt;
We can recast P in terms of a projection and contraction of a 1-dimensional array.&lt;br /&gt;
Let &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; = [F&amp;lt;sub&amp;gt;0&amp;lt;/sub&amp;gt; .. F&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;] denote the array of features used by a product line.  A projection of &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; eliminates&lt;br /&gt;
unneeded features, yielding a shorter array (call it) &amp;#039;&amp;#039;&amp;#039;G&amp;#039;&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt;.  A contraction of &amp;#039;&amp;#039;&amp;#039;G&amp;#039;&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; sums each  &amp;#039;&amp;#039;&amp;#039;G&amp;#039;&amp;#039;&amp;#039;&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; in a specific order, to yield a scalar expression.  The expression for P becomes:&lt;br /&gt;
&lt;br /&gt;
:     &amp;lt;math&amp;gt;P =  \sum_{i=(0,1,2,4,8)} \mathbf{F}_i&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the index values accomplish projection and summation is array contraction.  This idea &lt;br /&gt;
generalizes to n-dimensional arrays that model multi-dimensional product lines.&lt;br /&gt;
&lt;br /&gt;
== Multi-dimensional product lines ==&lt;br /&gt;
&lt;br /&gt;
[[Image:Kube.jpg|thumb|A 2-D Product Line (or Cube)]]&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;multi-dimensional product line&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; is described by multiple interacting sets of features.&amp;lt;ref name=&amp;quot;origami&amp;quot;&amp;gt;{{cite web| title=Generating Product-Lines of Product-Families | archive-url=https://web.archive.org/web/20170706014148/ftp://ftp.cs.utexas.edu/pub/predator/Origami.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/Origami.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;sigsoft03&amp;quot;&amp;gt;{{cite web| title=Refinements and Multi-Dimensional Separation of Concerns | archive-url=https://web.archive.org/web/20170706014145/ftp://ftp.cs.utexas.edu/pub/predator/OrigamiMDSC.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/OrigamiMDSC.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ahead&amp;quot;&amp;gt;{{cite web | title=Scaling Step-Wise Refinement | archive-url=https://web.archive.org/web/20170706122700/ftp://ftp.cs.utexas.edu/pub/predator/TSE-AHEAD.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/TSE-AHEAD.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;ECOOP05&amp;quot;&amp;gt;{{cite web| title=Evaluating Support for Features in Advanced Modularization Technologies | archive-url=https://web.archive.org/web/20170706122152/ftp://ftp.cs.utexas.edu/pub/predator/ECOOP2005.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/ECOOP2005.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
As an elementary 2D example, it is easy to create a product line of calculators, where&lt;br /&gt;
variants offer different sets of operations.  Another variation &lt;br /&gt;
might offer different presentation front ends to calculators, one with no GUI, another&lt;br /&gt;
with a Java GUI, a third with a web GUI.  These variations interact: &lt;br /&gt;
each GUI representation references a specific calculator operation, so each GUI&lt;br /&gt;
feature cannot be designed independently of its&lt;br /&gt;
calculator feature.  Such a design leads to a matrix: columns represent increments in &lt;br /&gt;
calculator functionality, and rows represent different presentation front-ends.  Such a matrix M is shown to the right: columns allow one to pair&lt;br /&gt;
basic calculator functionality (base) with optional logarithmic/exponentiation (lx)&lt;br /&gt;
and trigonometric (td) features.  Rows allow one to pair core functionality with no&lt;br /&gt;
front-end (core), with optional GUI (gui) and web-based (web) front-ends.&lt;br /&gt;
&lt;br /&gt;
An element M&amp;lt;sub&amp;gt;ij&amp;lt;/sub&amp;gt; implements the interaction of column feature i and row feature j.  &lt;br /&gt;
For example, the element labeled cb is a base program that implements the core functionality of 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.&lt;br /&gt;
&lt;br /&gt;
A calculator is uniquely specified by two sequences of features: one sequence defines the calculator functionality, the other the front-end.&lt;br /&gt;
For example, calculator C that offers both base and trig functionality in a web format&lt;br /&gt;
is defined by the expression:&lt;br /&gt;
&lt;br /&gt;
:   &amp;lt;math&amp;gt;C = M_{cb} + M_{ct} + M_{wb} + M_{wt}  =  \sum_{i=(core,web) \atop j=(base,td)} \mathbf{M}_{ij}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note: Each dimension is a collection of base programs and features. Not all of their compositions are meaningful.  A [[Feature Model|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.&lt;br /&gt;
&lt;br /&gt;
== Cubes ==&lt;br /&gt;
&lt;br /&gt;
In general, a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;cube&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; is an n-dimensional array.  The rank of a cube is its dimensionality. &lt;br /&gt;
A scalar is a cube of rank 0, a vector is a cube of rank 1, and a matrix is &lt;br /&gt;
rank 2.  Following tensor notation: the number of indices a cube has designates&lt;br /&gt;
its rank. A scalar S is rank 0 (it has no indices), V&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt; is a vector (rank&lt;br /&gt;
1), M&amp;lt;sub&amp;gt;ij&amp;lt;/sub&amp;gt; is a matrix (rank 2), C&amp;lt;sub&amp;gt;ijk&amp;lt;/sub&amp;gt; is a cube (rank 3).&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Program Cubes&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; are n-dimensional arrays of functions &lt;br /&gt;
(program transformations) that represent n-dimensional product lines.&lt;br /&gt;
The values along each axis&lt;br /&gt;
of a cube denote either a base program or a feature that could elaborate a base program.&lt;br /&gt;
The rank of a product line is the rank of its cube.&lt;br /&gt;
&lt;br /&gt;
: Note: program cubes are inspired by [[tensor]]s and [[OLAP cube|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.&lt;br /&gt;
&lt;br /&gt;
A program in an n-dimensional SPL is uniquely specified by n sequences of features S&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;..S&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;, one per dimension.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;design&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; of a program is a scalar (expression) that is formed by (1) projecting the cube&lt;br /&gt;
of its unneeded elements, and (2) contracting the resultant kcube to a scalar:&lt;br /&gt;
&lt;br /&gt;
:   &amp;lt;math&amp;gt;P = \sum_ { i_1 = S_1 \dots i_n = S_n} \mathbf{K}_{i_1 \dots i_n}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Program &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;generation&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; is evaluating the scalar expression to produce program P.&lt;br /&gt;
&lt;br /&gt;
An interesting property of cube design is that the order in which dimensions are contracted does not&lt;br /&gt;
matter—any permutation of dimensions during contraction results in a different&lt;br /&gt;
scalar expression (i.e. a different program design), but all expressions produce the&lt;br /&gt;
same value (program).  For example, another expression (design) to produce calculator C contracts&lt;br /&gt;
dimensions in the opposite order from its original specification:&lt;br /&gt;
&lt;br /&gt;
:   C = M&amp;lt;sub&amp;gt;cb&amp;lt;/sub&amp;gt; + M&amp;lt;sub&amp;gt;wb&amp;lt;/sub&amp;gt; + M&amp;lt;sub&amp;gt;ct&amp;lt;/sub&amp;gt; + M&amp;lt;sub&amp;gt;wt&amp;lt;/sub&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Or more generally:&lt;br /&gt;
&lt;br /&gt;
:   &amp;lt;math&amp;gt;P = \sum_{ i_n = S_n \dots i_1 = S_1} \mathbf{K}_{i_1 \dots i_n}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: 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.&lt;br /&gt;
&lt;br /&gt;
The significance of program cubes is that it provides a structured way in which to&lt;br /&gt;
express and build multi-dimensional models of SPLs.  Further, it provides scalable&lt;br /&gt;
specifications.  If each dimension has k values, an n-cube specification of a program&lt;br /&gt;
requires O(kn) terms, as opposed to O(k&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt;) cube elements that would otherwise&lt;br /&gt;
have to be identified and then composed.  In general, cubes provide a compact way&lt;br /&gt;
to specify complex programs.&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
The [[expression problem]] (a.k.a. the &amp;#039;&amp;#039;&amp;#039;extensibility problem&amp;#039;&amp;#039;)  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.&amp;lt;ref name=&amp;quot;Reynolds&amp;quot;&amp;gt;&lt;br /&gt;
{{cite book &lt;br /&gt;
| title=User-defined types and procedural data structures as complementary approaches to data abstraction&lt;br /&gt;
| date=12 August 1994 | pages=13–23 | publisher=MIT Press | isbn=9780262071550 | url= http://portal.acm.org/citation.cfm?id=186680&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Cook&amp;quot;&amp;gt;&lt;br /&gt;
{{cite web &lt;br /&gt;
| title=Object-Oriented Programming versues Abstract Data Types&lt;br /&gt;
| url=http://www.cs.utexas.edu/users/wcook/papers/OOPvsADT/CookOOPvsADT90.pdf&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Wadler&amp;quot;&amp;gt;&lt;br /&gt;
{{cite web &lt;br /&gt;
| title=The Expression Problem&lt;br /&gt;
| url=http://www.daimi.au.dk/~madst/tool/papers/expression.txt&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;Synth&amp;quot;&amp;gt;&lt;br /&gt;
{{cite web &lt;br /&gt;
| title=Synthesizing Object-Oriented and Functional Design to Promote Re-Use&lt;br /&gt;
| url=http://citeseer.ist.psu.edu/krishnamurthi98synthesizing.html&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
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 &amp;gt;30K lines (a 10&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; increase in size).&lt;br /&gt;
&lt;br /&gt;
* [https://web.archive.org/web/20170706122152/ftp://ftp.cs.utexas.edu/pub/predator/ECOOP2005.pdf Expression Problem]&lt;br /&gt;
* [http://www.cs.utexas.edu/users/schwartz/ATS/EPL/index.html Illustration of Small Expression Problem]&lt;br /&gt;
* [https://web.archive.org/web/20170706014148/ftp://ftp.cs.utexas.edu/pub/predator/Origami.pdf  Extensible IDEs]&lt;br /&gt;
* [https://web.archive.org/web/20170706014145/ftp://ftp.cs.utexas.edu/pub/predator/OrigamiMDSC.pdf Multi-Dimensional Separation of Concerns]&lt;br /&gt;
* [https://web.archive.org/web/20170706122700/ftp://ftp.cs.utexas.edu/pub/predator/TSE-AHEAD.pdf Calculator Product Line]&lt;br /&gt;
&lt;br /&gt;
Also, [[FOSD metamodels]] can be viewed as special cases of program cubes.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Feature-oriented programming]]&lt;/div&gt;</summary>
		<author><name>imported&gt;GreenC bot</name></author>
	</entry>
</feed>