<s>
In	O
computer	B-General_Concept
programming	I-General_Concept
,	O
feature-oriented	B-Application
programming	I-Application
(	O
FOP	O
)	O
or	O
feature-oriented	B-Application
software	I-Application
development	I-Application
(	O
FOSD	B-Application
)	O
is	O
a	O
programming	O
paradigm	O
for	O
program	O
generation	O
in	O
software	B-Application
product	I-Application
lines	I-Application
(	O
SPLs	O
)	O
and	O
for	O
incremental	O
development	O
of	O
programs	O
.	O
</s>
<s>
FOSD	B-Application
arose	O
out	O
of	O
layer-based	O
designs	O
and	O
levels	O
of	O
abstraction	O
in	O
network	O
protocols	O
and	O
extensible	O
database	O
systems	O
in	O
the	O
late-1980s	O
.	O
</s>
<s>
Elementary	O
algebra	O
fit	O
the	O
bill	O
:	O
each	O
layer	O
was	O
a	O
function	O
(	O
a	O
program	B-Application
transformation	I-Application
)	O
that	O
added	O
new	O
code	O
to	O
an	O
existing	O
program	O
to	O
produce	O
a	O
new	O
program	O
,	O
and	O
a	O
program	O
's	O
design	O
was	O
modeled	O
by	O
an	O
expression	O
,	O
i.e.	O
,	O
a	O
composition	O
of	O
transformations	O
(	O
layers	O
)	O
.	O
</s>
<s>
The	O
paradigm	O
for	O
program	O
design	O
and	O
generation	O
was	O
recognized	O
to	O
be	O
an	O
outgrowth	O
of	O
relational	O
query	B-Language
optimization	I-Language
,	O
where	O
query	O
evaluation	O
programs	O
were	O
defined	O
as	O
relational	O
algebra	O
expressions	O
,	O
and	O
query	B-Language
optimization	I-Language
was	O
expression	O
optimization	O
.	O
</s>
<s>
A	O
software	B-Application
product	I-Application
line	I-Application
is	O
a	O
family	O
of	O
programs	O
where	O
each	O
program	O
is	O
defined	O
by	O
a	O
unique	O
composition	O
of	O
features	O
.	O
</s>
<s>
FOSD	B-Application
has	O
since	O
evolved	O
into	O
the	O
study	O
of	O
feature	O
modularity	O
,	O
tools	O
,	O
analyses	O
,	O
and	O
design	O
techniques	O
to	O
support	O
feature-based	O
program	O
generation	O
.	O
</s>
<s>
The	O
second	O
generation	O
of	O
FOSD	B-Application
research	O
was	O
on	O
feature	O
interactions	O
,	O
which	O
originated	O
in	O
telecommunications	O
.	O
</s>
<s>
Later	O
,	O
the	O
term	O
feature-oriented	B-Application
programming	I-Application
was	O
coined	O
;	O
this	O
work	O
exposed	O
interactions	O
between	O
layers	O
.	O
</s>
<s>
In	O
the	O
sections	O
below	O
,	O
the	O
mathematics	O
of	O
the	O
three	O
most	O
recent	O
generations	O
of	O
FOSD	B-Application
,	O
namely	O
GenVoca	B-Application
,	O
AHEAD	O
,	O
and	O
FOMDD	O
are	O
described	O
,	O
and	O
links	O
to	O
product	O
lines	O
that	O
have	O
been	O
developed	O
using	O
FOSD	B-Application
tools	O
are	O
provided	O
.	O
</s>
<s>
Also	O
,	O
four	O
additional	O
results	O
that	O
apply	O
to	O
all	O
generations	O
of	O
FOSD	B-Application
are	O
:	O
FOSD	B-Application
metamodels	I-Application
,	O
FOSD	B-Application
program	I-Application
cubes	I-Application
,	O
and	O
FOSD	B-Application
feature	O
interactions	O
.	O
</s>
<s>
GenVoca	B-Application
(	O
a	O
portmanteau	O
of	O
the	O
names	O
Genesis	O
and	O
Avoca	O
)	O
is	O
a	O
compositional	O
paradigm	O
for	O
defining	O
programs	O
of	O
product	O
lines	O
.	O
</s>
<s>
A	O
GenVoca	B-Application
model	O
of	O
a	O
domain	O
or	O
software	B-Application
product	I-Application
line	I-Application
is	O
a	O
collection	O
of	O
base	O
programs	O
and	O
features	O
(	O
see	O
MetaModels	B-Application
and	O
Program	B-Application
Cubes	I-Application
)	O
.	O
</s>
<s>
Note	O
:	O
GenVoca	B-Application
is	O
based	O
on	O
the	O
stepwise	O
development	O
of	O
programs	O
:	O
a	O
process	O
that	O
emphasizes	O
design	O
simplicity	O
and	O
understandability	O
,	O
which	O
are	O
key	O
to	O
program	O
comprehension	O
and	O
automated	O
program	O
construction	O
.	O
</s>
<s>
Note	O
:	O
A	O
more	O
recent	O
formulation	O
of	O
GenVoca	B-Application
is	O
symmetric	O
:	O
there	O
is	O
only	O
one	O
base	O
program	O
,	O
0	O
(	O
the	O
empty	O
program	O
)	O
,	O
and	O
all	O
features	O
are	O
unary	O
functions	O
.	O
</s>
<s>
This	O
suggests	O
the	O
interpretation	O
that	O
GenVoca	B-Application
composes	O
program	O
structures	O
by	O
superposition	O
,	O
the	O
idea	O
that	O
complex	O
structures	O
are	O
composed	O
by	O
superimposing	O
simpler	O
structures	O
.	O
</s>
<s>
Yet	O
another	O
reformulation	O
of	O
GenVoca	B-Application
is	O
as	O
a	O
monoid	O
:	O
a	O
GenVoca	B-Application
model	O
is	O
a	O
set	O
of	O
features	O
with	O
a	O
composition	O
operation	O
( •	O
)	O
;	O
composition	O
is	O
associative	O
and	O
there	O
is	O
an	O
identity	O
element	O
(	O
namely	O
1	O
,	O
the	O
identity	O
function	O
)	O
.	O
</s>
<s>
GenVoca	B-Application
features	O
were	O
originally	O
implemented	O
using	O
C	O
preprocessor	O
(	O
#ifdef	O
feature	O
...	O
#endif	O
)	O
techniques	O
.	O
</s>
<s>
A	O
more	O
advanced	O
technique	O
,	O
called	O
mixin	B-General_Concept
layers	I-General_Concept
,	O
showed	O
the	O
connection	O
of	O
features	O
to	O
object-oriented	O
collaboration-based	O
designs	O
.	O
</s>
<s>
Algebraic	O
Hierarchical	O
Equations	O
for	O
Application	O
Design	O
(	O
AHEAD	O
)	O
generalized	O
GenVoca	B-Application
in	O
two	O
ways	O
.	O
</s>
<s>
First	O
it	O
revealed	O
the	O
internal	O
structure	O
of	O
GenVoca	B-Application
values	O
as	O
tuples	O
.	O
</s>
<s>
A	O
GenVoca	B-Application
value	O
is	O
a	O
tuple	O
of	O
program	O
representations	O
.	O
</s>
<s>
In	O
general	O
,	O
a	O
GenVoca	B-Application
value	O
is	O
a	O
tuple	O
of	O
nested	O
tuples	O
that	O
define	O
a	O
hierarchy	O
of	O
representations	O
for	O
a	O
particular	O
program	O
.	O
</s>
<s>
A	O
GenVoca	B-Application
value	O
(	O
nested	O
tuples	O
)	O
can	O
be	O
depicted	O
as	O
a	O
directed	O
graph	O
:	O
the	O
graph	O
for	O
parser	O
f	O
is	O
shown	O
in	O
the	O
figure	O
to	O
the	O
right	O
.	O
</s>
<s>
We	O
use	O
the	O
neutral	O
term	O
“	O
delta	O
”	O
to	O
represent	O
all	O
of	O
these	O
possibilities	O
,	O
as	O
each	O
occurs	O
in	O
FOSD	B-Application
.	O
</s>
<s>
The	O
representations	O
for	O
parser	O
p2	O
(	O
whose	O
GenVoca	B-Application
expression	O
is	O
j+f	O
)	O
are	O
:	O
</s>
<s>
Summarizing	O
,	O
GenVoca	B-Application
values	O
are	O
nested	O
tuples	O
of	O
program	O
artifacts	O
,	O
and	O
features	O
are	O
nested	O
delta	O
tuples	O
,	O
where	O
+	O
recursively	O
composes	O
them	O
by	O
vector	O
addition	O
.	O
</s>
<s>
The	O
ideas	O
presented	O
above	O
concretely	O
expose	O
two	O
FOSD	B-Application
principles	O
.	O
</s>
<s>
Model-Driven	B-Architecture
Architecture	I-Architecture
(	O
MDA	O
)	O
)	O
.	O
</s>
<s>
There	O
are	O
possible	O
paths	O
to	O
derive	O
the	O
bytecode	O
b3	O
of	O
parser	O
p3	O
from	O
the	O
grammar	O
gh	O
of	O
parser	O
h	O
.	O
Each	O
path	O
represents	O
a	O
metaprogram	B-Application
whose	O
execution	O
generates	O
the	O
target	O
object	O
(	O
b3	O
)	O
from	O
the	O
starting	O
object	O
(	O
gf	O
)	O
.	O
</s>
<s>
The	O
cheapest	O
(	O
i.e.	O
,	O
shortest	O
)	O
path	O
between	O
two	O
objects	O
in	O
a	O
commuting	O
diagram	O
is	O
a	O
geodesic	O
,	O
which	O
represents	O
the	O
most	O
efficient	O
metaprogram	B-Application
that	O
produces	O
the	O
target	O
object	O
from	O
a	O
given	O
object	O
.	O
</s>
