fosd presentation

66
Towards a Catalog of Variability Evolution Patterns – The Linux Kernel Case Leonardo Passos University of Waterloo [email protected] Krzysztof Czarnecki University of Waterloo [email protected] Andrzej Wasowski IT University of Copenhagen [email protected] IV International Workshop on Feature Oriented Software Development (FOSD’12) 1/28

Upload: leonardo-passos

Post on 18-Dec-2014

113 views

Category:

Technology


0 download

DESCRIPTION

Presentation of our paper at FOSD 2012

TRANSCRIPT

Page 1: FOSD Presentation

Towards a Catalog of Variability Evolution Patterns – TheLinux Kernel Case

Leonardo Passos

University of Waterloo

[email protected]

Krzysztof Czarnecki

University of Waterloo

[email protected]

Andrzej Wasowski

IT University of Copenhagen

[email protected]

IV International Workshop on Feature Oriented Software Development (FOSD’12)1/28

Page 2: FOSD Presentation

In evolving variant-richsoftware. . .

2/28

Page 3: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 4: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 5: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 6: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 7: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 8: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 9: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 10: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.

3/28

Page 11: FOSD Presentation

In evolving variant-rich software. . .

• New features are added

• Features are removed

1. feature is no longer supported: complete removal

2. feature continues to be supported, but its abstraction is no longerpresent (disappears from the variability model).

Examples:

• merge

• split

• rename

• Constraints are changed, etc.3/28

Page 12: FOSD Presentation

Example(from Linux)

4/28

Page 13: FOSD Presentation

Ralink Drivers

RT2860

...

... ...RT3090

4/28

Page 14: FOSD Presentation

Ralink Drivers

RT2860

...

... ...RT3090

4/28

Page 15: FOSD Presentation

Ralink Drivers

RT2860

...

... ...

Complete removal?

4/28

Page 16: FOSD Presentation

Ralink Drivers

RT2860

...

... ...

Complete removal?

4/28

Page 17: FOSD Presentation

Existing evolution studies tendto focus on the variability model

alone

5/28

Page 18: FOSD Presentation

That doesn’t tell the wholestory. . .

6/28

Page 19: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

7/28

Page 20: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

Configuration space

7/28

Page 21: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

Compilation space

7/28

Page 22: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

Implementationspace

7/28

Page 23: FOSD Presentation

Spaces are connected. . .

7/28

Page 24: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

7/28

Page 25: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

7/28

Page 26: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

7/28

Page 27: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

7/28

Page 28: FOSD Presentation

With the three spaces in mind,the real picture of . . .

8/28

Page 29: FOSD Presentation

Ralink Drivers

RT2860

...

... ...RT3090

is

8/28

Page 30: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

8/28

Page 31: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

copy

copy

copy

RT3090 is merged into RT2860

8/28

Page 32: FOSD Presentation

Ralink Drivers

RT2860... ...RT3090

copy

copy

copy

RT3090 is merged into RT28608/28

Page 33: FOSD Presentation

We want to know. . .

9/28

Page 34: FOSD Presentation

How do the three spaces evolvetogether in real world variant

rich software?

Focus: features that disappear from the

configuration space

10/28

Page 35: FOSD Presentation

How do the three spaces evolvetogether in real world variant

rich software?

Focus: features that disappear from the

configuration space

10/28

Page 36: FOSD Presentation

Two goals

Understand the evolution of the three spaces in areal-word variant rich software

Document our understanding in the form of evolutionpatterns (preliminary).

11/28

Page 37: FOSD Presentation

Two goals

Understand the evolution of the three spaces in areal-word variant rich software

Document our understanding in the form of evolutionpatterns (preliminary).

11/28

Page 38: FOSD Presentation

Our subject of analysis

12/28

Page 39: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 40: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 41: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 42: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 43: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 44: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 45: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 46: FOSD Presentation

Qualities of Linux as a subject of study

• Mature: over 20 years since its first release

• Complex: over 6,000 features

• Changes are kept in a publicly available SCM Repository (git)

• Continuous development

• Contains multiple spaces:

◦ configuration space: Kconfig

◦ compilation space: Makefile

◦ implementation space: C code

