Variability Modeling in the Real: A Perspective from the Operating - - PowerPoint PPT Presentation

variability modeling in the real a perspective from the
SMART_READER_LITE
LIVE PREVIEW

Variability Modeling in the Real: A Perspective from the Operating - - PowerPoint PPT Presentation

Variability Modeling in the Real: A Perspective from the Operating Systems Domain 25 th IEEE/ACM International Conference on Automated Software Engineering ASE 2010 Antwerp, Belgium, Sept. 22 nd , 2010 Thorsten Berger, Steven She, Rafael Lotufo,


slide-1
SLIDE 1

Variability Modeling in the Real: A Perspective from the Operating Systems Domain

Thorsten Berger 1

25th IEEE/ACM International Conference on Automated Software Engineering ASE 2010 Antwerp, Belgium, Sept. 22nd, 2010

Thorsten Berger, Steven She, Rafael Lotufo, Andrzej Wasowski, Krzysztof Czarnecki

slide-2
SLIDE 2

John Liebenberg / Barcroft Media andfinally.tv/2009/06/white-lions-released-into-wild

Biologists go into the Wild for their Studies…

slide-3
SLIDE 3

John Liebenberg / Barcroft Media andfinally.tv/2009/06/white-lions-released-into-wild

Biologists go into the Wild for their Studies…

slide-4
SLIDE 4

John Liebenberg / Barcroft Media andfinally.tv/2009/06/white-lions-released-into-wild

Feature Model

Biologists go into the Wild for their Studies…

Mane Appearance Sex Male Female Lion Habitat Size Small Medium Large Color

slide-5
SLIDE 5

John Liebenberg / Barcroft Media andfinally.tv/2009/06/white-lions-released-into-wild

Feature Model

Biologists go into the Wild for their Studies…

Mane Appearance Sex Male Female Lion Habitat Size Small Medium Large Color

slide-6
SLIDE 6

Variability Modeling

Thorsten Berger 6

slide-7
SLIDE 7

Variability Modeling

Thorsten Berger 7

Variability Model

(15810 possible configurations)

slide-8
SLIDE 8

Variability Modeling

Thorsten Berger 8

Variability Model

(15810 possible configurations)

Configuration #1

slide-9
SLIDE 9

Variability Modeling

Thorsten Berger 9

Variability Model

(15810 possible configurations)

Configuration #1 Configuration #2

slide-10
SLIDE 10

Variability Modeling

Thorsten Berger 10

Variability Model

(15810 possible configurations)

Configuration #1 Configuration #2

“Variability needs in software are constantly increasing, because:

  • Variability moves from mechanics and

hardware to software,

  • Design decisions are delayed as long as

economically feasible.“ Jan Bosch

slide-11
SLIDE 11

Feature Modeling

Thorsten Berger 11

slide-12
SLIDE 12

Feature Modeling

Thorsten Berger 12

Other Domains

slide-13
SLIDE 13

Feature Modeling

Thorsten Berger 13

FMP

Tools Other Domains

slide-14
SLIDE 14

eclipse.org/proposals/feature-model

Common Variability Language (CVL)

Feature Modeling

Thorsten Berger 14

FMP

Tools Other Domains Standardization Efforts

slide-15
SLIDE 15

NOW, WHAT‘S THE PROBLEM?

Thorsten Berger 15

slide-16
SLIDE 16

What about Empirical Research?

  • A lot of research on variability, but not on real models!

Thorsten Berger 16

slide-17
SLIDE 17

What about Empirical Research?

  • A lot of research on variability, but not on real models!
  • Some industry reports available, but not the models!

Thorsten Berger 17

slide-18
SLIDE 18

What about Empirical Research?

  • A lot of research on variability, but not on real models!
  • Some industry reports available, but not the models!
  • Assumptions of real models used for synthetic examples!

Thorsten Berger 18

slide-19
SLIDE 19

What about Empirical Research?

  • A lot of research on variability, but not on real models!
  • Some industry reports available, but not the models!
  • Assumptions of real models used for synthetic examples!
  • Literature studies:

Thorsten Berger 19

slide-20
SLIDE 20

What about Empirical Research?

  • A lot of research on variability, but not on real models!
  • Some industry reports available, but not the models!
  • Assumptions of real models used for synthetic examples!
  • Literature studies:
  • Hubaux et al. [VAMOS10]:

° Only 2% of reviewed papers (8 of 415) discuss applications of Feature Models in practice ° Few details about their usage given

Thorsten Berger 20

slide-21
SLIDE 21

