<?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=Feature-oriented_programming</id>
	<title>Feature-oriented programming - 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=Feature-oriented_programming"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Feature-oriented_programming&amp;action=history"/>
	<updated>2026-04-22T14:49:39Z</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=Feature-oriented_programming&amp;diff=6816018&amp;oldid=prev</id>
		<title>imported&gt;GreenC bot: Move 15 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=Feature-oriented_programming&amp;diff=6816018&amp;oldid=prev"/>
		<updated>2025-05-27T09:30:24Z</updated>

		<summary type="html">&lt;p&gt;Move 15 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;{{primary sources|date=March 2018}}&lt;br /&gt;
In [[computer programming]], &amp;#039;&amp;#039;&amp;#039;feature-oriented programming&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;FOP&amp;#039;&amp;#039;&amp;#039;) or &amp;#039;&amp;#039;&amp;#039;feature-oriented software development&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;FOSD&amp;#039;&amp;#039;&amp;#039;) is a [[programming paradigm]] for program generation in [[software product lines]] (SPLs) and for incremental development of programs.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
[[File:StackingLayers.jpg|thumb|upright=0.4|right|alt=vertical stacking of layers|Connection between layer stacks and transformation compositions]]&lt;br /&gt;
FOSD arose out of layer-based designs and levels of abstraction in network protocols and extensible database systems in the late-1980s.&amp;lt;ref name=&amp;quot;genvoca&amp;quot;&amp;gt;{{cite web | title=Design and Implementation of Hierarchical Software Systems with Reusable Components  | archive-url=https://web.archive.org/web/20170706123320/ftp://ftp.cs.utexas.edu/pub/predator/tosem-92.pdf  | archive-date=2017-07-06  | url-status=dead  | url=ftp://ftp.cs.utexas.edu/pub/predator/tosem-92.pdf}}&amp;lt;/ref&amp;gt;  A program was a stack of layers. Each layer added functionality to previously composed layers and different compositions of layers produced different programs.   Not surprisingly, there was a need for a compact language to express such designs.  Elementary algebra fit the bill: each layer was a function (a [[program transformation]]) that added new code to an existing program to produce a new program, and a program&amp;#039;s design was modeled by an expression, i.e., a composition of transformations (layers).  The figure to the left illustrates the stacking of layers i, j, and h (where h is on the bottom and i is on the top). The algebraic notations i(j(h)), i•j•h, and i+j+h have been used to express these designs.&lt;br /&gt;
&lt;br /&gt;
Over time, layers were equated to features, where a &amp;#039;&amp;#039;feature&amp;#039;&amp;#039; is an increment in program functionality. The paradigm for program design and generation was recognized to be an outgrowth of relational query optimization, where query evaluation programs were defined as relational algebra expressions, and [[query optimization]] was expression optimization.&amp;lt;ref name=&amp;quot;selinger&amp;quot;&amp;gt;{{cite book | title=Access Path Selection In Relational Databases | date=30 May 1979 | pages=23–34 | doi=10.1145/582095.582099 | isbn=9780897910019 | s2cid=8537523 | url=http://portal.acm.org/citation.cfm?id=582099}}&amp;lt;/ref&amp;gt; A software product line is a family of programs where each program is defined by a unique composition of features. FOSD has since evolved into the study of feature modularity, tools, analyses, and design techniques to support feature-based program generation.&lt;br /&gt;
&lt;br /&gt;
The second generation of FOSD research was on feature interactions, which originated in telecommunications. Later, the term &amp;#039;&amp;#039;feature-oriented programming&amp;#039;&amp;#039; was coined;&amp;lt;ref name=&amp;quot;FOP&amp;quot;&amp;gt;{{cite web  | title=Feature-Oriented Programming: A Fresh Look at Objects  | url=http://www4.informatik.tu-muenchen.de/papers/ecoop_prehofer_1997_Publication.html  | access-date=2015-12-16  | archive-url=https://web.archive.org/web/20030803215756/http://www4.informatik.tu-muenchen.de/papers/ecoop_prehofer_1997_Publication.html  | archive-date=2003-08-03  | url-status=dead  }}&amp;lt;/ref&amp;gt; this work exposed interactions between layers. Interactions require features to be adapted when composed with other features.&lt;br /&gt;
&lt;br /&gt;
A third generation of research focussed on the fact that every program has multiple representations (e.g., source, makefiles, documentation, etc.) and adding a feature to a program should elaborate each of its representations so that all are consistent.  Additionally, some of representations could be generated (or derived) from others. In the sections below, the mathematics of the three most recent generations of FOSD, namely [[#GenVoca|GenVoca]],&amp;lt;ref name=&amp;quot;genvoca&amp;quot;/&amp;gt; [[#AHEAD|AHEAD]],&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; and [[#FOMDD|FOMDD]]&amp;lt;ref name=&amp;quot;fomdd&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;genmeta&amp;quot;/&amp;gt; are described, and links to product lines that have been developed using FOSD tools are provided. Also, four additional results that apply to all generations of FOSD are: [[FOSD metamodels]], [[FOSD program cubes]], and FOSD feature interactions.&lt;br /&gt;
&lt;br /&gt;
== GenVoca ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;GenVoca&amp;#039;&amp;#039;&amp;#039; (a [[portmanteau]] of the names Genesis and Avoca)&amp;lt;ref name=&amp;quot;genvoca&amp;quot;/&amp;gt; is a compositional paradigm for defining programs of product lines. Base programs are 0-ary functions or transformations called &amp;#039;&amp;#039;&amp;#039;values&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
   f      -- base program with feature f&lt;br /&gt;
   h      -- base program with feature h&lt;br /&gt;
&lt;br /&gt;
and features are unary functions/transformations that elaborate (modify, extend, refine) a program:&lt;br /&gt;
&lt;br /&gt;
   i + x  -- adds feature i to program x&lt;br /&gt;
   j + x  -- adds feature j to program x&lt;br /&gt;
&lt;br /&gt;
where + denotes function composition. The &amp;#039;&amp;#039;design&amp;#039;&amp;#039; of a program is a named expression, e.g.:&lt;br /&gt;
&lt;br /&gt;
   p&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; = j + f       -- program p&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; has features j and f&lt;br /&gt;
   p&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = j + h       -- program p&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; has features j and h&lt;br /&gt;
   p&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; = i + j + h   -- program p&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; has features i, j, and h&lt;br /&gt;
&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;GenVoca model&amp;#039;&amp;#039;&amp;#039; of a domain or software product line is a collection of base programs and features (see [[FOSD metamodels|MetaModels]] and [[FOSD program cubes|Program Cubes]]).&lt;br /&gt;
The programs (expressions) that can be created defines a product line. Expression optimization is &amp;#039;&amp;#039;program design optimization&amp;#039;&amp;#039;, and expression evaluation is &amp;#039;&amp;#039;program generation&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
: Note: GenVoca is based on the stepwise development of programs: a process that emphasizes design simplicity and understandability, which are key to  program comprehension and automated program construction. Consider program p&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; above: it begins with base program h, then feature j is added (read: the functionality of feature j is added to the codebase of h), and finally feature i is added (read: the functionality of feature i is added to the codebase of j•h).&lt;br /&gt;
&lt;br /&gt;
: Note: not all combinations of features are meaningful.  [[Feature Model|Feature models]] (which can be translated into propositional formulas) are graphical representations that define legal combinations of features.&amp;lt;ref name=&amp;quot;splc&amp;quot;&amp;gt;{{cite web | title=Feature Models, Grammars, and Propositional Formulas | archive-url=https://web.archive.org/web/20170706123201/ftp://ftp.cs.utexas.edu/pub/predator/splc05.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/splc05.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Note: A more recent formulation of GenVoca is &amp;#039;&amp;#039;&amp;#039;symmetric&amp;#039;&amp;#039;&amp;#039;: there is only one base program, 0 (the empty program), and all features are unary functions.  This suggests the interpretation that GenVoca composes program structures by &amp;#039;&amp;#039;&amp;#039;superposition&amp;#039;&amp;#039;&amp;#039;, the idea that complex structures are composed by superimposing simpler structures.&amp;lt;ref name=&amp;quot;amast08&amp;quot;&amp;gt;{{cite web | title=An Algebra for Features and Feature Composition | url=http://www.infosun.fim.uni-passau.de/cl/publications/docs/AMAST2008.pdf}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;symmetric&amp;quot;&amp;gt;{{cite web | title=Superimposition: A Language-Independent Approach to Software Composition | url=http://www.infosun.fim.uni-passau.de/cl/publications/docs/SC2008.pdf}}&amp;lt;/ref&amp;gt;  Yet another reformulation of GenVoca is as a [[monoid]]: a GenVoca model is a set of features with a composition operation (•); composition is associative and there is an identity element (namely 1, the identity function).  Although all compositions are possible, not all are meaningful.  That&amp;#039;s the reason for [[Feature Model|feature models]].&lt;br /&gt;
&lt;br /&gt;
GenVoca features were originally implemented using C preprocessor (&amp;lt;code&amp;gt;#ifdef feature ... #endif&amp;lt;/code&amp;gt;) techniques.  A more advanced technique, called [[FOSD Mixin Layers|mixin layers]], showed the connection of features to object-oriented collaboration-based designs.&lt;br /&gt;
&lt;br /&gt;
== AHEAD ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Algebraic Hierarchical Equations for Application Design&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AHEAD&amp;#039;&amp;#039;&amp;#039;)&amp;lt;ref name=&amp;quot;ahead&amp;quot;/&amp;gt; generalized GenVoca in two ways. First, it revealed the internal structure of GenVoca values as tuples. Every program has multiple representations, such as source, documentation, bytecode, and makefiles. A GenVoca value is a tuple of program representations. In a product line of parsers, for example, a base parser f is defined by its grammar g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, Java source s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, and documentation d&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;. Parser f is modeled by the tuple f=[g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, d&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;]. Each program representation may have subrepresentations, and they too may have subrepresentations, recursively. In general, a GenVoca value is a tuple of nested tuples that define a hierarchy of representations for a particular program.&lt;br /&gt;
&lt;br /&gt;
:: [[Image:Hierarchy.JPG|thumb|Hierarchical relationships among program artifacts]]&lt;br /&gt;
Example. Suppose terminal representations are files. In AHEAD, grammar g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; corresponds to a single BNF file, source s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; corresponds to a tuple of Java files [c&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…c&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;], and documentation d&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; is a tuple of HTML files [h&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…h&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt;]. A GenVoca value (nested tuples) can be depicted as a directed graph: the graph for parser f is shown in the figure to the right. Arrows denote projections, i.e., mappings from a tuple to one of its components. AHEAD implements tuples as file directories, so f is a directory containing file g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; and subdirectories s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; and d&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;. Similarly, directory s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; contains files c&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…c&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;, and directory df contains files h&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…h&amp;lt;sub&amp;gt;k&amp;lt;/sub&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:: Note: Files can be hierarchically decomposed further. Each Java class can be decomposed into a tuple of members and other class declarations (e.g., initialization blocks, etc.).  The important idea here is that the mathematics of AHEAD are recursive.&lt;br /&gt;
&lt;br /&gt;
Second, AHEAD expresses features as nested tuples of unary functions called &amp;#039;&amp;#039;&amp;#039;deltas&amp;#039;&amp;#039;&amp;#039;. Deltas can be &amp;#039;&amp;#039;&amp;#039;program refinements&amp;#039;&amp;#039;&amp;#039; (semantics-preserving transformations), &amp;#039;&amp;#039;&amp;#039;extensions&amp;#039;&amp;#039;&amp;#039; (semantics-extending transformations), &lt;br /&gt;
or &amp;#039;&amp;#039;&amp;#039;interactions&amp;#039;&amp;#039;&amp;#039; (semantics-altering transformations). We use the neutral term “delta” to represent all of these possibilities, as each occurs in FOSD.&lt;br /&gt;
&lt;br /&gt;
To illustrate, suppose feature j extends a grammar by &amp;amp;Delta;g&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt; (new rules and tokens are added), extends source code by &amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt; (new classes and members are added and existing methods are modified), and extends documentation by &amp;amp;Delta;d&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;. The tuple of deltas for feature j is modeled by j=[&amp;amp;Delta;g&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;,&amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;,&amp;amp;Delta;d&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;], which we call a &amp;#039;&amp;#039;&amp;#039;delta tuple&amp;#039;&amp;#039;&amp;#039;. Elements of delta tuples can themselves be delta tuples. Example: &amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt; represents the changes that are made to each class in s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; by feature j, i.e., &amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;=[&amp;amp;Delta;c&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…&amp;amp;Delta;c&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;].&lt;br /&gt;
The representations of a program are computed recursively by nested vector addition. The representations for parser p&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; (whose GenVoca expression is j+f) are:&lt;br /&gt;
&lt;br /&gt;
   p&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; = j + f                           -- GenVoca expression&lt;br /&gt;
      = [&amp;amp;Delta;g&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;, &amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;, &amp;amp;Delta;d&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;] + [g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, d&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;]   -- substitution&lt;br /&gt;
      = [&amp;amp;Delta;g&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;+g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, &amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;+s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;, &amp;amp;Delta;d&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;+d&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;]         -- compose tuples element-wise&lt;br /&gt;
&lt;br /&gt;
That is, the grammar of p&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; is the base grammar composed with its extension (&amp;amp;Delta;g&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;+g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;), the source of p&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; is the base source composed with its extension (&amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;+s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;), and so on. As elements of delta tuples can themselves be delta tuples, composition recurses, e.g., &amp;amp;Delta;s&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt;+s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;= &lt;br /&gt;
[&amp;amp;Delta;c&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…&amp;amp;Delta;c&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;]+[c&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…c&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;]=[&amp;amp;Delta;c&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;+c&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;…&amp;amp;Delta;c&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;+c&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;].&lt;br /&gt;
Summarizing, GenVoca values are nested tuples of program artifacts, and features are nested delta tuples, where + recursively composes them by vector addition. This is the essence of AHEAD.&lt;br /&gt;
&lt;br /&gt;
The ideas presented above concretely expose two FOSD principles.  The &amp;#039;&amp;#039;&amp;#039;Principle of Uniformity&amp;#039;&amp;#039;&amp;#039; states that all program artifacts are treated and modified in the same way. (This is evidenced by deltas for different artifact types above). The &amp;#039;&amp;#039;&amp;#039;Principle of Scalability&amp;#039;&amp;#039;&amp;#039; states all levels of abstractions are treated uniformly.  (This gives rise to the hierarchical nesting of tuples above).&lt;br /&gt;
&lt;br /&gt;
The original implementation of AHEAD is the AHEAD Tool Suite and Jak language, which exhibits both the Principles of Uniformity and Scalability.  Next-generation tools include CIDE&lt;br /&gt;
&amp;lt;ref name=&amp;quot;CIDE&amp;quot;&amp;gt;{{cite web| title=Guaranteeing Syntactic Correctness for all Product Line Variants: A Language-Independent Approach | archive-url=https://web.archive.org/web/20170706122709/ftp://ftp.cs.utexas.edu/pub/predator/Tools2009.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/Tools2009.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
and FeatureHouse.&amp;lt;ref name=&amp;quot;FH&amp;quot;&amp;gt;{{cite web| title=FeatureHouse: Language-Independent, Automated Software Composition | url=http://www.infosun.fim.uni-passau.de/cl/publications/docs/ICSE2009fh.pdf}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FOMDD ==&lt;br /&gt;
[[Image:CommutingDiagram.JPG|thumb|Derivational and refinement relationships among program artifacts]]&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Feature-Oriented Model-Driven Design&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;FOMDD&amp;#039;&amp;#039;&amp;#039;)&amp;lt;ref name=&amp;quot;fomdd&amp;quot;&amp;gt;{{cite web| title=Feature Oriented Model Driven Development: A Case Study for Portlets | archive-url=https://web.archive.org/web/20170706122327/ftp://ftp.cs.utexas.edu/pub/predator/ICSE07.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/ICSE07.pdf}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;genmeta&amp;quot;&amp;gt;{{cite book |date = October 2007 |pages= 105–114  |doi = 10.1145/1289971.1289990| chapter-url=http://portal.acm.org/citation.cfm?id=1289971.1289990 |first1= Salvador |last1= Trujillo|first2= Maider |last2= Azanza|first3= Óscar|last3= Díaz|title = Proceedings of the 6th international conference on Generative programming and component engineering |chapter = Generative metaprogramming |isbn = 9781595938558 |s2cid = 236715 }}&amp;lt;/ref&amp;gt; combines the ideas of AHEAD with &amp;#039;&amp;#039;&amp;#039;Model-Driven Design&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;MDD&amp;#039;&amp;#039;&amp;#039;) (a.k.a. &amp;#039;&amp;#039;&amp;#039;[[Model-Driven Architecture]]&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;MDA&amp;#039;&amp;#039;&amp;#039;)). AHEAD functions capture the lockstep update of program artifacts when a feature is added to a program. But there are other functional relationships among program artifacts that express derivations. For example, the relationship between a grammar g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; and its parser source s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; is defined by a compiler-compiler tool, e.g., javacc. Similarly, the relationship between Java source s&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; and its bytecode b&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt; is defined by the javac compiler. A [[commuting diagram]] expresses these relationships. Objects are program representations, downward arrows are derivations, and horizontal arrows are deltas. The figure to the right shows the commuting diagram for program p&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; = i+j+h = [g&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,s&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;,b&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
A fundamental property of a [[Commutative diagram|commuting diagram]] is that all paths between two objects are equivalent. For example, one way to derive the bytecode b&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; of parser p&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; (lower right object in the figure to the right) from grammar g&amp;lt;sub&amp;gt;h&amp;lt;/sub&amp;gt; of parser h (upper left object) is to derive the bytecode b&amp;lt;sub&amp;gt;h&amp;lt;/sub&amp;gt; and refine to b&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, while another way refines g&amp;lt;sub&amp;gt;h&amp;lt;/sub&amp;gt; to g&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, and then derive b&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;, where + represents delta composition and () is function or tool application:&lt;br /&gt;
&lt;br /&gt;
:   b&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; = &amp;amp;Delta;b&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt; + &amp;amp;Delta;b&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; + {{mono|[[javacc]]}}( {{mono|[[javac]]}}( g&amp;lt;sub&amp;gt;h&amp;lt;/sub&amp;gt; ) ) = {{mono|javac}}( {{mono|javacc}}( &amp;amp;Delta;g&amp;lt;sub&amp;gt;i&amp;lt;/sub&amp;gt; + &amp;amp;Delta;g&amp;lt;sub&amp;gt;j&amp;lt;/sub&amp;gt; + g&amp;lt;sub&amp;gt;h&amp;lt;/sub&amp;gt; ) )&lt;br /&gt;
&lt;br /&gt;
There are &amp;lt;math&amp;gt;\tbinom{4}{2}&amp;lt;/math&amp;gt; possible paths to derive the bytecode b&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; of parser p&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; from the grammar g&amp;lt;sub&amp;gt;h&amp;lt;/sub&amp;gt; of parser h. Each path represents a [[Metaprogramming|metaprogram]] whose execution generates the target object (b&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;) from the starting object (g&amp;lt;sub&amp;gt;f&amp;lt;/sub&amp;gt;). &lt;br /&gt;
There is a potential optimization: traversing each arrow of a [[commuting diagram]] has a cost. The cheapest (i.e., shortest) path between two objects in a [[commuting diagram]] is a &amp;#039;&amp;#039;&amp;#039;geodesic&amp;#039;&amp;#039;&amp;#039;, which represents the most efficient metaprogram that produces the target object from a given object.&lt;br /&gt;
&lt;br /&gt;
: Note: A “cost metric” need not be a monetary value; cost may be measured in production time, peak or total memory requirements, power consumption, or some informal metric like “ease of explanation”, or a combination of the above (e.g., [[Multiobjective optimization|multi-objective optimization]]). The idea of a geodesic is general, and should be understood and appreciated from this more general context.&lt;br /&gt;
&lt;br /&gt;
: Note: It is possible for there to be m starting objects and n ending objects in a geodesic; when m=1 and n&amp;gt;1, this is the [[Steiner tree problem|Directed Steiner Tree Problem]], which is NP-hard.&lt;br /&gt;
&lt;br /&gt;
[[Commuting diagram]]s are important for at least two reasons: (1) there is the possibility of optimizing the generation of artifacts (e.g., geodesics) and (2) they specify different ways of constructing a target object from a starting object.&amp;lt;ref name=&amp;quot;fomdd&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;testing&amp;quot;&amp;gt;{{cite web | title=Testing Software Product Lines Using Incremental Test Generation | archive-url=https://web.archive.org/web/20170706122351/ftp://ftp.cs.utexas.edu/pub/predator/ISSRE08.pdf | archive-date=2017-07-06 | url-status=dead | url=ftp://ftp.cs.utexas.edu/pub/predator/ISSRE08.pdf }}&amp;lt;/ref&amp;gt; A path through a diagram corresponds to a tool chain: for an FOMDD model to be consistent, it should be proven (or demonstrated through testing) that all tool chains that map one object to another in fact yield equivalent results. If this is not the case, then either there is a bug in one or more of the tools or the FOMDD model is wrong.&lt;br /&gt;
&lt;br /&gt;
: Note: the above ideas were inspired by [[category theory]].&amp;lt;ref name=&amp;quot;fomdd&amp;quot;/&amp;gt;&amp;lt;ref name=&amp;quot;genmeta&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Applications ==&lt;br /&gt;
* [https://web.archive.org/web/20170706123320/ftp://ftp.cs.utexas.edu/pub/predator/tosem-92.pdf Network Protocols]&lt;br /&gt;
* [https://web.archive.org/web/20170706123320/ftp://ftp.cs.utexas.edu/pub/predator/tosem-92.pdf Extensible Database Systems]&lt;br /&gt;
* [https://web.archive.org/web/20170706123114/ftp://ftp.cs.utexas.edu/pub/predator/sigsoft-93.pdf Data Structures]&lt;br /&gt;
* [https://web.archive.org/web/20170706014110/ftp://ftp.cs.utexas.edu/pub/predator/fsatsRevised.pdf Distributed Army Fire Support Simulator]&lt;br /&gt;
* [https://web.archive.org/web/20170706123117/ftp://ftp.cs.utexas.edu/pub/predator/sigsoft-94.pdf Production System Compiler]&lt;br /&gt;
* [https://web.archive.org/web/20170706122254/ftp://ftp.cs.utexas.edu/pub/predator/GPL.pdf Graph Product Line]&lt;br /&gt;
* [https://web.archive.org/web/20170706014058/ftp://ftp.cs.utexas.edu/pub/predator/ahead.pdf Extensible Java Preprocessors]&lt;br /&gt;
* [https://web.archive.org/web/20170706122327/ftp://ftp.cs.utexas.edu/pub/predator/ICSE07.pdf Web Portlets]&lt;br /&gt;
* [https://web.archive.org/web/20170706122855/ftp://ftp.cs.utexas.edu/pub/predator/icmt08.pdf SVG Applications]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[FOSD metamodels]] – product lines of product lines&lt;br /&gt;
* [[FOSD origami]]&lt;br /&gt;
* [[FOSD program cubes]] – multi-dimensional product lines&lt;br /&gt;
* [[Very high-level programming language]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Programming paradigms navbox}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Feature-Oriented Programming}}&lt;br /&gt;
[[Category:Feature-oriented programming| ]]&lt;/div&gt;</summary>
		<author><name>imported&gt;GreenC bot</name></author>
	</entry>
</feed>