Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/more/feature_model_diagrams.htm @ 63

Last change on this file since 63 was 29, checked in by landauf, 16 years ago

updated boost from 1_33_1 to 1_34_1

File size: 5.8 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
7<meta name="ProgId" content="FrontPage.Editor.Document">
8<title>Feature Model Diagrams</title>
9</head>
10
11<body bgcolor="#FFFFFF" text="#000000">
12
13<p><img border="0" src="../boost.png" alt="Boost logo" width="277" height="86"></p>
14<h1>Feature Model Diagrams in text and HTML</h1>
15<p>By <a href="../people/beman_dawes.html">Beman Dawes</a></p>
16<h2>Introduction</h2>
17<p>In their seminal book, Generative Programming, Czarnecki and Eisenecker (<a href="#Generative%20Programming">C&amp;E</a>))
18describe how to build feature models [C&amp;E 4.4] consisting of a feature
19diagram plus semantic, rationale, and other attributes.&nbsp; Feature models are
20then used to drive design cycles which eventually lead to manual or automatic
21assembly of configurations.</p>
22<p>Feature models provide a language to describe the library variability that is
23often such an issue in boost.org discussions. The Whorf hypothesis that
24&quot;Language shapes the way we think, and determines what we can think
25about&quot; seems to apply.&nbsp; In discussion of library variability issues,
26we have been crippled by lack of a good language. With feature models we now
27have a language to carry on the dialog.</p>
28<p>The graphical feature diagrams presented by C&amp;E are not in a suitable
29form for the email discussions boost.org depends upon. The hierarchical nature
30of feature diagrams can be represented by a simple text-based feature diagram
31language.&nbsp; A feature model can also take advantage of the hyperlinks
32inherent in HTML.</p>
33<h2><a name="Grammar">Grammar</a></h2>
34<p>The grammar for the feature diagram language is expressed in Extended
35Bakus-Naur Form; ::= represents productions, [...] represents options, {...}
36represents zero or more instances, and represents | alternatives.</p>
37<blockquote>
38  <pre>feature-model       ::= concept-name details { feature }</pre>
39  <pre>feature             ::= feature-name [details]</pre>
40  <pre>details             ::= &quot;(&quot; feature-list &quot;)&quot;      // required features
41                      | &quot;[&quot; feature-list &quot;]&quot;      // optional features</pre>
42  <pre>feature-list        ::= element { &quot;|&quot; element }   // one only
43                      | element { &quot;+&quot; element }   // one or more
44                      | element { &quot;,&quot; element }   // all
45                                                  // [a+b] equivalent to [a,b]</pre>
46  <pre>element             ::= feature
47                      | details</pre>
48  <pre>concept-name        ::= name</pre>
49  <pre>feature-name        ::= name</pre>
50</blockquote>
51<p>The usual lexical conventions apply. Names are case-insensitive and consist
52of a leading letter, followed by letters, digits, underscores or hyphens, with
53no spaces allowed.</p>
54<p>At least one instance of each name should be hyperlinked to the corresponding
55<a href="#FeatureDescriptions">Feature Description</a>.</p>
56<p>While the grammar is intended for written communication between people, it
57may also be trivially machine parsed for use by automatic tools.</p>
58<h2><a id="FeatureDescriptions" name="FeatureDescriptions"></a></h2>
59<p>Descriptive information is associated with each concept or feature. According
60to [C&amp;E 4.4.2] this includes:</p>
61<ul>
62  <li>Semantic descriptions.</li>
63  <li>Rationale.</li>
64  <li>Stakeholders and client programs.</li>
65  <li>Exemplar systems.</li>
66  <li>Constraints and default dependency rules.</li>
67  <li>Availability sites, binding sites, and binding mode.</li>
68  <li>Open/Closed attribute.</li>
69</ul>
70<h2>What is a Feature?</h2>
71<p>A feature [C&amp;E 4.9.1] is &quot;anything users or client programs might
72want to control about a concept.&nbsp; Thus, during feature modeling, we
73document no only functional features ... but also implementation features, ...,
74various optimizations, alternative implementation techniques, and so on.&quot;</p>
75<h2>Example</h2>
76<blockquote>
77  <pre>special-container ( organization,
78                    performance,
79                    interface  )         // all required</pre>
80  <pre>organization [ ordered + indexed ]       // zero or more (4 configurations)</pre>
81  <pre>indexed [ hash-function ]                // zero or one  (2 configurations)</pre>
82  <pre>performance ( fast | small | balanced )  // exactly one  (3 configurations)</pre>
83  <pre>interface ( STL-style + cursor-style )   // one or more  (3 configurations)</pre>
84</blockquote>
85<p>There should be feature descriptions for <code>some-container, organization,
86ordered, indexed, hash-function, performance, fast, small, balanced, interface,
87STL-style, and cursor-style</code>.</p>
88<p>The number of possible configurations is&nbsp; (2 + 2*2) * 3 * 3 = 54,
89assuming no constraints.</p>
90<p>There are equivalent representations. For example:</p>
91<blockquote>
92  <pre>special-container ( organization[ ordered+indexed[ hash-function ]],
93                    performance( fast|small|balanced ),
94                    interface( STL-style+cursor-style ) )</pre>
95</blockquote>
96<h2>References</h2>
97<p>Krzysztof Czarnecki and Ulrich W. Eisenecker, <a href="http://www.generative-programming.org">Generative
98Programming</a>, Addison-Wesley, 2000, ISBN 0-201-30977-7</p>
99<hr>
100<p>Revised <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d %B %Y" startspan -->26 August 2004<!--webbot bot="Timestamp" endspan i-checksum="32277" --></p>
101<p>© Copyright Beman Dawes, 2000</p>
102
103<p>
104      Distributed under the Boost Software License, Version 1.0. (See
105      accompanying file <a href="../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or copy
106      at <a href=
107      "http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</a>)
108</p>
109
110</body>
111
112</html>
Note: See TracBrowser for help on using the repository browser.