What about Empirical Research?

  • A lot of research on variability, but not on real models!
  • Some industry reports available, but not the models!
  • Assumptions of real models used for synthetic examples!
  • Literature studies:
  • Hubaux et al. [VAMOS10]:

° Only 2% of reviewed papers (8 of 415) discuss applications of Feature Models in practice ° Few details about their usage given

  • Chen et al. [SPLC09]:

° “There is only little, if any, experimental or detailed comparative analysis … of different VM approaches.” ° All VM approaches share similar concepts ° Some sort of reference model needed for model transformations, tools and future research

Thorsten Berger 21

slide-22
SLIDE 22

OUR STUDY…

Thorsten Berger 22

slide-23
SLIDE 23

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 23

slide-24
SLIDE 24

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 24

slide-25
SLIDE 25

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 25

slide-26
SLIDE 26

CONCEPTS, SEMANTICS AND USAGE OF… We study

Thorsten Berger 26

slide-27
SLIDE 27

Kconfig and CDL

Thorsten Berger 27

Linux Kernel 2.6.32

(22 hardware architectures, 6.4 mio. SLOC)

eCos 3.0

(embedded RTOS, 116 architectures, ~1 mio. SLOC)

6320 Features (X86) 1244 Features (I386) Kconfig language CDL language

slide-28
SLIDE 28

Kconfig and CDL

Thorsten Berger 28

Kconfig language

slide-29
SLIDE 29

Kconfig and CDL

Thorsten Berger 29

slide-30
SLIDE 30

Kconfig and CDL

Thorsten Berger 30

slide-31
SLIDE 31

SEMANTICS?

What do we mean by variability model

Thorsten Berger 31

slide-32
SLIDE 32

Variability Model Semantics

  • Configuration Space Semantics

Thorsten Berger 32

slide-33
SLIDE 33

Variability Model Semantics

  • Configuration Space Semantics

Thorsten Berger 33

menuconfig MISC_FILESYSTEMS bool "Miscellaneous filesystems" if MISC_FILESYSTEMS config JFFS2_FS tristate "Journalling Flash FS" if MTD select CRC32 if MTD config JFFS2_FS_DEBUG int "JFFS2 Debug level (0=quiet, 2=noisy)" depends on JFFS2_FS default 0 range 0 2

  • -- help ---

Debug verbosity of ...

C1={(JFFS2,y),(JFFS2_DEBUG,2),…} C2={(JFFS2,m),(JFFS2_DEBUG,0),…} Cn={(JFFS2,n),(JFFS2_DEBUG,0),…} Kconfig Model

slide-34
SLIDE 34

METHODOLOGY

Thorsten Berger 34

slide-35
SLIDE 35

Methodology - Design Space

Thorsten Berger 35

  • Reverse-engineered formal semantics (denotational style)
slide-36
SLIDE 36

Methodology - Design Space

Thorsten Berger 36

examples tools and their source code documentation

  • Reverse-engineered formal semantics (denotational style)
slide-37
SLIDE 37

Methodology - Design Space

Thorsten Berger 37

examples tools and their source code documentation

  • Reverse-engineered formal semantics (denotational style)

Abstract Syntax Semantic Domain Semantic Function

slide-38
SLIDE 38

Methodology - Design Space

Thorsten Berger 38

examples tools and their source code documentation

  • Reverse-engineered formal semantics (denotational style)

Abstract Syntax Semantic Domain Semantic Function

Propositional Semantic Domain Propositional Semantic Function Propositional Abstraction for Reasoners

slide-39
SLIDE 39

Methodology - Language Usage

Thorsten Berger 39

extension of configurators

LibCDL XConfig

slide-40
SLIDE 40

Methodology - Language Usage

Thorsten Berger 40

model export CDL

Intermediate Model

Kconfig

Intermediate Model

model export

extension of configurators

LibCDL XConfig

Linux and eCos models

slide-41
SLIDE 41

Methodology - Language Usage

Thorsten Berger 41

model export CDL

Intermediate Model

Kconfig

Intermediate Model

model export

extension of configurators

LibCDL XConfig

analysis infrastructure

parsing parsing

Linux and eCos models

slide-42
SLIDE 42

Methodology - Language Usage

Thorsten Berger 42

model export CDL

Intermediate Model

Kconfig

Intermediate Model

model export

extension of configurators

LibCDL XConfig

analysis infrastructure

parsing parsing

Linux and eCos models

slide-43
SLIDE 43

Methodology - Language Usage

Thorsten Berger 43

model export CDL

Intermediate Model

Kconfig

Intermediate Model

model export

extension of configurators

LibCDL XConfig

analysis infrastructure

parsing parsing

ϕecos

propositional abstraction

