composing feature models

49
Composing Feature Models Mathieu Acher 1 , Philippe Collet 1 , Philippe Lahire 1 , Robert France 2 1 University of Nice Sophia Antipolis (France), Modalis Team (CNRS, I3S Laboratory) 2 Computer Science Department, Colorado State University 1

Upload: acher

Post on 03-Jun-2015

1.467 views

Category:

Education


2 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: Composing Feature Models

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

Page 2: Composing 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

Why feature models?

2Mathieu Acher « Composing Feature Models »

Page 3: Composing Feature Models

• Hierarchy of features plus variability information

What is feature model?

Mathieu Acher « Composing Feature Models » 3

Page 4: Composing Feature Models

• Hierarchy of features plus variability information

What is feature model?

mandatory

4Mathieu Acher « Composing Feature Models »

Page 5: Composing Feature Models

• Hierarchy of features plus variability information

What is feature model?

optional5Mathieu Acher « Composing Feature Models »

Page 6: Composing Feature Models

• Hierarchy of features plus variability information

What is feature model?

alternative6Mathieu Acher « Composing Feature Models »

Page 7: Composing Feature Models

• Hierarchy of features plus variability information

What is feature model?

alternative (not mutually exclusive)7Mathieu Acher « Composing Feature Models »

Page 8: Composing Feature Models

• Represent a set of valid configurations

– Configuration: set of features selected

– Valid configuration: defined by the semantics

Feature models and Configuration

8Mathieu Acher « Composing Feature Models »

Page 9: Composing Feature Models

• Represent a set of valid configurations

Feature models and Configuration

9Mathieu Acher « Composing Feature Models »

Page 10: Composing Feature Models

• Represent a set of valid configurations

Feature models and Configuration

Person, housing, streetName, telephone, areaCode, transport, car

10Mathieu Acher « Composing Feature Models »

Page 11: Composing Feature Models

• Issues in Feature Modeling

• Requirements and Rationale for the Composition Language

• Composition Operators

• Conclusion and Future Work

Agenda

11Mathieu Acher « Composing Feature Models »

Page 12: Composing Feature Models

Feature Models

12Mathieu Acher « Composing Feature Models »

Page 13: Composing Feature Models

Feature Models

13Mathieu Acher « Composing Feature Models »

Page 14: Composing Feature Models

Feature Models

Scalability issues in terms of- construction- evolution- reasoning

14Mathieu Acher « Composing Feature Models »

Page 15: Composing Feature Models

Separating and ComposingFeature Models

15Mathieu Acher « Composing Feature Models »

Page 16: Composing Feature Models

Composing Feature Models

16Mathieu Acher « Composing Feature Models »

Page 17: Composing Feature Models

Design of a Language for Composing Feature Models

17

with predictable properties

Mathieu Acher « Composing Feature Models »

Page 18: Composing Feature Models

Requirements

insert merge

20Mathieu Acher « Composing Feature Models »

Page 19: Composing Feature Models

• Characterizing the result of a Compositional Operator in terms of sets of configurations

Rationale

FM1 FM2

Mathieu Acher « Composing Feature Models »

Page 20: Composing Feature Models

• Characterizing the result of a Compositional Operator in terms of sets of configurations

Rationale

FM1 FM2

22Mathieu Acher « Composing Feature Models »

Classification [Thüm, Batory and Kästner (ICSE’09)]

Page 21: Composing Feature Models

• Characterizing the result of a Compositional Operator in terms of sets of configurations

Rationale

Base Aspect

To predict which configurations will be removed, added, or/and kept…

We choose to distinguish Aspectfrom Base models

23Mathieu Acher « Composing Feature Models »

Page 22: Composing Feature Models

• 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?

Rationale (cont’d)

25Mathieu Acher « Composing Feature Models »

Page 23: Composing Feature Models

Insert Operator: Syntax

insert (aspectFeature: Feature, joinpointFeature: Feature, operator: Operator)

What? Where? How?

AspectBase

26Mathieu Acher « Composing Feature Models »

Page 24: Composing Feature Models

Insert Operator: Syntax

insert (urbanTransport, transport, Xor)

=Base

Aspect

Result

27Mathieu Acher « Composing Feature Models »

Page 25: Composing Feature Models

Insert Operator: Syntax

insert (urbanTransport, transport, And-mandatory)

