Feature modeling is a widely used technique in Software Product Line development. Feature models allow stakeholders to describe domain concepts in terms of commonalities and differences within a family of software systems.
Developing a complex monolithic feature model can require significant effort and restrict the reusability of a set of features already modeled.
We advocate using modeling techniques that support separating and composing concerns to better manage the complexity of developing large feature models.
In this paper, we propose a set of composition operators dedicated to feature models. These composition operators enable the development of large feature models by composing smaller feature models which address well-defined concerns. The operators are notably distinguished by their documented capabilities to preserve some significant properties.
1. Composing Feature Models
Mathieu Acher1, Philippe Collet1, Philippe Lahire1, Robert France2
1 University
of Nice Sophia Antipolis (France),
Modalis Team (CNRS, I3S Laboratory)
2 Computer Science Department,
Colorado State University
1
2. Why feature models?
• Software Product Lines (SPL)
– From common assets, different programs of a domain
can be assembled
– Promote systematic reuse
• Feature modeling
– Widely used technique in SPL engineering
• domain analysis, requirements, code representation, etc.
• academic and industrial tool support
• Key idea: express variability of a family in terms
of features
Mathieu Acher « Composing Feature Models » 2
3. What is feature model?
• Hierarchy of features plus variability
information
Mathieu Acher « Composing Feature Models » 3
4. What is feature model?
• Hierarchy of features plus variability
information
mandatory
Mathieu Acher « Composing Feature Models » 4
5. What is feature model?
• Hierarchy of features plus variability
information
optional
Mathieu Acher « Composing Feature Models » 5
6. What is feature model?
• Hierarchy of features plus variability
information
alternative
Mathieu Acher « Composing Feature Models » 6
7. What is feature model?
• Hierarchy of features plus variability
information
alternative (not mutually exclusive)
Mathieu Acher « Composing Feature Models » 7
8. Feature models and Configuration
• Represent a set of valid configurations
– Configuration: set of features selected
– Valid configuration: defined by the semantics
Mathieu Acher « Composing Feature Models » 8
9. Feature models and Configuration
• Represent a set of valid configurations
Mathieu Acher « Composing Feature Models » 9
10. Feature models and Configuration
• Represent a set of valid configurations
Person, housing, streetName, telephone, areaCode, transport, car
Mathieu Acher « Composing Feature Models » 10
11. Agenda
• Issues in Feature Modeling
• Requirements and Rationale for the
Composition Language
• Composition Operators
• Conclusion and Future Work
Mathieu Acher « Composing Feature Models » 11
19. Rationale
• Characterizing the result of a Compositional
Operator in terms of sets of configurations
FM1 FM2
Mathieu Acher « Composing Feature Models »
20. Rationale
• Characterizing the result of a Compositional
Operator in terms of sets of configurations
Classification [Thüm, Batory and Kästner (ICSE’09)]
FM1 FM2
Mathieu Acher « Composing Feature Models » 22
21. Rationale
• Characterizing the result of a Compositional
Operator in terms of sets of configurations
Base Aspect
To predict which configurations will
be removed, added, or/and kept…
We choose to distinguish Aspect
from Base models
Mathieu Acher « Composing Feature Models » 23
22. Rationale (cont’d)
• Insert and Merge operators
• Ensure predictable properties between input
feature models and composed feature models
– In terms of sets of configurations
– We choose to distinguish Aspect from Base models
• Describe operators in terms of
– What?
– Where?
– How?
Mathieu Acher « Composing Feature Models » 25
24. Insert Operator: Syntax
=
Aspect
Base
Result
insert (urbanTransport, transport, Xor)
Mathieu Acher « Composing Feature Models » 27
25. Insert Operator: Syntax
=
Aspect
Base
Result
insert (urbanTransport, transport, And-mandatory)
Mathieu Acher « Composing Feature Models » 28
26. Insert Operator: Syntax
=
Aspect
Base
Result
insert (urbanTransport, transport, And-optional)
Mathieu Acher « Composing Feature Models » 29
27. Insert Operator: Syntax
=
Aspect
Base
Result
insert (urbanTransport, transport, And-optional)
Mathieu Acher « Composing Feature Models » 30
28. Reasoning on the Result (1)
=
Base Aspect Result
The set of configurations of the FM after insertion (Result) is at least the
set of configurations of Base FM.
Base : {{B, B2}, {B, B1, B2 }}
Mathieu Acher « Composing Feature Models » 31
29. Reasoning on the Result (1)
=
Base Aspect Result
The set of configurations of the FM after insertion (Result) is at least the
set of configurations of Base FM.
Base : {{B, B2}, {B, B1, B2 }}
Result :
{{B, B2}, {B, B1, B2 }, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}
Mathieu Acher « Composing Feature Models » 32
30. Reasoning on the Result (1)
=
Base Aspect Result
The set of configurations of the FM after insertion (Result) is at least the
set of configurations of Base FM.
Base : {{B, B2}, {B, B1, B2 }}
Result :
{{B, B2}, {B, B1, B2 }, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}
Mathieu Acher « Composing Feature Models » 33
31. Reasoning on the Result (1)
=
Base Aspect Result
The set of configurations of the FM after insertion (Result) is at least the
set of configurations of Base FM.
{{B, B2}, {B, B1, B2 }}
{{B, B2}, {B, B1, B2 }, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}
Result FM is a generalization of Base FM.
Mathieu Acher « Composing Feature Models » 34
32. Reasoning on the Result (2)
=
Base Aspect Result
Base : {{B, B2}, {B, B1, B2 }}
Aspect : {{A}, {A, A1}}
Result : {{B, A, B2}, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}
Mathieu Acher « Composing Feature Models » 35
33. Reasoning on the Result (2)
=
Base Aspect Result
The set of configurations of Result is at least the set of configurations
of the “cross product” of Base and Aspect.
Base : {{B, B2}, {B, B1, B2 }}
Aspect : {{A}, {A, A1}}
Base * Aspect = Result
Mathieu Acher « Composing Feature Models » 36
34. Reasoning on the Result (2)
=
Base Aspect Result
Base : {{B, B2}, {B, B1, B2 }}
Aspect : {{A}, {A, A1}}
Base * Aspect = Result
Result : {{B, A, B2}, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}
Mathieu Acher « Composing Feature Models » 37
35. Reasoning on the Result (2)
=
Base Aspect Result
Base : {{B, B2}, {B, B1, B2 }}
Aspect : {{A}, {A, A1}}
Base * Aspect = Result
Result : {{B, A, B2}, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}
Mathieu Acher « Composing Feature Models » 38
36. Reasoning on the Result (2)
=
Base Aspect Result
Mathieu Acher « Composing Feature Models » 39
40. Merge Operator: Intersection Mode
The intersection of two FMs, Base and Aspect, is a new FM where each
configuration that is valid both in Base and Aspect, is also valid.
Mathieu Acher « Composing Feature Models » 43
41. Merge Operator: Intersection Mode
The intersection of two FMs, Base and Aspect, is a new FM where each
configuration that is valid both in Base and Aspect, is also valid.
{{Person, transport, car}, {Person, transport, other}}
Mathieu Acher « Composing Feature Models » 44
43. Merge Operator: Intersection Mode
No merged model
The intersection of two FMs, Base and Aspect, is a new FM where each
configuration that is valid both in Base and Aspect, is also valid.
Have a look at housing feature
Mathieu Acher « Composing Feature Models » 46
45. Merge Operator: Union Mode
The union of two FMs, Base and Aspect, is a new FM where each
configuration that is valid either in Base or Aspect, is also valid.
Mathieu Acher « Composing Feature Models » 49
47. Conclusion
• A set of composition operators dedicated to feature models
– syntactic definition
– documented properties (based on the semantics of feature
models)
– rules and algorithm
• Related work
– Schobbens et al.
+ intersection, union, and reduced product
- no implementation, more properties to cover
– Alves et al.
+ catalogue rules to refactoring feature models
- merge is not fully considered
– Segura et al.
+ catalogue rules to merging feature models
- semantics of the merge not defined (corresponds to union mode)
Mathieu Acher « Composing Feature Models » 51
48. Future Work
• Several cross-validity implementations
– Kompose, ATL, AGG, etc.
• Feature Models extension
– internal-constraints
– inter-constraints (btw aspect and base models)
– cardinality-based feature model
• Large scale validation
– two case studies and SPLs:
• Medical Imaging Grid Services
• Video Surveillance Systems
– “usage”, modular reasoning, etc.
Mathieu Acher « Composing Feature Models » 52