ϕlinux

propositional abstraction

Linux and eCos models

slide-44
SLIDE 44

Methodology - Language Usage

Thorsten Berger 44

model export CDL

Intermediate Model

Kconfig

Intermediate Model

model export

extension of configurators

LibCDL XConfig

analysis infrastructure

parsing parsing

ϕecos

propositional abstraction

ϕlinux

propositional abstraction

SAT-based analysis Linux and eCos models

slide-45
SLIDE 45

RESULTS

Thorsten Berger 45

slide-46
SLIDE 46

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 46

slide-47
SLIDE 47

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 47

slide-48
SLIDE 48

Feature Modeling Concepts

  • Concepts:
  • Boolean (optional), Integer and String features (attributes)
  • Hierarchy
  • Group constraints
  • Cross-tree constraints

Thorsten Berger 48

slide-49
SLIDE 49

Feature Modeling Concepts

  • Concepts:
  • Boolean (optional), Integer and String features (attributes)
  • Hierarchy
  • Group constraints
  • Cross-tree constraints
  • But intricate semantic interactions
  • Needed many iterations to get the formal semantics right
  • Often slightly different from what we expected

Thorsten Berger 49

slide-50
SLIDE 50

Feature Modeling Concepts

  • Concepts:
  • Boolean (optional), Integer and String features (attributes)
  • Hierarchy
  • Group constraints
  • Cross-tree constraints
  • But intricate semantic interactions
  • Needed many iterations to get the formal semantics right
  • Often slightly different from what we expected
  • Some (but minor) violations of feature modeling rules

Thorsten Berger 50

slide-51
SLIDE 51

Feature Modeling Concepts

  • Concepts:
  • Boolean (optional), Integer and String features (attributes)
  • Hierarchy
  • Group constraints
  • Cross-tree constraints
  • But intricate semantic interactions
  • Needed many iterations to get the formal semantics right
  • Often slightly different from what we expected
  • Some (but minor) violations of feature modeling rules
  • Languages benefit from being domain-specific

Thorsten Berger 51

slide-52
SLIDE 52

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 52

slide-53
SLIDE 53

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 53

slide-54
SLIDE 54

Beyond Feature Modeling

  • Concepts for scalability

Thorsten Berger 54

slide-55
SLIDE 55

Beyond Feature Modeling

  • Concepts for scalability
  • Visibility

Thorsten Berger 55

slide-56
SLIDE 56

Beyond Feature Modeling

  • Concepts for scalability
  • Visibility
  • Modularization

Thorsten Berger 56

slide-57
SLIDE 57

Beyond Feature Modeling

  • Concepts for scalability
  • Visibility
  • Modularization
  • Derived defaults /

derived features

Thorsten Berger 57

slide-58
SLIDE 58

Beyond Feature Modeling

  • Concepts for scalability
  • Visibility
  • Modularization
  • Derived defaults /

derived features

  • Expressive constraints
  • Kconfig: Three-state logic (follows Kleene‘s rules)
  • CDL: Comparison, arithmetic and String operators

Thorsten Berger 58

slide-59
SLIDE 59

Beyond Feature Modeling

  • Concepts for scalability
  • Visibility
  • Modularization
  • Derived defaults /

derived features

  • Expressive constraints
  • Kconfig: Three-state logic (follows Kleene‘s rules)
  • CDL: Comparison, arithmetic and String operators
  • Code mappings / build specifications

Thorsten Berger 59

Debug Level :int Compress Data Journalling Flash File System

  • Misc. Filesystems

Support ZLIB Default Compression None Size Priority

Mapping

Source files

… #IFDEF F1 … #IF defined(F4 & F6 ) … #ENDIF … ENDIF

slide-60
SLIDE 60

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 60

slide-61
SLIDE 61

Three Research Questions

  • 1. Can we provide quantitative and qualitative empirical

evidence whether Feature Modeling concepts are used in real-world languages?

  • 2. Are additional concepts needed?
  • 3. Are the assumptions about real models in the literature

correct?

Thorsten Berger 61

slide-62
SLIDE 62

Assumptions

  • We always see nicely balanced trees…

Thorsten Berger 62

www.feasiple.de/description/bsp_ess_en.html code.google.com/p/dslvariantmanagement/wiki/DemoShowCase msdn.microsoft.com/en-us/library/aa925157.aspx

slide-63
SLIDE 63

Assumption

  • But Linux and eCos models are very shallow!

Thorsten Berger 63

  • Avg. depth
  • Max. depth
  • Max. branching
  • No. of leaves

Linux 4 8 158 5316 (84%) eCos 3 6 29 947 (76%)

