analysis of defaults in real world variability models
DESCRIPTION
TRANSCRIPT
![Page 1: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/1.jpg)
Defaults Analyses in non-Boolean Feature Models
Leonardo Passos([email protected])
February 2012
1 / 19
![Page 2: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/2.jpg)
Outline
Proposed Analysis
Initial Definitions
Analysis Encoding
Case Study: CDL
2 / 19
![Page 3: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/3.jpg)
Proposed Analysis
3 / 19
![Page 4: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/4.jpg)
Analysis
Given a model with defaults, is it the case that for every correctpartial configuration, its completion using defaults result in aconflict-free completion?
4 / 19
![Page 5: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/5.jpg)
Initial Definitions
5 / 19
![Page 6: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/6.jpg)
Encoding of Boolean FMs with no Defaults
I Given a feature model (FM) M, let F = {f1, . . . , fn} be theset of its features.
I Each analysis over F is modelled as a SAT problem (given toSMT Solvers).
I Encoding scheme for Boolean FMs with no defaults:I E = {e1, . . . , en}: set of variables, each denoting a feature’s
enabled state.
I Φ = ΦFM ∧ ΦCTC: satisfiability constraint
6 / 19
![Page 7: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/7.jpg)
Encoding of Boolean FMs with Defaults
I E and Φ as before.
I DE = {de1 , . . . , den}: set of variables, each denoting afeature’s default enable state.
I OE = {oe1 , . . . , oen}: set of variables, each controlling if afeature’s default enable state has been overridden by the user.
I UE = {ue1 , . . . , uen}: set of variables, each denoting afeature’s enable state as set by the user.
7 / 19
![Page 8: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/8.jpg)
Encoding of Boolean FMs with Defaults
I New satisfiability constraint:
Φ ∧ ΦSE ∧ ΦDE ∧ ΦOE
7 / 19
![Page 9: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/9.jpg)
Encoding of Boolean FMs with Defaults
I New satisfiability constraint:
Φ ∧ ΦSE ∧ ΦDE ∧ ΦOE
I ΦSE : source of a feature’s enabled value.
n∧i=1
ei = (oei ?uei : dei )
7 / 19
![Page 10: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/10.jpg)
Encoding of Boolean FMs with Defaults
I New satisfiability constraint:
Φ ∧ ΦSE ∧ ΦDE ∧ ΦOE
I ΦDE : defaults setting.
n∧i=1
dei = default enabled expression for fi
7 / 19
![Page 11: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/11.jpg)
Encoding of Boolean FMs with Defaults
I New satisfiability constraint:
Φ ∧ ΦSE ∧ ΦDE ∧ ΦOE
I ΦOE : controls which features cannot have the enabled valueoverridden. ∧
i∈{k | fk∈F , ¬overridableE(fk )}
oei = false
where
overridableE(fi ) =
{false, fi is mandatory
true, otherwise
7 / 19
![Page 12: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/12.jpg)
Encoding of Non-Boolean Feature Models with Defaults
I E , DE , OE , UE , ΦSE , ΦDE , ΦOE as before
I Create set of variables and constraints for the data value part:V, DV , OV , UV , ΦSV , ΦDV , ΦOV .
I Φ = ΦFM ∧ ΦCTC is now defined over E and V.
I Note that:I |V = {v1, . . . , vm}| ≤ |E|
I |DV | = |V| ≤ |DE |
I |OV | = |V| ≤ |OE |
I |UV | = |V| ≤ |UE |
8 / 19
![Page 13: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/13.jpg)
Analysis Encoding
9 / 19
![Page 14: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/14.jpg)
Analysis Statement
Given a model with defaults, is it the case that for every correctpartial configuration, its completion using defaults result in a
conflict-free completion?
10 / 19
![Page 15: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/15.jpg)
Abstract Idea
Partial configuration+
completion(SAT)
Partial configuration+
default completion with conflicts(SAT)
User provided value Correct completion value Default completion value
Coun
ter e
xample
copied
copied
copied
M1 M2
11 / 19
![Page 16: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/16.jpg)
1) Build M1I Model M1 has no defaults.
I Solution: use completion variables instead.
I Sets of variables:
I E : enable variables.
I CE (new): enabledcompletion valuevariables.
I HUE (new): flag variablesthat signal whether theuser has set a feature’senabled state.
I UE : user set enabledvalue variables.
I V: set of data valuevariables.
I CV (new): data valuecompletion variables.
I HUV (new) : flagvariables that signalwhether the user has seta feature’s data value.
I UV : user set data valuevariables.
12 / 19
![Page 17: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/17.jpg)
1) Build M1
I Satisfiability constraint ΦM1:
Φ1 ∧ ΦSE1∧ ΦSV1
∧ ΦHUE1∧ ΦHUV1
12 / 19
![Page 18: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/18.jpg)
1) Build M1
I Satisfiability constraint ΦM1:
Φ1 ∧ ΦSE1∧ ΦSV1
∧ ΦHUE1∧ ΦHUV1
I ΦSE : source of a feature’s enabled value.
n∧i=1
ei = (hei ?uei : cei )
where ei ∈ E , hei ∈ HUE , uei ∈ UE and cei ∈ CE .
I ΦSV : analogous, but manipulates variables related to V.
12 / 19
![Page 19: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/19.jpg)
1) Build M1
I Satisfiability constraint ΦM1:
Φ1 ∧ ΦSE1∧ ΦSV1
∧ ΦHUE1∧ ΦHUV1
I ΦHUE: controls which features cannot have the enabled value
set by the user. ∧i∈{k | fk∈F , ¬overridableE(fk )}
hei = false
where overridableE(fi ) is as defined before.
I ΦHV : analogous, but manipulates variables related to V.
12 / 19
![Page 20: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/20.jpg)
2) Copy User-Values to M2
I Copy constraint (ΦCOPY):(n∧
i=1
(oei2 = hei1)
)∧
(m∧i=1
(ovi2 = hvi1)
)∧(
n∧i=1
(uei2= uei1
)
)∧
(m∧i=1
(uvi2= uvi1
)
)
13 / 19
![Page 21: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/21.jpg)
3) Counter Example for Default Completion in M2
I Φ2 constraint was defined as
ΦFM2 ∧ ΦCTC2
I Counter example constraint (ΦCOUNTER-EXAMPLE-M2):
(ΦFM2 ∧ ¬ΦCTC2) ∧ (ΦSE2∧ ΦSV2
) ∧ (ΦDE2∧ ΦDV2
)
14 / 19
![Page 22: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/22.jpg)
4) Putting Everything Together
ΦM1 ∧ ΦCOPY ∧ ΦCOUNTER-EXAMPLE-M2
I If SMT Solver returns SAT, a counter example is readilyavailable.
I Otherwise, the SMT returns UNSAT: no counter exampleexists and the set of defaults is valid for all correct partialconfigurations.
15 / 19
![Page 23: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/23.jpg)
Case Study: CDL
16 / 19
![Page 24: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/24.jpg)
CDL Specifics
I CDL requires a new constraint: ΦDo (stating a feature’s legalvalues).
I Completion of M1 should be based on default-defaults.
17 / 19
![Page 25: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/25.jpg)
Analysis of CDL Models
I Analysis of existing CDL models, given this logical framework,is straightforward.
I In CDL, each feature has an enabled and data value part(n = m).
I Simple models were manually translated to Z3 SMT Solver asa proof of concept.
I Will it scale to the whole set of models?. . .
18 / 19
![Page 26: Analysis of defaults in real world variability models](https://reader030.vdocument.in/reader030/viewer/2022020207/5494a1d4ac7959132e8b4bf6/html5/thumbnails/26.jpg)
Questions?
19 / 19