Mathieu Acher, Benoit Combemale, Philippe Collet, Olivier Barais, Philippe Lahire and Robert B. France
Composing your Composi2ons of Variability Models
2 2
Extensible architect
ures
(eg plugins-‐based)
Configura2on
files
System
Preferences
Configurators
Source code Build
systems
Comparison of *
Structural or behav
orial
models
External Variability Internal Variability Variability @ run.2me
3 3
*systems, viewpoints, concerns, stakeholders
MULTI-‐* VARIABILITIES
4 4 Variability Modeling with Feature Models
5 5
Composing Large, Complex & Mul2ple Feature Models
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
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
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
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 ……….
Scenario 2: Managing complexity in large scale organiza2ons
10 10
Integrated view
Departments
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]
When Feature Models have to be composed
12
13
Solu2on
• Iden2fica2on and implementa2on of 4 solu2ons for composing feature models
• A reading grid to compose (i.e. choose) your composi2ons
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
Feature Models
15
F6
F2
S
F4F1
F5
fm1
set of valid configura2ons
configura2on seman2cs
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]
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
F6
F2
S
F3F1
F5
F4F3 <<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
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
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
Other candidates?
21
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
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
F4F3 <<implies>> F1
Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6) ^ (F1 v F3 v F4 v ~F5 v ~F6)Larger Ψ
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
F4F3 <<implies>> F1
Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6) ^ (F1 v F3 v F4 v ~F5 v ~F6)
How to use it?
25 hgp://familiar-‐project.github.com/
How to use it?
26
Composition of Feature Models
Predefined
unionintersectionreduced 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
27
Feature Diagram Quality ?
28
Denota2onal Opera2onal Local synthesis Slicing
Diagram Quality
Reasoning
Customizability
Traceability
Composability
• Maximality • Soundness • Completeness
Reasoning over resul2ng configura2ons ?
29
Denota2onal Opera2onal Local synthesis Slicing
Diagram Quality
Reasoning
Customizability
Traceability
Composability • Performing assisted configuraNon • AutomaNng analysis over FMs
Customizability?
30
Denota2onal Opera2onal Local synthesis Slicing
Diagram Quality
Reasoning
Customizability
Traceability
Composability • Specifying the meaning of the composiNon
Traceability?
31
Denota2onal Opera2onal Local synthesis Slicing
Diagram Quality
Reasoning
Customizability
Traceability
Composability
• Mapping to the input FMs
Composability? (union example)
32
Denota2onal Opera2onal Local synthesis Slicing
Diagram Quality
Reasoning
Customizability
Traceability
Composability
• AssociaNve, commutaNve
A reading Grid
33
Denota2onal Opera2onal Local synthesis Slicing
Diagram Quality
Reasoning
Customizability
Traceability
Composability
performance
Scenario 1: Building Feature Models from product descrip2ons
fm1 fm2
fm8 ……….
• Reasoning • High-‐quality Feature Diagram (for transformaNon)
denota2onal
Scenario 2: Managing complexity in large scale organiza2ons
35 35
Integrated view
Departments
• Traceability • Complex Mappings
opera2onal
Local synthesis Slicing
Any view
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
Composing your Composi2ons of Variability Models
hhp://familiar-‐project.github.com/
Composition of Feature Models
Predefined
unionintersectionreduced product diff
Other
Implementation- accuracy- reasoning- customizability - composability
Denotational Operational
extract slicing local synthesis
Semantics
Boolean Logics
Hybrid
1..4
Seman2cs Matching Merging
blatant adver2sing
38
22-‐24 january 2014 Nice, France hgp://vamos2014.unice.fr
39
Composing your Composi2ons of Variability Models
hhp://familiar-‐project.github.com/
Composition of Feature Models
Predefined
unionintersectionreduced product diff
Other
Implementation- accuracy- reasoning- customizability - composability
Denotational Operational
extract slicing local synthesis
Semantics
Boolean Logics
Hybrid
1..4? Seman2cs
Matching Merging