slide-64
SLIDE 64

Assumption

  • But Linux and eCos models are very shallow!

Thorsten Berger 64

eCos model

  • Avg. depth
  • Max. depth
  • Max. branching
  • No. of leaves

Linux 4 8 158 5316 (84%) eCos 3 6 29 947 (76%)

slide-65
SLIDE 65

Assumption

  • But Linux and eCos models are very shallow!

Thorsten Berger 65

eCos model

  • Avg. depth
  • Max. depth
  • Max. branching
  • No. of leaves

Linux 4 8 158 5316 (84%) eCos 3 6 29 947 (76%)

slide-66
SLIDE 66

Assumption

  • But Linux and eCos models are very shallow!

Thorsten Berger 66

eCos model Linux model

  • Avg. depth
  • Max. depth
  • Max. branching
  • No. of leaves

Linux 4 8 158 5316 (84%) eCos 3 6 29 947 (76%)

slide-67
SLIDE 67

Assumptions

Thorsten Berger 67

  • Branching factors with

high variation!

  • Avg. depth
  • Max. depth
  • Max. branching
  • No. of leaves

Linux 4 8 158 5316 (84%) eCos 3 6 29 947 (76%)

slide-68
SLIDE 68

Assumptions

Thorsten Berger 68

  • Branching factors with

high variation!

  • Avg. depth
  • Max. depth
  • Max. branching
  • No. of leaves

Linux 4 8 158 5316 (84%) eCos 3 6 29 947 (76%)

slide-69
SLIDE 69

Assumptions

Thorsten Berger 69

  • Branching factors with

high variation!

  • Avg. depth
  • Max. depth
  • Max. branching
  • No. of leaves

Linux 4 8 158 5316 (84%) eCos 3 6 29 947 (76%)

slide-70
SLIDE 70

Some More Findings

  • Cross-Tree Constraints ratio
  • Literature: 30-40%
  • Our models: 86%

Thorsten Berger 70

slide-71
SLIDE 71

Some More Findings

  • Cross-Tree Constraints ratio
  • Literature: 30-40%
  • Our models: 86%
  • Very large constraints exist (Linux: 56 features, eCos: 21)

Thorsten Berger 71

slide-72
SLIDE 72

Some More Findings

  • Cross-Tree Constraints ratio
  • Literature: 30-40%
  • Our models: 86%
  • Very large constraints exist (Linux: 56 features, eCos: 21)
  • Very few group constraints (OR, XOR, MUTEX)

Thorsten Berger 72

slide-73
SLIDE 73

Some More Findings

  • Cross-Tree Constraints ratio
  • Literature: 30-40%
  • Our models: 86%
  • Very large constraints exist (Linux: 56 features, eCos: 21)
  • Very few group constraints (OR, XOR, MUTEX)
  • Kconfig and CDL configurators
  • Configuration process is Re-Configuration!
  • Limited or no reasoning support

° Kconfig relies on an imperative construct for choice propagation ° CDL has an inference engine, which is correct but incomplete

Thorsten Berger 73

slide-74
SLIDE 74

Some More Findings

  • Cross-Tree Constraints ratio
  • Literature: 30-40%
  • Our models: 86%
  • Very large constraints exist (Linux: 56 features, eCos: 21)
  • Very few group constraints (OR, XOR, MUTEX)
  • Kconfig and CDL configurators
  • Configuration process is Re-Configuration!
  • Limited or no reasoning support

° Kconfig relies on an imperative construct for choice propagation ° CDL has an inference engine, which is correct but incomplete

  • Many more details in the paper!

Thorsten Berger 74

slide-75
SLIDE 75

CONCLUSIONS

Thorsten Berger 75

slide-76
SLIDE 76

Conclusions

  • Empirical studies are fundamentally necessary in the VM

field to guide future research and to provide requirements for tool developers.

Thorsten Berger 76

slide-77
SLIDE 77

Conclusions

  • Empirical studies are fundamentally necessary in the VM

field to guide future research and to provide requirements for tool developers.

  • The more ways we look at how real languages are designed

and how models look like, the more confidence we have that we understand Software Product Lines.

Thorsten Berger 77

slide-78
SLIDE 78

Conclusions

  • Empirical studies are fundamentally necessary in the VM

field to guide future research and to provide requirements for tool developers.

  • The more ways we look at how real languages are designed

and how models look like, the more confidence we have that we understand Software Product Lines.

  • In studying the models in-depth, our findings have confirmed

– and refuted – previous knowledge about variability languages and models.

Thorsten Berger 78

slide-79
SLIDE 79

