Upload
nicodintzner
View
289
Download
2
Tags:
Embed Size (px)
DESCRIPTION
Presentation of the research work of Nicolas Dintzner, Arie van Deursen and Martin Pinzger on the evolution of feature models. This presentation was given at the VaMoS 2014 workshop.
Citation preview
EXTRACTING FEATURE MODEL CHANGES FROM THE LINUX KERNEL WITH FMDIFF
The 8th International Workshop on Variability Modeling of Software-intensive Systems
Nicolas Dintzner Delft University of Technology
Netherlands [email protected]
Arie van Deursen Delft University of Technology
Netherlands [email protected]
Martin Pinzger University of Klagenfurt
Austria [email protected]
Linux kernel feature model changes
Feature changes
FMDiff
2
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Feature model changes
• Major changes in a S.P.L. are mirrored by changes in its feature model
• Details of the evolution of the Linux feature model are not available
• Can changes in a feature models can give insights on how the implementation changes ?
3
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Questions
1. What types of changes can be applied to a FM ?
2. How can we automate the extraction of feature changes
from a large scale FM?
3. How does a large scale FM change over time ?
4
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Linux kernel • Very large feature model: 13k+ features
• Long history: 20+ years of existence
• Feature driven development: model “correctness”
5
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
A feature in a Kconfig file
if ACPI config ACPI_AC
tristate "AC Adapter" default y if ACPI depends X86 select POWER_SUPPLY help This driver supports the AC Adapter object ,(...).
endif
Name
Type & Prompt
Default
Depends
Select
(help text)
Additional structures
6
Kconfig file
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Linux feature changes
7
if ACPI config ACPI_AC
tristate "AC Adapter" default y if ACPI depends X86 select POWER_SUPPLY
endif
V1
if ACPI config ACPI_AC
boolean "AC Adapter” default y if ACPI default n if AIX depends X86 || AMD select POWER_SUPPLY
endif
V2
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Change classification
8
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Feature
Attribute Depends Default Select Add Remove Modify
Type Prompt
Expression References
Default value Condition References
Select Condition References
Add Remove Modify
Add Remove Modify Add Remove Modify Add Remove Modify
Add Remove Modify Add Remove Modify
Add Remove Modify
Add Remove Modify
CHANGE CATEGORY
CHANGE SUB-CATEGORY CHANGE TYPE
Classifying changes
9
if ACPI config ACPI_AC
boolean "AC Adapter" default y if ACPI default n if AIX depends X86 || AMD select POWER_SUPPLY
endif
Rev. Feature Change type Change category
Change subcategory
Old value
New value
2 ACPI_AC Modification Change Attr. Change type “Tristate” “Boolean”
2 ACPI_AC Modification Add default Add default value n
2 ACPI_AC Modification Add default Add def. condition AIX
2 ACPI_AC Modification Modify depends Modify depends X86 X86||AMD
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
FMDiff: getting the changes
10
Linux repository
Feature model translation
X86 v1
X86 v2
X86 v…
FMDiff
Feature model reconstruction (EMF)
Feature model comparison (EMF Compare)
Feature change classification
Feature change repository
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
From Kconfig to Kdump
11
if ACPI config ACPI_AC
tristate "AC Adapter" default y if ACPI depends X86 select POWER_SUPPLY
endif
config ACPI_AC
tristate "AC Adapter" default y if ACPI depends X86 && ACPI select POWER_SUPPLY
1- Kconfig (original) 2- Hierarchy flattening
config ACPI_AC
tristate "AC Adapter" default y if X86 && ACPI depends X86 && ACPI select POWER_SUPPLY if X86 && ACPI
3- Depends propagation Item ACPI_AC tristate Prompt ACPI_AC 1 Default ACPI_AC "y" "X86 && ACPI" Depends ACPI_AC "X86 && ACPI" ItemSelects ACPI_AC POWER_SUPPLY "X86 && ACPI”
4- Kdump format (what we use)
Credits to for Undertaker and the translation process
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Rebuilding
12
Kdump Feature Model
v1
Kdump Feature Model
v2
Feature model reconstruction (EMF)
Feature Model (Ecore)
EMF Feature
model Instance
v1
EMF Feature
model Instance
v2
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Meta model
13
Feature
Type (string)Prompt (boolean)Depends (string)
DependsReferences (list of strings)
Select StatementTarget (string)
Condition (string)SelectConditionReferences (list of strings)
Default StatementDefaultValue (string)
Condition (string)DefaultValueReferences (list of strings)
DefaultValueConditionReferences (list of strings)
"contains"
"contains"
"contains"
FeatureModel
Architecture (string)Revision (string)
0*
0 *
0 *
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Example
14
Item ACPI_AC tristate Depends ACPI_AC "X86 && ACPI" …
Item ACPI_AC tristate Depends ACPI_AC “(X86 || AMD) && ACPI" …
V1 V2
Feature Model Architecture: X86
Revision: 1
Feature Name: ACPI_AC
Depends: “X86 && ACPI” Depends references:
[X86,ACPI]
Feature Model Architecture: X86
Revision: 2
Feature Name: ACPI_AC
Depends: “(AMD || X86) && ACPI” Depends references:
[X86,ACPI,AMD]
Feature Meta-Model (Ecore)
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
EMF Compare
15
Feature Model Architecture: X86
Revision: 1
Feature Name: ACPI_AC
Depends: “X86 && ACPI” Depends references:
[X86,ACPI]
Feature Model Architecture: X86
Revision: 2
Feature Name: ACPI_AC
Depends: “(AMD || X86) && ACPI” Depends references:
[X86,ACPI,AMD]
Mat
chin
g
Feature Model Architecture: X86
Revision: 1
Feature Model Architecture: X86
Revision: 2
Architecture Name
Feature Name: ACPI_AC
Depends: “X86 && ACPI” Depends references:
[X86,ACPI]
Feature Name: ACPI_AC
Depends: “(AMD || X86) && ACPI” Depends references:
[X86,ACPI,AMD]
Feature Name
Diff
eren
cing
Feature Model Architecture: X86
Attribute change: “Revision” “1”à“2”
Feature Name: ACPI_AC
Attribute change; “Depends”; “X86 && ACPI”à“(AMD||X8…” Attribute change; “Depends Ref.”; added “AMD”
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Feature model changes
16
Feature Model Architecture: X86
Attribute change; “Revision”; 1 à 2
Feature Name: ACPI_AC
Attribute change; “Depends”; “X86 && ACPI” à “(AMD||X86) Attribute change; “Depends Ref”; added “AMD”
Rev. Feature Change type Change category
Change subcategory
Old value
New value
2 ACPI_AC Modification Modify depends modify depends X86 X86||AMD
2 ACPI_AC Modification Modify depends add depends ref. AMD
… … … … … … …
Feature change classification
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Linux kernel dataset • 10 releases (from v2.6.38 to v3.8)
• Between 10,000 and 13,000 features in each release • 22 to 26 architectures • Approximately 7000 feature per architecture specific F.M.
• 1,8+ million feature change recorded • Tool and data available
• https://github.com/NZR/Software-Product-Line-Research
17
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Add and remove
18
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
v2.6.39 v3.0 v3.1 v3.2 v3.3 v3.4 v3.5 v3.6 v3.7 v3.8
Perc
enta
ge o
f cha
nges
(arc
hite
ctur
e av
erag
e)
Linux releases
MODIFIED REMOVED ADDED
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
493 772 397 1740 612 493 750 609 1068 544
Spread over architectures (modifications)
19
0
5
10
15
20
25
0 2 4 6 8 10
Series1
Series2
Series3
Series4
Series5
Series6
Series7
Series8
Series9
Series10
Series11
Series12
Series13
Series14
Series15
Series16
Series17
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
2.6.39 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8
Linux releases
num
ber o
f im
pact
ed a
rchi
tect
ures
5
10
15
20
25
Questions 1. What types of changes can be applied to a FM ?
Change classification for Kconfig
2. How can we automate the extraction of feature changes from a large scale FM?
We used Undertaker and EMF Compare 3. How does a large scale SPL FM change over time ?
Dataset available…
20
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner
Extracting feature model changes from the Linux Kernel using FMDiff
21
Modify Feature
Default
Modify
Add
CHANGE CATEGORY
CHANGE SUB-CATEGORY
CHANGE TYPE
Feature model change
Add Feature Remove Feature
Attribute
Add Remove Modify
Depends
Add Remove Modify Add Remove
Select
Add Remove Modify
Type Prompt
ExpressionReferences
Default ValueCondition
References
Add Remove Modify Add Remove Modify Remove Modify Add Remove Modify
Target Condition
References
Change Category
Change classification Tool and approach
Tool and dataset at your disposal Nicolas Dintzner
Pr. Arie Van Deursen Pr. Martin Pinzger
Contact: Nicolas Dintzner [email protected]
https://github.com/NZR/Software-Product-Line-Research
Extracting feature model changes from the Linux kernel with FMDiff - Nicolas Dintzner