=Base

Aspect

Result

28Mathieu Acher « Composing Feature Models »

Page 26: Composing Feature Models

Insert Operator: Syntax

insert (urbanTransport, transport, And-optional)

=Base

Aspect

Result

29Mathieu Acher « Composing Feature Models »

Page 27: Composing Feature Models

Insert Operator: Syntax

insert (urbanTransport, transport, And-optional)

=Base

Aspect

Result

30Mathieu Acher « Composing Feature Models »

Page 28: Composing Feature Models

Reasoning on the Result (1)

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 }}

=Base Aspect Result

31Mathieu Acher « Composing Feature Models »

Page 29: Composing Feature Models

Reasoning on the Result (1)

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 }}

=Base Aspect Result

32Mathieu Acher « Composing Feature Models »

Page 30: Composing Feature Models

Reasoning on the Result (1)

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 }}

=Base Aspect Result

33Mathieu Acher « Composing Feature Models »

Page 31: Composing Feature Models

Reasoning on the Result (1)

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.

=Base Aspect Result

34Mathieu Acher « Composing Feature Models »

Page 32: Composing Feature Models

Reasoning on the Result (2)

=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 }}

Base Aspect Result

35Mathieu Acher « Composing Feature Models »

Page 33: Composing Feature Models

Reasoning on the Result (2)

=The set of configurations of Result is at least the set of configurationsof the “cross product” of Base and Aspect.

Base : {{B, B2}, {B, B1, B2 }}Aspect : {{A}, {A, A1}}Base * Aspect = Result

Base Aspect Result

36Mathieu Acher « Composing Feature Models »

Page 34: Composing Feature Models

Reasoning on the Result (2)

=Base : {{B, B2}, {B, B1, B2 }}Aspect : {{A}, {A, A1}}Base * Aspect = ResultResult : {{B, A, B2}, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}

Base Aspect Result

37Mathieu Acher « Composing Feature Models »

Page 35: Composing Feature Models

Reasoning on the Result (2)

=Base : {{B, B2}, {B, B1, B2 }}Aspect : {{A}, {A, A1}}Base * Aspect = ResultResult : {{B, A, B2}, {B, A, B1, B2 }, {B, A, A1, B1, B2 }, {B, A, A1, B, B2 }}

Base Aspect Result

38Mathieu Acher « Composing Feature Models »

Page 36: Composing Feature Models

Reasoning on the Result (2)

=Base Aspect Result

39Mathieu Acher « Composing Feature Models »

Page 37: Composing Feature Models

merge (aspectFeature: Feature, baseFeature: Feature, mode: Mode)

Merge Operator: Principles

What? Where? How?

40Mathieu Acher « Composing Feature Models »

Page 38: Composing Feature Models

merge (aspectFeature: Feature, baseFeature: Feature, mode: Mode)

Merge Operator: Principles

What? Where? How?

Renaming mechanism

41Mathieu Acher « Composing Feature Models »

Page 39: Composing Feature Models

merge (aspectFeature: Feature, baseFeature: Feature, mode: Mode)

• Two “modes”

– Union

– Intersection

Merge Operator: Principles

What? Where? How?

42Mathieu Acher « Composing Feature Models »

Page 40: Composing Feature Models

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.

43Mathieu Acher « Composing Feature Models »

Page 41: Composing Feature Models

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}}44Mathieu Acher « Composing Feature Models »

Page 42: Composing Feature Models

Merge Operator: Intersection Mode

45Mathieu Acher « Composing Feature Models »

Page 43: Composing Feature Models

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.

Have a look at housing feature

No merged model

46Mathieu Acher « Composing Feature Models »

Page 44: Composing Feature Models

Merge Operator: Union Mode

47Mathieu Acher « Composing Feature Models »

Page 45: Composing Feature Models

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.

49Mathieu Acher « Composing Feature Models »

Page 46: Composing Feature Models

Merge Operator: Union Mode

50Mathieu Acher « Composing Feature Models »

Page 47: Composing Feature Models

• 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)

Conclusion

51Mathieu Acher « Composing Feature Models »

Page 48: Composing Feature Models

• 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.

Future Work

52Mathieu Acher « Composing Feature Models »

Page 49: Composing Feature Models

?53Mathieu Acher « Composing Feature Models »

http://www.i3s.unice.fr/~acher/