Analysis of Extended Feature Models - In cooperation with Sven ...
Analysis of Extended Feature Models - In cooperation with Sven ...
Analysis of Extended Feature Models - In cooperation with Sven ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong>Sebastian HennebergUniversity <strong>of</strong> PassauMarch 21, 2012<strong>In</strong> <strong>cooperation</strong> <strong>with</strong> <strong>Sven</strong> Apel, Don Batory and Thomas ThümSebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 1
Motivation<strong>In</strong>troducing Attributes◮ feature attributes can represent quite different things:• cost, performance, binary size, requirements, compatibility, . . .Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 2
Motivation◮ automated support <strong>of</strong> feature model (FM) analysis has beendone using . . .• propositional logic based tools• constraint satisfaction problems• description logic◮ each approach examines just a few analysis operations⇒ No known work <strong>with</strong> Pseudo Boolean SAT Solvers tosupport FM analysis[Automated <strong>Analysis</strong> <strong>of</strong> <strong>Feature</strong> <strong>Models</strong> 20 Years LaterBenavides, Segura, Ruiz-Cortés in <strong>In</strong>formation Systems, 2010]Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 3
SAT vs. PBSATSAT◮ input: conjunctive normal form (CNF)◮ output: has satisfiable variable assignment? [yes/no]◮ example: (x 1 ∨ ¬x 2 ∨ x 3 ) ∧ (x 2 ∨ ¬x 3 ∨ x 4 )PBSAT◮ input: linear (in)equations◮ output: has satisfiable variable assignment? [yes/no]◮ example: (3x 1 − 2x 2 + ¬x 3 = 2) ∧ (x 2 + ¬x 3 + x 4 ≥ 1)Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 4
SAT vs. PBSATSAT◮ input: conjunctive normal form (CNF)◮ output: has satisfiable variable assignment? [yes/no]◮ example: (x 1 ∨ ¬x 2 ∨ x 3 ) ∧ (x 2 ∨ ¬x 3 ∨ x 4 )PBSAT◮ input: linear (in)equations◮ output: has satisfiable variable assignment? [yes/no]◮ example: (3x 1 − 2x 2 + ¬x 3 = 2) ∧ (x 2 + ¬x 3 + x 4 ≥ 1)SAT boolean variable clause conjunction <strong>of</strong> clausesPBSAT 0-1 variable linear (in)equality conjunction <strong>of</strong> linear (in)equalitySebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 4
SAT vs. PBSATSAT◮ input: conjunctive normal form (CNF)◮ output: has satisfiable variable assignment? [yes/no]◮ example: (x 1 ∨ ¬x 2 ∨ x 3 ) ∧ (x 2 ∨ ¬x 3 ∨ x 4 )PBSAT◮ input: linear (in)equations◮ output: has satisfiable variable assignment? [yes/no]◮ example: (3x 1 − 2x 2 + ¬x 3 = 2) ∧ (x 2 + ¬x 3 + x 4 ≥ 1)SAT boolean variable clause conjunction <strong>of</strong> clausesPBSAT 0-1 variable linear (in)equality conjunction <strong>of</strong> linear (in)equalitySebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 4
Transformation <strong>of</strong> FMs to PBSAT◮ feature diagram and constraints are processed individually◮ transformation <strong>of</strong> feature diagram is straightforward◮ transformation <strong>of</strong> constraints is done after conversion to CNFr ≥ 1r − a ≥ 0r − b = 0b − c − d = 0−c + a ≥ 1Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 5
Transformation <strong>of</strong> FMs to PBSAT◮ feature diagram and constraints are processed individually◮ transformation <strong>of</strong> feature diagram is straightforward◮ transformation <strong>of</strong> constraints is done after conversion to CNFr ≥ 1r − a ≥ 0r − b = 0b − c − d = 0−c + a ≥ 1Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 5
Transformation <strong>of</strong> FMs to PBSAT◮ feature diagram and constraints are processed individually◮ transformation <strong>of</strong> feature diagram is straightforward◮ transformation <strong>of</strong> constraints is done after conversion to CNFr ≥ 1r − a ≥ 0r − b = 0b − c − d = 0−c + a ≥ 1Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 5
Transformation <strong>of</strong> FMs to PBSAT◮ feature diagram and constraints are processed individually◮ transformation <strong>of</strong> feature diagram is straightforward◮ transformation <strong>of</strong> constraints is done after conversion to CNFr ≥ 1r − a ≥ 0r − b = 0b − c − d = 0−c + a ≥ 1Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 5
Transformation <strong>of</strong> FMs to PBSAT◮ feature diagram and constraints are processed individually◮ transformation <strong>of</strong> feature diagram is straightforward◮ transformation <strong>of</strong> constraints is done after conversion to CNFr ≥ 1r − a ≥ 0r − b = 0b − c − d = 0−c + a ≥ 1Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 5
Transformation <strong>of</strong> FMs to PBSAT◮ feature diagram and constraints are processed individually◮ transformation <strong>of</strong> feature diagram is straightforward◮ transformation <strong>of</strong> constraints is done after conversion to CNFr ≥ 1r − a ≥ 0r − b = 0b − c − d = 0−c + a ≥ 1 (¬c ∨ a)Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 5
Transformation <strong>of</strong> FMs to PBSAT◮ feature diagram and constraints are processed individually◮ transformation <strong>of</strong> feature diagram is straightforward◮ transformation <strong>of</strong> constraints is done after conversion to CNFr ≥ 1r − a ≥ 0r − b = 0b − c − d = 0−c + a ≥ 1⇒ PBSAT can represent both basic and cardinality-based FMs!Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 5
Extending <strong>Feature</strong> <strong>Models</strong>PBSAT representation has integer coefficients⇒ What attribute types are possible?◮ single value integer• attribute = 3◮ integer ranges• attribute = [5,15]◮ finite integer sets• attribute = {3,5,7,9,11}◮ finite mutual exclusive choices (like enumerations)Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 6
Extending <strong>Feature</strong> <strong>Models</strong>Pain <strong>of</strong> different interpretations◮ What are the semantics <strong>of</strong> range attributes? or integer sets?◮ IMHO: empty intersection leads to invalid product◮ interpretation not standardized yet / not enough input⇒ we focused on single value integer attributesSebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 7
Expressing Attributes and Constraintssample attributes file:Phone.cost = 25;GPS.cost = 30;Standard.cost = 20;HD.cost = 55;Camera.cost = 35;Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 8
Expressing Attributes and Constraintssample attributes file:sample constraints file:25 Phone + GPS.cost + Standard.cost +HD.cost + Camera.cost
Expressing Attributes and Constraintssample attributes file:sample constraints file:25 Phone + GPS.cost + Standard.cost +HD.cost + Camera.cost
Expressing Attributes and Constraintssample attributes file:sample constraints file:25 Phone + GPS.cost + Standard.cost +HD.cost + Camera.cost
<strong>Analysis</strong> OperationsDomain Engineering◮ Model Validation: Void◮ <strong>Feature</strong> Properties: Core, Variant, Dead, False Optional◮ Simplification: Atomic Sets◮ Edits: General., Special., Refactoring, ArbitrarySebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 9
<strong>Analysis</strong> OperationsDomain Engineering◮ Model Validation: Void◮ <strong>Feature</strong> Properties: Core, Variant, Dead, False Optional◮ Simplification: Atomic Sets◮ Edits: General., Special., Refactoring, ArbitrarySebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 9
<strong>Analysis</strong> OperationsDomain Engineering◮ Model Validation: Void◮ <strong>Feature</strong> Properties: Core, Variant, Dead, False Optional◮ Simplification: Atomic Sets◮ Edits: General., Special., Refactoring, ArbitrarySebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 9
<strong>Analysis</strong> OperationsDomain Engineering◮ Model Validation: Void◮ <strong>Feature</strong> Properties: Core, Variant, Dead, False Optional◮ Simplification: Atomic Sets◮ Edits: General., Special., Refactoring, ArbitrarySebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 9
<strong>Analysis</strong> OperationsDomain Engineering◮ Model Validation: Void◮ <strong>Feature</strong> Properties: Core, Variant, Dead, False Optional◮ Simplification: Atomic Sets◮ Edits: General., Special., Refactoring, ArbitrarySebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 9
<strong>Analysis</strong> OperationsApplication Engineering◮ Propagation <strong>of</strong> feature selectionsSebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 10
Work in progressComprehensive evaluation◮ random/generated feature models (Benavides, Thüm)◮ non-functional properties (Siegmund)◮ Kconfig models (Czarnecki, Berger)◮ non-s<strong>of</strong>tware product lines (fast food, . . . )◮ extended feature models are rare in literature◮ companies do not provide models <strong>of</strong> their SPLs• . . . although they are configurable in webSebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 11
ContributionsPBSAT-related◮ PBSAT solvers for feature model analysis◮ transformation <strong>of</strong> feature models into PBSAT problems◮ PBSAT enables introduction <strong>of</strong> feature attributes◮ PBSAT can express additional constraints compact(even cardinality-based models!)◮ optimal products can be derived according to objective function<strong>Feature</strong> Model <strong>Analysis</strong>◮ proposal <strong>of</strong> a new definition <strong>of</strong> variant features◮ proposal for new definition and computation <strong>of</strong> atomic setsSebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 12
Future Work◮ integration <strong>of</strong> further algorithms• redundancy detection• anomaly/problem resolutions• exaplanations• optimal products (based on objective function)◮ integration in <strong>Feature</strong>IDE interface(current implementation is based on <strong>Feature</strong>IDE models)◮ feasibility <strong>of</strong> other solvers or combinations <strong>of</strong> solversSebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 13
Future Work◮ integration <strong>of</strong> further algorithms• redundancy detection• anomaly/problem resolutions• exaplanations• optimal products (based on objective function)◮ integration in <strong>Feature</strong>IDE interface(current implementation is based on <strong>Feature</strong>IDE models)◮ feasibility <strong>of</strong> other solvers or combinations <strong>of</strong> solversWe are looking forward to receiving extended feature models!Sebastian Henneberg: <strong>Analysis</strong> <strong>of</strong> <strong>Extended</strong> <strong>Feature</strong> <strong>Models</strong> 13