Modeling and managing variability is a key activity in a growing number of software engineering contexts. Support for composing variability models is arising in many engineering scenarios, for instance, when several subsystems or modeling artifacts, each coming with their own variability and possibly developed by different stakeholders, should be combined together. In this paper, we consider the problem of composing fea- ture models (FMs), a widely used formalism for representing and reasoning about a set of variability choices. We show that several composition operators can actually be defined, depending on both matching/merging strategies and semantic properties expected in the composed FM. We present four alternative forms and their implementations. We discuss their relative trade-offs w.r.t. reasoning, customizability, traceability, composability and quality of the resulting feature diagram. We summarize these findings in a reading grid which is validated by revisiting some relevant existing works. Our contribution should assist developers in choosing and implementing the right composition operators.
Composing your Compositions of Variability Models (Models 2013 presentation)
1. Mathieu
Acher,
Benoit
Combemale,
Philippe
Collet,
Olivier
Barais,
Philippe
Lahire
and
Robert
B.
France
Composing
your
Composi2ons
of
Variability
Models
2. 2
2
Extensible
architectures
(eg
plugins-‐based)
Configura2on
files
System
Preferences
Configurators
Source
code
Build
systems
Comparison
of
*
Structural
or
behavorial
models
External
Variability
Internal
Variability
Variability
@
run.2me
6. Scenario
1:
Building
Feature
Models
from
product
descrip2ons
6
Haslinger,
et.
Al.
On
extrac*ng
feature
models
from
sets
of
valid
feature
combina*ons.
In
FASE’13.
Acher
et.
Al.
On
extrac*ng
feature
models
from
product
descrip*ons.
In:
VaMoS’12
• Choosing
a
product
among
a
set
of
products
user
7. Scenario
1:
Building
Feature
Models
from
product
descrip2ons
7
Haslinger,
et.
Al.
On
extrac*ng
feature
models
from
sets
of
valid
feature
combina*ons.
In
FASE’13.
Acher
et.
Al.
On
extrac*ng
feature
models
from
product
descrip*ons.
In:
VaMoS’12
• CreaNng
a
new
product
domain
analyst
8. Scenario
1:
Building
Feature
Models
from
product
descrip2ons
8
Haslinger,
et.
Al.
On
extrac*ng
feature
models
from
sets
of
valid
feature
combina*ons.
In
FASE’13.
Acher
et.
Al.
On
extrac*ng
feature
models
from
product
descrip*ons.
In:
VaMoS’12
• Switching
to
a
SoQware
Product
Line
approach
from
a
set
of
products
product
manager
9. Scenario
1:
Building
Feature
Models
from
product
descrip2ons
9
Haslinger,
et.
Al.
On
extrac*ng
feature
models
from
sets
of
valid
feature
combina*ons.
In
FASE’13.
Acher
et.
Al.
On
extrac*ng
feature
models
from
product
descrip*ons.
In:
VaMoS’12
fm1
fm2
fm8
……….
10. Scenario
2:
Managing
complexity
in
large
scale
organiza2ons
10
10
Integrated
view
Departments
11. Scenario
2:
Managing
complexity
in
large
scale
organiza2ons
11
Reiser,
M.O.,
Weber,
M.:
MulN-‐level
feature
trees:
A
pragmaNc
approach
to
managing
highly
complex
product
families.
Requir.
Eng.
12(2)
(2007)
Views
&
references
between
feature
models
Figure
from
[Reiser2007]
13. 13
Solu2on
• Iden2fica2on
and
implementa2on
of
4
solu2ons
for
composing
feature
models
• A
reading
grid
to
compose
(i.e.
choose)
your
composi2ons
14. Feature
Models
Hierarchy:
rooted
tree
Variability:
• mandatory,
• opNonal,
• Groups:
exclusive
or
inclusive
features
• Cross-‐tree
constraints
F6
F2
S
F4F1
F5
Optional
Mandatory
Xor-Group
Or-Group
fm1
15. Feature
Models
15
F6
F2
S
F4F1
F5
fm1
set
of
valid
configura2ons
configura2on
seman2cs
16. Feature
Models
16
fm1
(proposi2onal)
φ
Reasoning
F6
F2
S
F4F1
F5
Around
30
reasoning
opera*ons
available
FM
=
Feature
diagram
+
Proposi2onal
formula
Ψ
[She
et.
Al,
ICSE
2011]
17. Illustra2on:
merging
suppliers
17
F6
F2
S
F3F1
F5 F6
F2
S
F4F1
F5<<implies>>
F6
F2
S
F4F1
F5
?
fm1
fm2
fm3
Inten2on:
union
Matching
:
?
Merging
:
?
configura2on
seman2cs
18. F6
F2
S
F3F1
F5
F4
F3 <<implies>> F1
Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6)
^ (F1 v F3 v F4 v ~F5 v ~F6)
Logic
based
solu2on
18
F6
F2
S
F3F1
F5 F6
F2
S
F4F1
F5<<implies>>
F6
F2
S
F4F1
F5
φ1
φ2
φ3
O’
φc
=
………
………
Synthesis
M.
Acher
et.
Al
.
Comparing
Approaches
for
ImplemenNng
Feature
Model
ComposiNon
»
ECMFA’10
[Andersen
et.
Al.
Efficient
Synthesis
of
Feature
Models
SPLC’12]
Matching
by
name
Merging
by
configura2on
19. Reference
based
solu2on
19
F6
F2
S
F3F1
F5 F6
F2
S
F4F1
F5<<implies>>
F6
F2
S
F4F1
F5
aka
operaNonal
F6
F2
S
F4F1
F5 F6
F2
S
F3F1
F5 F6
F2
S
F4F1
F5
<<implies>>
F6
F2
S
F3F1
F5
F4
R
InputFMs
fm1
FMr union
fm2 fm3
(F1 ⬄ (fm1.F1 v fm2.F1 v fm3.F1)) ^
atmost1 (fm1.F1, fm2.F1, fm3.F1) ^
(F6 ⬄ (fm1.F6 v fm2.F6 v fm3.F6)) ^
atmost1(fm1.F6, fm2.F6, fm3.F6) ^
(F4 ⬄ (fm1.F4 v fm3.F4)) ^
atmost1(fm1.F4, fm3.F4) ^
(S ⬄ (fm1.S v fm2.S v fm3.S)) ^
atmost1(fm1.S, fm2.S, fm3.S) ^
(F2 ⬄ (fm1.F2 v fm2.F2 v fm3.F2)) ^
atmost1(fm1.F2, fm2.F2, fm3.F2) ^
(F5 ⬄ (fm1.F5 v fm2.F5 v fm3.F5))
^
atmost1(fm1.F5, fm2.F5, fm3.F5) ^ (F3 ⬄ fm2.F3)
Ѱr union =
Matching
by
name
Merging
by
reference
View
of
interest
Rela2ons
through
constraints
20. Current
Approaches
fm1 fm2
φc
o =
fmr
fmc
fm1 fm2o =
fmr
fmc
(reference based)
(with local synthesis) (with slicing)
fm1 fm2
φ1 φ2 φc
fmco
o' =
=
(logic based)
fm1 fm2
φc
o =
fmr
fmc
φc'
20
RIGID
TOO
OPEN
22. Building
New
Approaches
fm1 fm2
φc
o =
fmr
fmc
fm1 fm2o =
fmr
fmc
(reference based)
(with local synthesis) (with slicing)
fm1 fm2
φ1 φ2 φc
fmco
o' =
=
(logic based)
fm1 fm2
φc
o =
fmr
fmc
φc'
22
23. Local
synthesis
solu2on
23
F6
F2
S
F4F1
F5 F6
F2
S
F3F1
F5 F6
F2
S
F4F1
F5
<<implies>>
F6
F2
S
F3F1
F5
F4
R
InputFMs
fm1
FMr union
fm2 fm3
(F1 ⬄ (fm1.F1 v fm2.F1 v fm3.F1)) ^
atmost1 (fm1.F1, fm2.F1, fm3.F1) ^
(F6 ⬄ (fm1.F6 v fm2.F6 v fm3.F6)) ^
atmost1(fm1.F6, fm2.F6, fm3.F6) ^
(F4 ⬄ (fm1.F4 v fm3.F4)) ^
atmost1(fm1.F4, fm3.F4) ^
(S ⬄ (fm1.S v fm2.S v fm3.S)) ^
atmost1(fm1.S, fm2.S, fm3.S) ^
(F2 ⬄ (fm1.F2 v fm2.F2 v fm3.F2)) ^
atmost1(fm1.F2, fm2.F2, fm3.F2) ^
(F5 ⬄ (fm1.F5 v fm2.F5 v fm3.F5))
^
atmost1(fm1.F5, fm2.F5, fm3.F5) ^ (F3 ⬄ fm2.F3)
Ѱr union =
Merging
by
reference
+
local
synthesis
over
{S,
F1
to
F6}
Over
Approxima2on
(generaliza2on)
with
2
«
new
»configura2ons
F6
F2
S
F3F1
F5
F4
F3 <<implies>> F1
Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6)
^ (F1 v F3 v F4 v ~F5 v ~F6)Larger
Ψ
24. Slicing
solu2on
24
F6
F2
S
F4F1
F5 F6
F2
S
F3F1
F5 F6
F2
S
F4F1
F5
<<implies>>
F6
F2
S
F3F1
F5
F4
R
InputFMs
fm1
FMr union
fm2 fm3
(F1 ⬄ (fm1.F1 v fm2.F1 v fm3.F1)) ^
atmost1 (fm1.F1, fm2.F1, fm3.F1) ^
(F6 ⬄ (fm1.F6 v fm2.F6 v fm3.F6)) ^
atmost1(fm1.F6, fm2.F6, fm3.F6) ^
(F4 ⬄ (fm1.F4 v fm3.F4)) ^
atmost1(fm1.F4, fm3.F4) ^
(S ⬄ (fm1.S v fm2.S v fm3.S)) ^
atmost1(fm1.S, fm2.S, fm3.S) ^
(F2 ⬄ (fm1.F2 v fm2.F2 v fm3.F2)) ^
atmost1(fm1.F2, fm2.F2, fm3.F2) ^
(F5 ⬄ (fm1.F5 v fm2.F5 v fm3.F5))
^
atmost1(fm1.F5, fm2.F5, fm3.F5) ^ (F3 ⬄ fm2.F3)
Ѱr union =
Merging
by
reference
+
slicing
with
{S,
F1
to
F6}
M.
Acher
et.
Al
.
SeparaNon
of
concerns
in
feature
modeling:
support
and
applicaNons
AOSD’12
Slice
result
=
projected
set
of
configura2ons
onto
the
criterion
Same
FM
as
the
denota2onal
version
F6
F2
S
F3F1
F5
F4
F3 <<implies>> F1
Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6)
^ (F1 v F3 v F4 v ~F5 v ~F6)
25. How
to
use
it?
25
hgp://familiar-‐project.github.com/
26. How
to
use
it?
26
Composition of Feature Models
Predefined
unionintersection
reduced
product diff
Other
Implementation
- accuracy
- reasoning
- customizability
- composability
Denotational Operational
extract slicing local synthesis
Semantics
Boolean Logics
Hybrid
1..4
1.
Choose
a
seman2cs
2.
Choose
an
implementa2on
29. Reasoning
over
resul2ng
configura2ons
?
29
Denota2onal
Opera2onal
Local
synthesis
Slicing
Diagram
Quality
Reasoning
Customizability
Traceability
Composability
• Performing
assisted
configuraNon
• AutomaNng
analysis
over
FMs
30. Customizability?
30
Denota2onal
Opera2onal
Local
synthesis
Slicing
Diagram
Quality
Reasoning
Customizability
Traceability
Composability
• Specifying
the
meaning
of
the
composiNon
31. Traceability?
31
Denota2onal
Opera2onal
Local
synthesis
Slicing
Diagram
Quality
Reasoning
Customizability
Traceability
Composability
• Mapping
to
the
input
FMs
35. Scenario
2:
Managing
complexity
in
large
scale
organiza2ons
35
35
Integrated
view
Departments
• Traceability
• Complex
Mappings
opera2onal
Local
synthesis
Slicing
Any
view
36. Ongoing
and
Future
Work
• User
assistance
in
the
merging
process
– integraNon
of
ontological
knowledge
• Usage
of
composiNons
in
different
contexts
– and
performance
studies
• Explore
the
relaNons
from
features
to
assets
– mirorring
composiNon
both
in
the
bindings
and
assets
37. 37
Composing
your
Composi2ons
of
Variability
Models
hhp://familiar-‐project.github.com/
Composition of Feature Models
Predefined
unionintersection
reduced
product diff
Other
Implementation
- accuracy
- reasoning
- customizability
- composability
Denotational Operational
extract slicing local synthesis
Semantics
Boolean Logics
Hybrid
1..4
Seman2cs
Matching
Merging