Reverse Engineering Feature Models.
. .
- S. She, R. Lotufo, T. Berger, A. Wasowski, K. Czarnecki
Generative Software Development Lab University of Waterloo
. .
International Conference on Software Engineering, Honolulu, Hawaii, USA.
Reverse Engineering Feature Models. . . S. She, R. Lotufo, T. - - PowerPoint PPT Presentation
Reverse Engineering Feature Models. . . S. She, R. Lotufo, T. Berger, A. Wasowski, K. Czarnecki Generative Software Development Lab University of Waterloo . . International Conference on Software Engineering, Honolulu, Hawaii, USA.
Reverse Engineering Feature Models.
. .
Generative Software Development Lab University of Waterloo
. .
International Conference on Software Engineering, Honolulu, Hawaii, USA.
Outline.
1
Introduction
2
Feature Models
3
Procedures
4
Evaluation
5
Conclusions
. . Steven She. . Reverse Engineering Feature Models. . 2 / 29
Timeline.
. . SPLC ’07 . SPLC ’08 . VaMoS ’10 . SPLC ’10 . ASE ’10 . ICSE ’11 . Propositional logic and FMs. . Sample spaces and FMs. . Initial study on the Linux FM. . Evolution of Linux feature models. . Linux and eCos feature models. .
parts of the FreeBSD FMs.
. . Steven She. . Reverse Engineering Feature Models. . 3 / 29
Motivation.
software product lines (SPLs), e.g. Linux and eCos.
understand for users and developers.
project artifacts.
. . Steven She. . Reverse Engineering Feature Models. . 4 / 29
Outline.
1
Introduction
2
Feature Models
3
Procedures
4
Evaluation
5
Conclusions
. . Steven She. . Reverse Engineering Feature Models. . 5 / 29
A Propositional Feature Model…
is a Tree + Cross-Tree Constraints.
powersave cpu_hotplug cpu_freq performance acpi pm acpi_system
powersave ∧ acpi → cpu_hotplug
. . Steven She. . Reverse Engineering Feature Models. . 6 / 29
Configuration Semantics.
A feature model describes a set of legal configurations. Legal configurations can be represented by a formula.
. . Steven She. . Reverse Engineering Feature Models. . 7 / 29
Formula.
powersave cpu_hotplug cpu_freq performance acpi pm acpi_system
powersave ∧ acpi → cpu_hotplug φ = child-parent impl. ∧ mandatory impl. ∧ implies edges ∧ excludes edges ∧ feature groups ∧ cross-tree constraints
. . Steven She. . Reverse Engineering Feature Models. . 8 / 29
Propositional Logic to Feature Models.
Given φ, there are many possible feature models that describe its legal configurations. FM = tree + cross-tree constraints.
. . Steven She. . Reverse Engineering Feature Models. . 9 / 29
Ontological semantics.
Linux net staging dst Linux net staging dst
dst is an experimental feature.
different ontological semantics.
assistance.
. . Steven She. . Reverse Engineering Feature Models. . 10 / 29
Ontological semantics.
Linux net staging dst Linux net staging dst
dst is an experimental feature.
different ontological semantics.
assistance.
. . Steven She. . Reverse Engineering Feature Models. . 10 / 29
Outline.
1
Introduction
2
Feature Models
3
Procedures
4
Evaluation
5
Conclusions
. . Steven She. . Reverse Engineering Feature Models. . 11 / 29
Overview.
Key challenge.
Reverse-Engineering Procedures.
building hierarchy.
edges are automatically detected.
. . Steven She. . Reverse Engineering Feature Models. . 12 / 29
Overview.
Key challenge.
Reverse-Engineering Procedures.
building hierarchy.
edges are automatically detected.
. . Steven She. . Reverse Engineering Feature Models. . 12 / 29
Required Input.
. .
Feature Names .
Descriptions .
Dependencies
. . Steven She. . Reverse Engineering Feature Models. . 13 / 29
Names and Descriptions.
pm Power management, CPU and ACPI options acpi Adv. Configuration and Power Interface support acpi_system Enable your system to shut down using ACPI cpu_freq CPU frequency scaling cpu_hotplug Allows turning CPU on and off powersave This CPU governor uses the lowest frequency performance This CPU governor uses the highest frequency
. . Steven She. . Reverse Engineering Feature Models. . 14 / 29
Dependencies.
(acpi → acpi_system ∧ pm) ∧ (acpi_system → acpi) ∧ (cpu_freq → pm) ∧ (cpu_freq → powersave ∨ performance) ∧ (cpu_hotplug → powersave) ∧ (cpu_hotplug → ¬performance) ∧ (cpu_hotplug → acpi ∧ cpu_freq) ∧ (powersave → ¬performance) ∧ (powersave → cpu_freq) ∧ (performance → cpu_freq) ∧ (powersave ∧ acpi → cpu_hotplug)
. . Steven She. . Reverse Engineering Feature Models. . 15 / 29
Parent Candidates.
Ranked Implied Features Ranked All-Features
Selected: cpu_hotplug
1 . 2. 3. 4. 5. powersave acpi acpi_system cpu_freq pm CPU frequency scaling. 1 . 2. 3. 4. 5. cpu_freq powersave performance acpi acpi_system ...
feature implies sorted by similarity.
similarity.
. . Steven She. . Reverse Engineering Feature Models. . 16 / 29
Implication Graph.
pm cpu_freq powersave performance acpi acpi_system cpu_hotplug
. . Steven She. . Reverse Engineering Feature Models. . 17 / 29
Similarity Heuristic.
how many words they share.
document frequency (IDF) between the two features.
implications then all remaining implications, sorted by δ.
. . Steven She. . Reverse Engineering Feature Models. . 18 / 29
Groups and Cross-Tree Constraints.
groups, and the remaining edges in the implication and mutex graphs.
. . Steven She. . Reverse Engineering Feature Models. . 19 / 29
Outline.
1
Introduction
2
Feature Models
3
Procedures
4
Evaluation
5
Conclusions
. . Steven She. . Reverse Engineering Feature Models. . 20 / 29
Linux and eCos Feature Models.
. .
. . Steven She. . Reverse Engineering Feature Models. . 21 / 29
FreeBSD Reference Model.
. .
FreeBSD kernel.
. . Steven She. . Reverse Engineering Feature Models. . 22 / 29
Characterization of Input Data.
Number of Words Number of Features
50 100 150 200 100 200 300 400 500 600 2 4 6 8 10 100 200 300 400 500 600 700 50 100 150
Number of Implications
10 20 30 40 50 200 400 600 800 20 40 60 80 500 1000 1500 2000 20 40 60 80 100
ecos freebsd freebsd−ref linux . Steven She. . Reverse Engineering Feature Models. . 23 / 29
Measuring Effectiveness.
RIFs RAFs Is the reference parent in the Top 5 results? How many features do we have to examine to have a 75% chance of finding the reference parent?
randomly removing implications and words.
. . Steven She. . Reverse Engineering Feature Models. . 24 / 29
RIFs.
% of words in descriptions % in top 5
20 40 60 80 100 20 40 60 80 100
25% Impls
50 75 100
50% Impls
50 75 100
75% Impls
50 75 100
100% Impls
50 75 100
linux ecos
and 81% for eCos.
. . Steven She. . Reverse Engineering Feature Models. . 25 / 29
RAFs.
% of words in descriptions % of features to examine
10 20 30 40 50 60 10 20 30 40 50 60
50 75 100
linux ecos
. . Steven She. . Reverse Engineering Feature Models. . 26 / 29
Feature Groups.
% of exclude edges Number of groups
5 10 15 20 2 4 6 8 10
40 60 80 100
linux ecos
dependencies are incomplete.
. . Steven She. . Reverse Engineering Feature Models. . 27 / 29
Outline.
1
Introduction
2
Feature Models
3
Procedures
4
Evaluation
5
Conclusions
. . Steven She. . Reverse Engineering Feature Models. . 28 / 29
Conclusions.
Future Work.
Conclusions.
(RAFs) lists.
excludes edges and feature groups.
. . Steven She. . Reverse Engineering Feature Models. . 29 / 29