13/28

Page 47: FOSD Presentation

Variability evolution patternsfrom Linux

14/28

Page 48: FOSD Presentation

Data collection & Analysis

• Data collection is limited to three pairs of stable kernel releases inx86 64

• For each pair, we considered only the features that disappearedfrom the configuration space

• Manual analysis of 140 removals from a total of 220 (63%)

15/28

Page 49: FOSD Presentation

Infrastructure

• Extraction and reuse of Kconfig parsing infrastructure from Linuxitself

◦ allow us to compute disappearing features among each release kernel

• Conversion of Linux patches from git into a relational database

◦ allow us to quickly identify which commit erases a feature from theconfiguration space

• git log + gitk, grep: visualize and search logs

16/28

Page 50: FOSD Presentation

Extracting patterns is hard!

Difficulties in analyzing patches when collecting patterns:

• unrelated changes (noise)

• technical comments (too much jargon)

• extensive set of changes

• everything is recorded in the SCM as addition/removal of lines(too low level)

17/28

Page 51: FOSD Presentation

Four identified patterns

• Optional feature to implicit mandatory

• Computed attributed feature to code

• Merge features by module aliasing

• Optional feature to kernel parameter

Template: structure, instance and discussion

18/28

Page 52: FOSD Presentation

Four identified patterns

• Optional feature to implicit mandatory

• Computed attributed feature to code

• Merge features by module aliasing

• Optional feature to kernel parameter

Template: structure, instance and discussion

18/28

Page 53: FOSD Presentation

Optional feature to implicitmandatory

19/28

Page 54: FOSD Presentation

Structure & Instance

Y... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC

(Before)

... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC[X\Y]

#ifdef X

if X,

(After)

Instance: X = OCFS, Y= OCFS Access Control List

20/28

Page 55: FOSD Presentation

Structure & Instance

Y... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC

(Before)

... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC[X\Y]

#ifdef X

if X,

(After)

Instance: X = OCFS, Y= OCFS Access Control List

20/28

Page 56: FOSD Presentation

Structure & Instance

Y... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC

(Before)

... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC[X\Y]

#ifdef X

if X,

(After)

Instance: X = OCFS, Y= OCFS Access Control List

20/28

Page 57: FOSD Presentation

Structure & Instance

Y... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC

(Before)

... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC[X\Y]

#ifdef X

if X,

(After)

Instance: X = OCFS, Y= OCFS Access Control List

20/28

Page 58: FOSD Presentation

Structure & Instance

Y... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC

(Before)

... ...

X

if Y, compile Y.c into Y.o compile X.c into X.c

Y.c #ifdef Y ...#endif

CTC[X\Y]

#ifdef X

if X,

(After)

Instance: X = OCFS, Y= OCFS Access Control List

20/28

Page 59: FOSD Presentation

Discussion

Pattern should be used when:

• users should not be given the freedom to configure Y

◦ e.g.: they may inadvertly forget to select it, as in Access Control List(Y)

• Y is a critical feature that makes sense to exist in the software,given the presence of its parent X

21/28

Page 60: FOSD Presentation

Our patterns have directimplications. . .

22/28

Page 61: FOSD Presentation

Direct implications

• Existing evolution studies (She et al. at Vamos’10, Lotufo et. al.at SPLC’10) focus on the variability model alone: our patternsshow that features can be erased from the configuration space,while still present in the implementation space

• Our patterns capture situations not covered by the existing SPLevolution theory (Borba et al. at ITAC’10)

◦ compatibility of product is not guaranteed (evolution is not safe)

23/28

Page 62: FOSD Presentation

Conclusions

24/28

Page 63: FOSD Presentation

Conclusions

• Evolution must focus on all spaces

• We presented 4 patterns extracted from Linux

• Our patterns explain the evolution of features removed from theconfiguration space

• They show evolution steps not captured in previous studies (boththeoretical and empirical).

25/28

Page 64: FOSD Presentation

Future work

26/28

Page 65: FOSD Presentation

Future work

• Collect patterns not restricted to removals

• Measure frequency

• Study other systems

27/28

Page 66: FOSD Presentation

Thanks for listening!

28/28