CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
Analyzing Feature Models and Configurations using Microsoft Solver Foundation
1. Juan Carlos Navarro
Jaime Chavarriaga
Using Microsoft
Solver Foundation to
analyze Feature
Models and
Configurations
1
2. Context
• Feature Models are the de facto standard for
documenting, checking and reasoning about the
configurations of a software system
• Well-known Applications:
• Domain Analysis in Software Product Lines
• Engineering of Product Configurators
2
3. Domain Analysis for Product Lines
MS Office
It is a Software
Product Line
Multiple products are
built based on a
predefined set of
assets (components)
3
5. Domain Analysis for Product Lines
Feature Model
Represents the
variability of the
products
5
6. • C1 = { Word, Excel, Powerpoint, OneNote}
• C2 = { Word, Excel, Powerpoint, OneNote , Access}
• C3 = { Word, Excel, Powerpoint, OneNote , Access, Publisher}
• C4 = { Word, Excel, Powerpoint, OneNote, Outlook}
• C5 = { Word, Excel, Powerpoint, OneNote , Access, Outlook}
• C6 = { Word, Excel, Powerpoint, OneNote , Access, Publisher, Outlook}
Domain Analysis for Product Lines
Feature
Configuration
Represents a
selection of features
6
7. Domain Analysis for Product Lines
Variability
Analysis
There are features
common to all the
products and
features that are
optional
7
Commonalities Variabilities
• C1 = { Word, Excel, Powerpoint, OneNote}
• C2 = { Word, Excel, Powerpoint, OneNote , Access}
• C3 = { Word, Excel, Powerpoint, OneNote , Access, Publisher}
• C4 = { Word, Excel, Powerpoint, OneNote, Outlook}
• C5 = { Word, Excel, Powerpoint, OneNote , Access, Outlook}
• C6 = { Word, Excel, Powerpoint, OneNote , Access, Publisher, Outlook}
8. Problem (I)
8
Given a Feature
Model for a
Family of
Products…
• Is this model valid?
• Are there constraints that cannot be satisfied at the
same time?
• All the features can be selected by a user ?
• Which features cannot be selected?
9. Related Work
There are some proposals to analyze feature models
Approach Representative works
Propositional Logic Convert FM to
propositional logic
expressions
Batory[2005],
Czarnecki[2005],
Gheyi[2006],
Mendonca[2010]
CSP Convert FMs to Constraint
Satisfaction Problems
Benavides[2005],
Karatas[2010],
Alvarez[2011],
Mazo[2011]
Description Logics Convert FMs to
Ontologies
Zaho[2004],
Fan [2006],
Wang [2007]
Others Use other processing
techniques
Mannion[2002],
Janota[2007],
Gheyi[2008],
Van der Broek [2010] 9
10. Related Work
Existing tools and libraries
Scope Technology
SPLOT Supports feature model and
configuration validation. Also it
supports configuration processes.
Java
FAMA Supports feature model and
configuration validation. Partial
supports configuration processes
Java
FAMILIAR Provides a DSL to process feature
models. Support validation and
configuration processes.
Java
10
11. Problem (II)
• Existing works cannot be used in .Net Platforms
• Existing works do not use CSP + Optimization
Solvers such as the MS Solver Foundation.
11
12. How can we analyse
Feature Models and Configurations
using
Microsoft Solver Foundation?
12
13. Our Approach
❶ Understand semantics for
Feature Models and Configurations
❷ Take the Models and Configurations and
Convert them to CSP/Optimization Problems
❸ Take these CSP/Optimization problems and
Solve it using MS solver Foundation
❹ Provide an
implementation and evaluation
13
15. Feature Model Semantics
15
Root
X
Y
X
Y
Root (Concept).
It must be selected
Mandatory.
If X is selected,
Y must be selected
Optional.
If X is selected,
Y can be (or not)
selected
X
Y1 Yi…
Y1 Yi…
X
X Y
X Y
Or-Group.
If X is selected, one or
more of Y1, .., Yi
must be selected.
Alternative-Group.
If X is selected, only one
of Y1, .., Yi
must be selected.
Requires
If X is selected, Y
must be selected.
Excludes
If X is selected, Y
must be not selected.
16. e.g., a FM for Cell Phones
16
Cellular Phone
Normal
Touch
Screen
External
Memory
KeyPad Small
Size
Large
Size
LCD
Input
Device
Battery
excludes
requires
Stylus
20. Converting a Feature Model
20
Root
X
Y
X
Y
Root (Concept).
𝑟 = 1
Mandatory.
𝑥 = 𝑦
Optional.
𝑥 ≥ 𝑦
X
Y1 Yi…
Y1 Yi…
X
X Y
X Y
Or-Group.
𝑥 = 1 → 𝑦𝑖 ≥ 1
Alternative-Group.
𝑥 = 1 → 𝑦𝑖 = 1
Requires
𝑥 ≤ 𝑦
Excludes
𝑥 + 𝑦 ≤ 1
23. Analysis Operations
Benavides et al. have defined some operations:
• Validating a Feature Model: there is at least one valid
configuration
• Validating a Product Configuration
• Validating a Partial Configuration
• Obtaining all the valid Product Configurations
• Calculating the number of Product Configurations
• Obtaining core features (mandatory)
• Obtaining dead features (non-selectable)
• Obtaining variant features
24. Operations: Validating a FM
ConvertFM( fm ) : ConstraintSystem
ConstraintSystem model;
model = ConstraintSystem.CreateSolver();
:
// introduces variables and constraints
:
return model;
25. Operations: Validating a FM
IsValid( ConstraintSystem model )
ConstraintSolverSolution solution = model.Solve();
return solution.HasFoundSolution;
26. Operations: Obtaining all Products
GetAllProducts( ConstraintSystem model )
List <Configuration> list;
list = new List <Configuration>() ;
ConstraintSolverSolution solution = model.Solve();
while ( solution.HasFoundSolution )
{
list.Add(new Configuration( solution ));
}
return list ;
27. Operations: Core Features
GetDeadFeatures( List<Feature> features, ConstraintSystem
model )
List <Feature> list = new List <Feature>();
foreach ( Feature f in features )
{
CspTerm constraint = model.Equal (0 , f);
model.AddConstraints ( constraint );
ConstraintSolverSolution solution = model.Solve();
if (! solution.HasFoundSolution )
{
list.Add(f);
}
model.RemoveConstraints( constraint );
}
return list ;
28. Operations: Dead Features
GetDeadFeatures( List<Feature> features, ConstraintSystem
model )
List <Feature> list = new List <Feature>();
foreach ( Feature f in features )
{
CspTerm constraint = model.Equal (1 , f);
model.AddConstraints ( constraint );
ConstraintSolverSolution solution = model.Solve();
if (! solution.HasFoundSolution )
{
list.Add(f);
}
model.RemoveConstraints( constraint );
}
return list ;
29. Operations: Validating a Config
IsValidConfiguration(Configuration config , List <Feature>
features , ConstraintSystem model )
foreach ( Feature f in features )
{
if ( config.Contains(f))
model.AddConstraints ( model.Equal (1 , f));
else
model.AddConstraints ( model.Equal (0 , f));
}
ConstraintSolverSolution solution = model.Solve() ;
return solution.HasFoundSolution ;
30. Operations: Partial Config
IsValidPartialConfiguration(Configuration config , List
<Feature> features , ConstraintSystem model )
foreach ( Feature f in features )
{
if ( config.Contains(f))
model.AddConstraints ( model.Equal (1 , f));
}
ConstraintSolverSolution solution = model.Solve() ;
return solution.HasFoundSolution ;
33. Implementation & Evaluation
Evaluation
• Test with: Fama Test Suite
http://www.isa.us.es/fama/?FaMa_Test_Suite
• Test with models from SPLOT
http://www.splot-research.org/
• Test with Feature IDE test suite
http://wwwiti.cs.uni-magdeburg.de/iti_db/research/featureide/
Our implementation performs the analysis correctly.
33
37. Conclusions
• Our approach
• Implements the operations defined by Benavides et al.
• Works on .Net platforms
• Obtains the same results that the other libraries.
• Performs as fast as the related solutions in Java.
37
38. Conclusions
• However, our implementation
• Does not support optimizations proposed by other
authors (e.g., by combining solvers or by eliminating
non-relevant features from the processing)
• Does not support transforming operations such as slice r
merge of feature models
• Does not support operations for product configuration
such as recommending or optimizing selections.
• Future work is planned to implement optimizations
and additional operations using the MS Solver
Foundation.
38