whatisneededtohandlevariability?deptinfo.unice.fr/twiki/pub/minfo/softeng1314/pagesdecours7-lpl-… ·...
TRANSCRIPT
![Page 1: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/1.jpg)
What is needed to handle Variability?
• Define mandatory properSes and funcSonaliSes • Define opAonal choices: 0, 1..N, choice among n • Variants • Constraints
– Dependency – Mutual exclusion
![Page 2: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/2.jpg)
How to express variability?
• Inheritance (design, implementaSon) • Genericity (design, implementaSon) • Design Pa\ern (design, implementaSon) • Aspect-‐Oriented Design & Programming (design, implementaSon)
• Model TransformaSon (design) • Model ComposiSon (design) • Feature Models (requirement engineering, design, also implementaSon) – Similar technique : Decision Modeling
![Page 3: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/3.jpg)
Variability Model Feature Model: de facto standard
• Research – 2500+ citaSons of [Kang et al., 1990] on Google Scholar – Central to many generaSve approaches
• at requirements or code level – Tools & Languages (GUIDSL/FeatureIDE, SPLOT, FaMa, etc.)
• Industry – Tools (Gears, pure::variants), – Will be Part of Common Variability Language (CVL), future OMG standard
43
![Page 4: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/4.jpg)
![Page 5: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/5.jpg)
excludes
![Page 6: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/6.jpg)
![Page 7: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/7.jpg)
Feature Models
47
![Page 8: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/8.jpg)
Feature Models (Background)
48
Hierarchy: rooted tree Variability: • mandatory, • opSonal, • Groups: exclusive or inclusive features • Cross-‐tree constraints
Optional
Mandatory
Xor-Group
Or-Group
![Page 9: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/9.jpg)
49
Hierarchy + Variability =
set of valid configuraAons
ü
Optional
Mandatory
Xor-Group
Or-Group
{CarEquipment, Comfort, DrivingAndSafety, Healthing, AirCondiSoning, FrontFogLights}
configuraAon = set of features selected
ü ü
ü
ü ü
ü
![Page 10: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/10.jpg)
50
Hierarchy + Variability =
set of valid configuraAons
Optional
Mandatory
Xor-Group
Or-Group
{CarEquipment, Comfort, DrivingAndSafety, Healthing, AirCondiSoning}
configuraAon = set of features selected
ü ü
ü
ü
ü
![Page 11: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/11.jpg)
51
Hierarchy + Variability =
set of valid configuraAons
Optional
Mandatory
Xor-Group
Or-Group
{CarEquipment, Comfort, DrivingAndSafety, Healthing, AirCondiSoning, AirCondiSoningFrontAndRear, FrontFogLights}
configuraAon = set of features selected
ü ü
ü
ü ü
![Page 12: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/12.jpg)
52
Hierarchy + Variability =
set of valid configuraAons
Optional
Mandatory
Xor-Group
Or-Group
{CarEquipment, Comfort, DrivingAndSafety, Healthing, AirCondiSoning, AutomaScHeadLights}
configuraAon = set of features selected
ü ü
ü
ü
ü
ü
![Page 13: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/13.jpg)
53
Hierarchy + Variability =
set of valid configuraAons
Optional
Mandatory
Xor-Group
Or-Group
{AirCondiSoning, FrontFogLights} {AutomaScHeadLights, AirCondiSoning, FrontFogLights} {AutomaScHeadLights, FrontFogLights, AirCondiSoningFrontAndRear} {AirCondiSoningFrontAndRear} {AirCondiSoning} {AirCondiSoningFrontAndRear, FrontFogLights}
{CarEquipment, Comfort, DrivingAndSafety, Healthing} X
![Page 14: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/14.jpg)
Feature Models
54
![Page 15: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/15.jpg)
Managing variability models with FAMILIAR
55
![Page 16: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/16.jpg)
#1 Automated Analysis
56
![Page 17: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/17.jpg)
#2 MulAple Feature Models
57
![Page 18: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/18.jpg)
• #1 Automated analysis – Aka support to be\er understand and play with your feature model (TVL model)
• #2 Managing mulAple feature models – Composing / Decomposing / Diff and Reasoning about their relaSonships
– Combining these operators 58
Two Key Requirements
![Page 19: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/19.jpg)
FAMILIAR language and environment
FAMILIAR
And-Group
Optional
Mandatory
Xor-Group
Or-Group
constraints
……..
DirectX
V10 V10.1 v11
Outputs
VIVO DVI HDMI
S-Video Composite
VGA
GraphicCard And-Group
Optional
Mandatory
Xor-Group
Or-Group
TV output
constraints
VGA excludes TV outputHDMI implies v10.1 or v11
constraints
……..
constraints
……..
constraints
……..
// foo.fml fm1 = FM (“foo1.tvl”) fm2 = FM (“foo2.m”) fm3 = merge intersecAon { fm1 fm2 } c3 = counAng fm3 renameFeature fm3.TV as “OutputTV” fm5 = aggregate { fm3 FM (“foo4.xml”) } assert (isValid fm5) fm6 = slice fm5 including fm5.TV.* export fm6
True/False 8759 “OutputTV”, “TV”
Interoperability Language faciliAes Environment
![Page 20: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/20.jpg)
60
Interoperability fm1 = FM(“foo.tvl”) fm2 = FM (“foo.m”)
serialize fm4 into SPLOT serialize fm1 into featureide fm3 = FM (“foo.xmi”)
fm4 = FM (A : B ….)
De/ComposiAon merge diff intersecSon sunion
aggregate map unmap
extract slicing
EdiAng renameFeature
removeFeature accessors
copy
Reasoning counSng configs
isValid deads cores falseOpSonals
cleanup
configuraSon select deselect asFM compare
setOpSonal setMandatory
setAlternaSves setOr
Language FaciliAes fm1.* fm1.B
modular mechanisms
restricted set of types iterator/condiSonal
asserSon
insert
FAMILIAR … features
![Page 21: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/21.jpg)
Hello World
61
helloworld.fml
![Page 22: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/22.jpg)
Typed language • Domain-‐specific types
– Feature Model, – ConfiguraSon, – Feature, – Constraint
• Other types include – Set – String – Boolean, – Enum, – Integer and Real.
• A set of operaSons, called operators, are defined for a given type. 62
basics2.fml
![Page 23: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/23.jpg)
Typed language
63
basics2.fml
![Page 24: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/24.jpg)
Typed language
64
basics2.fml
![Page 25: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/25.jpg)
ImporAng/ExporAng feature models
65
FAMILIAR
S2T2TVL
feature-model-synthesis
(visual configurator)
(language)
(language)FaMa
Internal notaSon or by “filename extensions”
basics3.fml
![Page 26: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/26.jpg)
Feature Accessors (1)
66
@Accessors.fml
![Page 27: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/27.jpg)
Other constructs
67
@Accessors2.fml
![Page 28: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/28.jpg)
ConfiguraAon
68
conf.fml
![Page 29: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/29.jpg)
OperaAons for Feature Models (1)
69 φ
operatorsFM.fml
![Page 30: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/30.jpg)
OperaAons for Feature Models (2)
70
φ
operatorsFM2.fml
![Page 31: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/31.jpg)
OperaAons for Feature Models (3)
71
operatorsFM3.fml
![Page 32: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/32.jpg)
FAMILIAR 72
constraints
……..
SPL/internal/so#ware variability (Pohl et al. 2005, Metzger 2007)
constraints
……..
PL/external variability (Pohl et al. 2005, Metzger 2007)
constraints
……..
context variability (FORM 1998, Tun et al. 2009 (problem world), Hartmann 2008 (CVM), Lee et al. 2010
Stakeholder 1, 2, 3, …, n (Czarnecki 2005, Reiser et al. 2007, Hartmann et al. 2009, Classen et al. 2009, Mendonca et al. 2010)
constraints
……..
constraints
……..
constraints
……..
constraints
……..
Concern 1, 2, 3, …, n View 1, 2, 3, …, n (Dunghana et al. 2010, Hubaux et al. 2010, Zaid et al. 2010)
constraints
……..
constraints
……..
constraints
……..
constraints
……..
constraints
……..
MulAple Feature Models
![Page 33: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/33.jpg)
SoC support = ComposiAon/DecomposiAon for managing large, complex and mulAple feature models FORM 1998, Tun et al. 2009 (SPLC), Hartmann 2008 (SPLC), Lee et al. 2010, Czarnecki 2005, Reiser et al. 2007 (RE journal), Hartmann et al. 2009 (SPLC), Thuem et al. 2009 (ICSE), Classen et al. 2009 (SPLC), Mendonca et al. 2010 (SCP), Dunghana et al. 2010, Hubaux et al. 2011 (SoSyM), Zaid et al. 2010 (ER), She et al., 2011 (ICSE), etc.
![Page 34: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/34.jpg)
Composing Feature Models (1)
74
aggregateBasics.fml
![Page 35: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/35.jpg)
Composing Feature Models (2)
75
aggregate1.fml
Previous version
![Page 36: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/36.jpg)
Merging Feature Models
76
mergeMI.fml
![Page 37: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/37.jpg)
see also Thuem, Kastner and Batory, ICSE’09
Comparing Feature Models
77
compare.fml
![Page 38: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/38.jpg)
Puxng all together: Example 1
78
![Page 39: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/39.jpg)
Merge IntersecAon: Available Suppliers
79
∩ ∩
A customer has some
requirements
Suppliers? Products?
![Page 40: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/40.jpg)
In FAMILIAR
80
suppliersExample0.fml
![Page 41: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/41.jpg)
Merge Union: Availability Checking
81
Can suppliers provide all products? Yes!
“compare”
∩
![Page 42: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/42.jpg)
In FAMILIAR
82
suppliersExample.fml
![Page 43: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/43.jpg)
Merging operaAon: implementaAon issues
83
T2
MRI
Medical Image
HeaderAnonymized
T1
DICOMHeader excludes DICOMHeader implies AnonymizedAnonymized v Header v ~DICOM v ~T1 v ~T2Anonymized v Header v DICOM v ~T1 v ~T2
How to synthesise a feature model that represents the union of input sets of configuraAons?
![Page 44: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/44.jpg)
84
Merging operaAon: semanAc issues (2)
φ Union IntersecSon Diff How to synthesise a feature model that represents
the union of input sets of configuraAons?
![Page 45: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/45.jpg)
Merging operaAon: algorithm
85
φ1
φ2
φ3
φ 123
merged proposiSonal formula T2
MRI
Medical Image
HeaderAnonymized
T1
DICOM
merged hierarchy +
Set mandatory features Detect Xor and Or-‐groups Compute “implies/excludes” constraints
How to synthesise a feature model that represents the union of input sets of configuraAons?
see also [Czarnecki SPLC’07 or SPLC’12]
![Page 46: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/46.jpg)
86
Building “views” of a feature model
![Page 47: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/47.jpg)
• Problem: given a feature model, how to decompose it into smaller feature models?
• SemanScs? – What’s the hierarchy – What’s the set of configuraSons?
87
Building “views” of a feature model
![Page 48: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/48.jpg)
A first try
A3 => P1P2 => A5
R
A2
A5 A6
A1
A3 A4
A
fm0
P3P2P1
P
P1 => P2
A2
A5 A6
A1
A3 A4
AfmExtraction1
A2
A5 A6
A1
A3 A4
AfmExtraction2
A3 => A5A4 => A6
Problem: You can select A3 without A5
Hierarchy and ConfiguraAon maJer! 88
![Page 49: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/49.jpg)
Slicing Operator
W
constraintsE implies DR implies E D excludes FS implies (F and not E)
P
R S
fm1
AV
T U
B C D
E F
Optional
Mandatory
Xor-Group
Or-Group
T
S E D
constraintsE implies DD implies E
slicing criterion : an arbitrary set of features, relevant for a feature model user
slice : a new feature model, represenSng a projected set of configuraSons
89
![Page 50: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/50.jpg)
Slicing operator: going into details projected set of configuraAons
90
fm1 = { {A,B,C,D,E,P,R,T,U,W}, {A,B,C,F,P,S,T,U,W}, {A,B,C,D,E,P,R,T,W}, {A,B,C,F,P,S,T,V,W}, {A,B,C,F,P,S,T,U,V,W}, {A,B,C,F,P,S,T,W}, {A,B,C,D,E,P,R,T,V,W}, }
fm1 = { {A,B,C,D,E,P,R,T,U,W}, {A,B,C,F,P,S,T,U,W}, {A,B,C,D,E,P,R,T,W}, {A,B,C,F,P,S,T,V,W}, {A,B,C,F,P,S,T,U,V,W}, {A,B,C,F,P,S,T,W}, {A,B,C,D,E,P,R,T,V,W}, }
fm1p = { {D,E,T}, {S,T}, {D,E,T}, {S,T}, {S,T}, {S,T}, {D,E,T} }
fm1p = { {D,E,T}, {S,T}, }
W
constraintsE implies DR implies E D excludes FS implies (F andnot E)
P
R S
fm1
AV
T U
B C D
E F
Optional
Mandatory
Xor-Group
Or-Group
![Page 51: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/51.jpg)
+ T
S E D
constraintsE implies DD implies E
φs1
existenBal quanBficaBon of features not included in the slicing criterion
91
fm1p = { {D,E,T}, {S,T} }
Slicing operator: going into details synthesizing the corresponding feature model
S E D
T
W
constraintsE implies DR implies E D excludes FS implies (F andnot E)
P
R S
fm1
AV
T U
B C D
E F
φ1
see also [Acher et al., ASE’11/AOSD’12]
![Page 52: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/52.jpg)
T
S E D
constraintsE implies DD implies E
92
Slicing operator with FAMILIAR (1)
W
constraintsE implies DR implies E D excludes FS implies (F andnot E)
P
R S
fm1
AV
T U
B C D
E F
slicingOp2.fml
![Page 53: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/53.jpg)
93
Slicing with FAMILIAR (2) slicingOp.fml
![Page 54: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/54.jpg)
Puxng all together: Example 2
94
![Page 55: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/55.jpg)
From marke.ng, customers, product management
From exis.ng so@ware assets (technical variability)
![Page 56: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/56.jpg)
V1 ⬄ f1V2 ⬄ f2V3 ⬄ f3
From marke.ng, customers, product management
From exis.ng so@ware assets
realizability
usefulness
Metzger, Heymans et al. “DisambiguaBng the DocumentaBon of Variability in Sodware Product Lines: A SeparaBon of Concerns, FormalizaBon and Automated Analysis“ (RE’07)
![Page 57: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/57.jpg)
Realizability checking aggregate
{{V1,V3,V2,VP1}, {V1,VP1}, {V3,VP1}, {VP1}}
merge diff (“unrealizable products”)
φ
1
slice (“realizable part”) 2
3 compare 4
see also [Acher et al. AOSD’12 and CAiSE’12
![Page 58: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/58.jpg)
With FAMILIAR
98
realizibility.fml
![Page 59: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/59.jpg)
Puxng all together: Example 3
99
![Page 60: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/60.jpg)
#1 Reverse Engineering Architectural Feature Models
Case Study: FraSCAA Architecture
CollaboraAon with Anthony Cleve (University of Namur / PRECISE, Belgium), Philippe Collet and Philippe Lahire (University of Nice Sophia AnApolis), Philippe Merle and Laurence Duchien (University of Lille / INRIA)
FraSCAti
SCAParser
Java Compiler
JDK6 JDT
Optional
Mandatory
Alternative-Group
Or-Group
Assembly Factory
resthttp
Binding
MMFrascati
Component Factory
Metamodel
MMTuscany
constraints
rest requires MMFrascatihttp requires MMTuscany
FM1
[Acher et al., ECSA’11] [Acher et al., BENEVOL’11] [Acher et al., GDR GPL’12]
![Page 61: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/61.jpg)
101
Software Artefacts
Variability Modeling
Automatic Extraction
Software Architect View
?
1 2
Philippe Merle, so@ware architect of FraSCAS
CombinaSon of plugin dependencies and hierarchical component model to synthesise a feature model
ExtracAon process
![Page 62: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/62.jpg)
Highlights
• Automated Procedure – ExtracSng and Combining Variability Sources (incl. so@ware architect knowledge) – Advanced feature modeling techniques have been developed (tool supported with FAMILIAR)
• Some Lessons Learned – ExtracSon procedure yields promising results – EssenSal role of so@ware architect
• To validate the extracted feature model • To integrate knowledge
• Extensions – EvoluSon of FraSCAS with DIFF (v1.3, v1.4, etc.)
102
![Page 63: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/63.jpg)
#2 from product descripAons to feature models
103
CollaboraAon with Patrick Heymans, Anthony Cleve, Gilles Perrouin (University of Namur / PRECISE, Belgium), Philippe Collet and Philippe Lahire (University of Nice Sophia AnApolis),
[Acher et al., VaMoS’12]
![Page 64: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/64.jpg)
104
WikiMatrix
RSSStorage LicenseLicenseCostFee
US CommunityDifferent Licenses
LanguageUnicode
Java Python PHP PerlCommercial GPL GPL2NoLimitFiles Database FileRCS
Xor
Mandatory
Optional
640 configuraSons (634 counter examples)
Exact set of configuraSons, each configuraSon corresponding to at least one product
Manual extracSon of a feature model from product descripSon(s) is not possible
![Page 65: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/65.jpg)
AutomaAon • Each product descripSon is encoded as a feature model
• Feature models {fm1, fm2,…,fm8} are merged – Output: a new feature model
• ConfiguraSon: union of input sets of configuraSons • Hierarchy: by default, we exploit the structure of the tabular data
– Can be overridden by specific user direcSves
– VariCell • DSL built on top of FAMILIAR
105
fm1 fm2 fm3 fm4 fm5 fm6 fm7 fm8
![Page 66: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/66.jpg)
Puxng all together: Example 4
106
![Page 67: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/67.jpg)
Modeling Variability From Requirements to RunAme
The case of video surveillance processing chains
CollaboraAon with Sabine Moisan and Jean-‐Paul Rigault (INRIA)
AdapAve systems
![Page 68: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/68.jpg)
So@ware Product Line (SPL) approach
Video surveillance processing chains
AdapAve systems
AdapAve systems
large number of so#ware configuraAons for a large number of requirements
![Page 69: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/69.jpg)
constraints
……..
constraints
……..
constraints
……..
constraints
……..
So#ware Pla�orm ConfiguraAons
So@ware Product Line (SPL) approach
Video surveillance processing chains
constraints
……..
constraints
……..
constraints
……..
Video Surveillance ApplicaAon Requirements
Scene Context Objects of Interest Specific Task
AdapAve systems
![Page 70: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/70.jpg)
ImplementaAon: under the hood Videosurveillanceapplica0on
Task QoS Objectof
interest
Scene
context
Coun0ng Intrusion
Precision Response
,me
Quality Scene
descrip0on
Environment
Ligh0ngCamera
Person
Ar0ficial IndoorsViewFrame
rate
VideosurveillanceplaIorm
Acquisi0on Segmenta0on Classifica0on
Clustering
Gridstep With
window
Traversal
algorithm
Kernel
func0on
Edge Region
Model
Ellipse GravityGreyColor
(a)Ta
skm
odel
(b)P
laIorm
model
mandatoryfeature
op0onalfeature
alterna0vefeatures(XOR)
or‐features(OR)
cross‐modelconstraint
internalconstraint
specifica0onfeature
imposedbytheapplica0on
specifica0onfeaturededuced
frominternalconstraints
implementa0onfeaturededuced
fromcross‐constraints(transforma0on)
”neutral”implementa0onfeature
110
![Page 71: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/71.jpg)
Puxng all together: Example 5 & Demo…
111
![Page 72: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/72.jpg)
Realizing a Car Crash Management System SPL
112
![Page 73: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/73.jpg)
Scenario
• ConstrucSon of a domain feature model for the bCMS – AggregaSon of funcSonal and non funcSonal parts
• Reasoning on the resulSng bCMS FM • RelaSng it to a pla�orm feature model (J2EE from SPLOT repository)
• Checking realizability – While refining both feature models (bCMS / J2EE)
113
![Page 74: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/74.jpg)
Summary: Variability Model Management
114 114 114
![Page 75: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/75.jpg)
[MOTIVATION/PROBLEM] Why modeling and managing Variability does and will ma\er
[SOLUTION FOR MANAGING FEATURE MODELS] Managing Variability Models with FAMILIAR [APPLICATION FOR MODEL-‐BASED SPL ENGINEERING] Model-‐based variability engineering: applicaSons, advanced topics, support 115
Key Insights
![Page 76: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/76.jpg)
(ongoing) Comprehensive model-‐based product line support Reverse engineering Automated Analysis Languages, API/DSLs EvaluaAon (European and french projects, long-‐term collaboraAon with Thales, open source systems)
116
![Page 77: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/77.jpg)
(personal vision) lightweight variability capture & understanding Coupling with reverse engineering techniques Beyond mulAple viewpoints Languages, API/DSLs
The Scala way… EvaluaAon, empirical studies (French and European projects, collaboraAon with IT companies)
117
![Page 78: WhatisneededtohandleVariability?deptinfo.unice.fr/twiki/pub/Minfo/SoftEng1314/Pagesdecours7-LPL-… · WhatisneededtohandleVariability? • Define’mandatory’properSes’and’funcSonaliSes’](https://reader034.vdocument.in/reader034/viewer/2022050503/5f9516b72749b72eb9644380/html5/thumbnails/78.jpg)
?