Conclusions

  • Empirical studies are fundamentally necessary in the VM

field to guide future research and to provide requirements for tool developers.

  • The more ways we look at how real languages are designed

and how models look like, the more confidence we have that we understand Software Product Lines.

  • In studying the models in-depth, our findings have confirmed

– and refuted – previous knowledge about variability languages and models.

  • Understanding languages and extracting these models that

were evolved over 10 years kept us PhD students and the professors busy for almost half a year!

Thorsten Berger 79

slide-80
SLIDE 80

Variability Modeling in the Real: A Perspective from the Operating Systems Domain

Thorsten Berger 80

25th IEEE/ACM International Conference on Automated Software Engineering ASE 2010 Antwerp, Belgium, Sept. 22nd, 2010

Thorsten Berger, Steven She, Rafael Lotufo, Andrzej Wasowski, Krzysztof Czarnecki

slide-81
SLIDE 81

APPENDIX

Thorsten Berger 81

slide-82
SLIDE 82

EXAMPLES

Thorsten Berger 82

slide-83
SLIDE 83

Hierarchy

  • Children can exclude their parent

Thorsten Berger 83

slide-84
SLIDE 84

Hierarchy

  • Children can exclude their parent

Thorsten Berger 84 config VIDEO_HELPER_CHIPS_AUTO bool "Autoselect pertinent encoders/decoders and other helper chips" default y

  • --help---

Most video cards may require additional modules to encode or config VIDEO_IR_I2C tristate "I2C module for IR" if !VIDEO_HELPER_CHIPS_AUTO depends on I2C && VIDEO_IR default y

  • --help---

Most boards have an IR chip directly connected via GPIO. menu "Encoders/decoders and other helper chips" depends on !VIDEO_HELPER_CHIPS_AUTO comment "Audio decoders" config VIDEO_TVAUDIO tristate "Simple audio decoder chips" depends on VIDEO_V4L2 && I2C

  • --help---

Support for several audio decoder chips found on some bt8xx boards:

slide-85
SLIDE 85

Defaults

  • Defaults can impose constraints in Kconfig

Thorsten Berger 85 config DW_DMAC tristate "Synopsys DesignWare AHB DMA support" depends on AVR32 select DMA_ENGINE default y if CPU_AT32AP7000

  • --help---

Support the Synopsys DesignWare AHB DMA controller. This can be integrated in chips such as the Atmel AT32ap7000.

  • We thought just
  • DW_DMAC → DMA_Engine Ʌ AVR32
  • But instead also
  • !AVR32 Ʌ CPU_AT32AP7000 → DW_DMAC Ʌ DMA_ENGINE
slide-86
SLIDE 86

Computed features

  • Computation of test cases

Thorsten Berger 86 cdl_component CYGPKG_HAL_TESTS { display "Common HAL tests" flavor data no_define calculated { "tests/context tests/basic„ . ((!CYGINT_HAL_TESTS_NO_CACHES) ? " tests/cache" : "") . ((CYGPKG_HAL_BUILD_COMPILER_TESTS) ? " tests/cpp1 tests/vaargs" : "") . ((!CYGVAR_KERNEL_COUNTERS_CLOCK) ? " tests/intr" : "") } description " This option specifies the set of tests for the common HAL."

slide-87
SLIDE 87

VARIABILITY MODELING APPROACHES

Thorsten Berger 87

slide-88
SLIDE 88

Variability Modeling Techniques

Thorsten Berger 88

Feature Models (FODA)

CDL Kconfig OVM COVAMOF Koalish Kumbang VPM KobrA FDL RequiLine CBFM DRM CONSUL Gears Forfamel VSL ConIPF

Concepts

slide-89
SLIDE 89

Feature Modeling Example

  • JFFS2 filesystem

Thorsten Berger 89

slide-90
SLIDE 90

Feature Modeling Example

  • JFFS2 filesystem

Thorsten Berger 90

Feature res

(Boolean (optional), String, Int)

slide-91
SLIDE 91

Feature Modeling Example

  • JFFS2 filesystem

Thorsten Berger 91

Hiera rarc rchy Feature res

(Boolean (optional), String, Int)

slide-92
SLIDE 92

Feature Modeling Example

  • JFFS2 filesystem

Thorsten Berger 92

Hiera rarc rchy Feature res

(Boolean (optional), String, Int)

Group p Co Const nstraints

slide-93
SLIDE 93

Feature Modeling Example

  • JFFS2 filesystem

Thorsten Berger 93

Hiera rarc rchy Feature res

(Boolean (optional), String, Int)

Group p Co Const nstraints

Cross ss-Tree Const strai aints