reverse engineering feature models from software variants to build software product lines

76
Reverse Engineering Feature Models From Software Variants to Build Software Product Lines Ra'Fat AL-Msie'Deen RE -engineering Software V ariants into Software P roduct LINE Marianne Huchard ………………………………………………...............Directrice de Thèse Abdelhak-Djamel Seriai ……………………………………................... Co- Directeur de Thèse Christelle Urtado ……………………………………………….............. Co-Encadrante de Thèse Sylvain Vauttier ………………………………………………............... Co-Encadrant de Thèse

Upload: rafat-al-msiedeen

Post on 10-May-2015

232 views

Category:

Software


1 download

DESCRIPTION

Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

TRANSCRIPT

Page 1: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Reverse Engineering Feature Models From Software Variants to

Build Software Product Lines

Ra'Fat AL-Msie'Deen

RE-engineering Software Variants into Software Product LINE

Marianne Huchard ………………………………………………...............… Directrice de Thèse

Abdelhak-Djamel Seriai ……………………………………................... Co-Directeur de ThèseChristelle Urtado ……………………………………………….............. Co-Encadrante de ThèseSylvain Vauttier ………………………………………………............... Co-Encadrant de Thèse

Page 2: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

2

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 3: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

3

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 4: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

1. Software product variants

Are similar softwareo Share mandatory featureso Differ in optional featureso Developed via clone-and-own approach

Exampleso Mobile media « http://www.ic.unicamp.br/~tizzei/mobilemedia/ »o ArgoUML « http://argouml-spl.tigris.org/ »

4

Software product variants

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 5: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Software product Line

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Domain Engineering Application Engineering

e.g., Source code

Software Product Line EngineeringC

ore

Ass

ets FM

F1 F0

Feature Model

F2

Product

Derivation

Solution Space Problem Space

Software

5

Page 6: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

6

Instance-1 Instance-2

Software product Line

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 7: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Software product variants

Difficulties for:

• Reuse

• Maintenance

• Understanding

7

... Feature (mandatory, optional) ?

... Feature Name and description ?

... Feature dependencies (feature model) ?

Problem

Variant A

Variant B

Variant C

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 8: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Software-1 Software-2

Software-3

Reverse engineering FM from the source code of software product variants

8

Thesis

F1 F2

F3

Feature ModelSource code

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 9: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

9

Commonality and Variability

Commonality Variability

Context Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 10: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

10

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 11: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

11

Software Variants Source Code

Extracting Features

Documenting Features

Feature Names

Feature Implementations

Building the Feature Model

1

2

3

Product-by-Feature Matrix

Identifying cross-tree constraints

Identifying groups of features (and, or and xor)

Process

Use-case diagrams

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 12: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

12

Used Technique

1. Classification Methods:

Formal Concept Analysis (FCA)

Relational Concept Analysis (RCA)

2. Information Retrieval Method:

Latent Semantic Indexing (LSI)

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 13: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

13

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 14: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

1.Feature location: [Rubin and Chechik, 2013]

Identifying group of source code elements that implement functionality

1.Feature location in a single software system [Dit et al., 2013]

The majority of existing approaches

Code-To-Feature traceability link

Search space = all source code elements

14

Feature Location

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 15: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

1.Feature location in a collection of software product variants [Xue et al., 2012]

Code-To-Feature traceability link approaches

Inputs: source code and feature descriptions

Feature identification approaches [Ziadi et al., 2012]

Input: only the source code of software variants

Variability at package and class levels

Gather all mandatory features as a single feature

Gather optional features which always appear together as a single feature15

Feature Location

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 16: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

1. Source code documentation in a single software system [Lucia et al., 2012]

The process of taking computer source code and understanding it

Existing approaches extract labels, names, topics or code summarization

2. Feature documentation in a collection of software product variants [Ziadi et al., 2012]

The process of taking the mined feature implementation and naming it

All approaches manually assign feature names to the mined feature implementations

16

Feature Documentation

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 17: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Reverse engineering FM from high level models [Acher et al., 2012]

- such as product configurations, product description, etc ….

Reverse engineering basic FM without cross-tree constraints [Ryssel et al., 2011]

- require and exclude constraints

Numerous candidate FMs can be extracted from the same input product configurations

- only a few of them are meaningful and correct [Acher et al., 2013]

The majority of approaches are designed to identify the dependencies between features

- doesn’t consider FM hierarchy [Haslinger et al., 2011] 17

Reverse Engineering FM

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 18: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

18

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 19: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

19

Overview

Software Variants Source Code

Extracting Features

Documenting Features

Feature Names

Feature Implementations

Building the Feature Model

1

2

3

Product-by-Feature Matrix

Identifying cross-tree constraints

Identifying groups of features (and, or and xor)

Use-case diagrams

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 20: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

20

REVPLINE

Proposal

Step 1 in the identification of FM is:

Identifying optional and mandatory features

P1

P2 Pn

Implementation Space

Feature-1

Feature Space

Software variants Feature implementation

Feature-N

Input Output

...

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 21: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

21

Exploit commonality and variability at the source code level

- Reduce the search space

- Apply IR methods in an efficient way

Use two types of similarity between source code elements

- Lexical similarity

- Structural similarity

Consider variability at different levels of source code elements

- Package, class, attribute, method or method body

Two techniques

- FCA and LSI

Contribution

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 22: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Lexical vs Structural Similarity Between The Source Code Elements

Lexical Similarity

- LSI method on the source code elements

Structural Similarity

- Five coupling between the source code elements:

1. Inheritance

2. Method invocation

3. Composition

4. Attribute access

5. Combined

22

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 23: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

23

Feature Location Process

P1

P2 Pn

Implementation Space OBEs

Atomic Block

Feature

Static Analysis Commonalities and

variabilities computation

Lexical and structural similarity computation

ClusteringSimilarity

Matrix

Feature Space

1

2

(Block of Variation)N

Variable OBEsVariable OBEsVariable OBE

Common Block

Common OBE nCommon OBE nCommon OBE

Software variants

Feature implementation

Process

Output

Block

Legend:

1 2

3

45

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Output

Input

Page 24: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Drawing Shapes Software Variants

24

Features

Software

An Illustrative Example

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 25: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

1. A formal context describing drawing shapes software variants by their source code elements

25

OBEs

Software

Identifying the Common Block and Blocks of Variation

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 26: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

2. The AOC-poset

26

Common block

Identifying the Common Block and Blocks of Variation

Blocks of variation

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 27: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

27

2

3

4

5

1

Measuring The Source Code Elements Similarity Based on Lexical Similarity

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 28: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Measuring The Source Code Elements Similarity Based on Lexical & Structural Similarity

2828

1

2

3 4

5

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 29: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

29

We efficiently extract feature implementations

From the source code of a collection of software product variants

By exploiting commonality and variability at the source code level

By using the REVPLINE approach, Based on

FCA (reduce search space)

LSI (lexical similarity)

Code Dependency (structural similarity)

Introduction Overview State of the art Feature Location Reverse Engineering FM Experimentation Conclusion

Conclusion

Page 30: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

30

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 31: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

31

Overview

Software Variants Source Code

Extracting Features

Documenting Features

Feature Names

Feature Implementations

Building the Feature Model

1

2

3

Product-by-Feature Matrix

Identifying cross-tree constraints

Identifying groups of features (and, or and xor)

Use-case diagrams

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 32: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

32

Proposal

Step 2 in the identification of FM is

Documenting the identified feature implementations

Use-case Diagrams

Feature Implementations

public ….. ( ) {……….………....………………………}

Description

View map

Input

Feature Documentation

Feature Name

Feature Description

Output

REVPLINE

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 33: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Exploits commonality and variability at feature implementation and use-cases levels

- Reduce the search space

- Apply IR methods in an efficient way

Gives to each feature implementation a name and description based on the use-case name

Three techniques

- FCA, LSI and RCA

33

Contribution

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 34: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

34

Process

To R

CA

Tab

les

Use-case Diagrams

Feature Implementations

Feature Documentation

Feature Name

Feature Description

Filtering

RCA

LSI

FCA

Legend Process Technique Output

Concept Lattice Family

Object - Attribute Tables

Object - Object Table

Use-case diagrams

Feature implementations

F F F

U X X

U X X

P P P

U X

U X

P P P

F X

F X

public ….. ( ) {……….………....………………………}

Description

View map

Clustering

Lexical Similarity Computation

Cosine similarity matrix

Input The Feature Documentation Process

Output

Documents

F1 F2

Queries

U1 0.08 0.80

U2 0.75 0.02

View map

public ….. ( ) {……….………....………………………}

(Hybrid block)i

1

2

3

4

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 35: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

35The use-case diagrams of the second and fourth MTG software variants

Mined Feature

Implementations

Software

Software

Use-cases

Mobile Tourist Guide (MTG) Software Variants

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 36: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

36

Relational Context Family (RCF)

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 37: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

37

Concept Lattice Family (CLF)

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 38: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

38

Exploring and Filtering the Hybrid Blocks From CLF

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 39: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

39

Constructing a Raw Corpus From Hybrid Block

Documents (Feature Implementations)

The tourist can view maps via mobile

device …………………………………………………………………...........…………………………………………

View Map

viewMapa…………………………………………………………………………

View Map Implementation

Hybrid Block_i

public viewMap(){int a = 0;while (a > 5) {if (a != 20) {} else {a = 30;}}}

View Map

Queries (use-cases)

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 40: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

40

2

3

4

1

Measuring Hybrid Block Contents’ Similarity Based on LSI

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 41: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

41

The Product-by-Feature Matrix

Features

Software

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 42: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Conclusion

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

We efficiently document the mined feature implementations

From the source code of a collection of software product variants

By exploiting commonality and variability at feature implementations

and use-cases levels

By using the REVPLINE approach, Based on

RCA (reduce search space)

LSI (lexical similarity)

FCA (clustering technique)42

Page 43: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

43

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 44: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

44

Overview

Software Variants Source Code

Extracting Features

Documenting Features

Feature Names

Feature Implementations

Building the Feature Model

1

2

3

Product-by-Feature Matrix

Identifying cross-tree constraints

Identifying groups of features (and, or and xor)

Use-case diagrams

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 45: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

45

F-1 F-2 F-3

S-1 x x

S-2 x x

S-3 x x

Reverse Engineering

Source code Software Configurations

Product-by-feature matrix

Feature model

Reverse Engineering FMs

SynthesisFeature implementation and documentation

variant 1

variant 3variant 2

OBEs

Proposal

Step 3 in the identification of FM is:

Identifying the dependencies between the mined and documented features

REVPLINE

Input Output

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 46: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Automatic approach

Features are organized in a canonical tree which highlights

- Mandatory features

- Optional features

- Feature groups (and, or, xor groups)

- Cross-tree constraints: require and exclude constraints

Technique

- FCA46

Contribution

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 47: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

47

Process

Product-by-Feature matrix

Analysis

FM

Extracting Root Feature

Extracting Atomic Sets of Features

Extracting Inclusive-Or

Extracting Exclusive-Or

Extracting Require Constraints

The Common Feature Set

The Optional Feature SetThe AOC-poset

Extracting Mandatory Features

Formal Context

FM Reverse Engineering Process

Synthesize

1

2

3

4

5

6

Extracting Exclude Constraints

7

8

Input Output

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 48: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

48

Existing Cell Phone SPL Feature Model

Cell_Phone

Wireless Accu_Cell Display Games

Infrared Bluetooth Strong Medium Weak Multi_Player Single_Player

Artificial_Opponentrequires

requires

excludes

Mandatory

Optional

Or

Alternative

Legend:

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 49: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

49

Valid Product Configurations of Cell Phone SPL

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 50: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

50

The root feature

The Base feature

The top conceptExtracting Root and Mandatory Features

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 51: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

51

The AND feature

Extracting Atomic Set of Features

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 52: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

52

The XOR feature

Minimum concepts

Extracting Exclusive-or relation

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 53: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

53

The OR feature

Extracting Inclusive-or relation

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 54: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

54

require constraint

Extracting Require Constraint

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 55: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

55

The OR feature

Extracting Exclude Constraint

exclude constraint

minimum

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 56: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

56

The mined FM

Cell_Phone

WirelessAccu_CellDisplay Games InfraredBluetoothStrong Medium Weak

Multi_Player

Base AND XOR OR

Single_Player

Artificial_Opponent

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 57: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Introduction Overview State of the art Feature Location Reverse Engineering FM Experimentation Conclusion

Conclusion

We efficiently synthesize large scale FMs

with approach that uses FCA and software configurations

Requirements for FM Synthesis

Input: Software Configurations

Sound and Complete: Derive an exact feature model describing the

input

Scalable: Support 10 to 1000's of features

Hierarchy: two levels57

Page 58: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

5. Experimentation

6. Conclusion

58

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 59: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

ArgoUML-SPL = real SPL, 10 products, large systems, Java, well documented

Health complaint-SPL = real SPL, 10 products, medium systems, Java, well documented

Mobile Media = real software variants, 4 products, small systems, Java, well documented

Evaluation Metrics: precision, recall and F-Measure

Used Tools:

eRCA : https://code.google.com/p/erca/

FAMA Tool Suite: http://www.isa.us.es/fama/

SPLOT homepage: http://www.splot-research.org/ 59

Experimentation

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 60: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

60

ArgoUML SPL

ArgoUML screenshot

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 61: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

61

Health Complaint SPL

Health Complaint screenshot

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 62: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

62

Mobile Media software product variants

Mobile Media screenshots

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 63: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Results show that the precision and recall metrics appear high

Results show that the F-Measure metric appears high

We cannot use a fixed number of topics for LSI

63

Precision Recall F-Measure0

20

40

60

80

100

120

ArgoUML-SPLHealth complaint-SPLMobile Media

Average of evaluation metrics for feature location

Feature Location

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 64: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

The lexical and structural similarity approach gives better results than the lexical approach

alone

64

Part of the sequence diagram feature implementation

Feature Location

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 65: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Results show that recall value in all cases is 100%

Results show that precision value either 100% or 50%

Number of topics for LSI = # of feature implementations

65

Precision Recall F-Measure0

20

40

60

80

100

120

ArgoUML-SPLHealth complaint-SPLMobile Media

Average of evaluation metrics for Feature Documentation

Feature Documentation

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 66: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Feature Documentation

Example (Feature Name and Description)

1. View sorted photos: "the device sorts the photos based on the number of times photo has

been viewed"

66

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 67: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

FM Reverse Engineering

Considering the recall metric, it is value is 100% for all case studies

Results show that precision appears to be not very high for all case studies

67

Evaluation metrics for FM Reverse Engineering

Precision Recall F-Measure0

20

40

60

80

100

120

ArgoUML-SPLHealth complaint-SPLMobile Media

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 68: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Threats to validity

1. Lexical similarity

2. We consider junction as feature implementations

3. Dynamic analysis techniques

4. There is a limitation of using FCA as clustering technique

5. Each use-case represents a single feature

6. The mined FM defines more configurations than the initial FM

68

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 69: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Outline

1. Context

2. Overview

3. State of the art

4. REVPLINE approach:

o Feature Location

o Feature Documentation

o Reverse Engineering FM

3. Experimentation

4. Conclusion

69

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 70: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Conclusion

Conclusion

REVPLINE approach

Thesis: Reverse engineering FM from the source code of software product

variants

Input: The source code and use-case diagrams of a set of software

variants

Outputs: Feature implementations, features documentation, correct FM

Strategy: Reduce search space by exploiting commonality and variability

Use cases: ArgoUML-SPL, Health complaint-SPL, Mobile media

Variability at different levels of source code elements

Automatically naming the mined feature implementations

Features are organized in a canonical tree which represents the mined

FM

The experiments have proven the effectivity of our approach

70

Page 71: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Future Directions

1. Extending the Scope

Feature evolution

Dynamic analysis techniques

Design first-cut SPL core assets

71

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 72: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Future Directions

2. Improving techniques

We plan to use search based algorithms as clustering technique

Automatically identify junctions between feature implementations

Enhance the extracted FM by increasing the levels of hierarchy

72

Introduction Overview State of the art Feature Location Feature Documentation Reverse Engineering FM Experimentation Conclusion

Page 73: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

73

Bibliography

1. [Rubin and Chechik, 2013] A survey of feature location techniques. In Domain Engineering, pages 29–58.

Springer Berlin Heidelberg, 2013.

2. [Dit et al., 2013] Feature location in source code: a taxonomy and survey. Journal of Software: Evolution and

Process, 25(1):53–95, 2013.

3. [Xue et al., 2012] Feature location in a collection of product variants. WCRE ’12, pages 145–154, 2012. IEEE.

4. [Ziadi et al., 2012] Feature identification from the source code of product variants. In CSMR ’12, pages 417–422,

2012.

5. [Lucia et al., 2012] Using IR methods for labeling source code artifacts: Is it worthwhile? In ICPC, pages 193–

202, 2012.

6. [Acher et al., 2012] On extracting feature models from product descriptions. VaMoS ’12, pages 45–54, 2012.

ACM.

7. [Ryssel et al., 2011] Extraction of feature models from formal contexts. SPL , Volume 2, SPLC ’11, pages 4:1–

4:8, 2011.

8. [Acher et al., 2013] Support for reverse engineering and maintaining feature models. VaMoS ’13, pages 20:1–

20:8, 2013.

9. [Haslinger et al., 2011] Reverse engineering feature models from programs’ feature sets. In WCRE ’11, pages

308–312, 2011.

Page 74: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

74

Personal Bibliography

1. "Feature location in a collection of software product variants using FCA,". In ICSR, 2013.

2. "Mining features from the object-oriented source code of a collection of software variants using formal

concept analysis and latent semantic indexing,". In SEKE, 2013.

3. "Mining features from the object-oriented source code of software variants by combining lexical and

structural similarity,". In IRI, 2013.

4. "Documenting the Mined Feature Implementations from the Object-oriented Source Code of a

Collection of Software Product Variants,". In SEKE, 2014.

5. "Concept lattices: a representation space to structure software variability,". In ICICS, 2014.

6. "Reengineering Software Product Variants Into Software Product Line: REVPLINE Approach,". LAP

Lambert Academic Publishing, 2014.

7. "Mining feature models from the object-oriented source code of a collection of software product

variants,". In Doctoral Symposium - ECOOP, 2013.

8. "An approach to recover feature models from object-oriented source code,". In Actes de la Journée

Lignes de Produits, 2012.

9. "A methodology to recover feature models from object-oriented source code,“ poster presented at

VARY Workshop (VARY: VARiability for You @ MODELS), 2012.

Page 75: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

75

Page 76: Reverse Engineering Feature Models From Software Variants to Build Software Product Lines

Reverse Engineering Feature Models From Software Variants to

Build Software Product Lines

Ra'Fat AL-Msie'Deen

RE-engineering Software Variants into Software Product LINE

Marianne Huchard ………………………………………………...............… Directrice de Thèse

Abdelhak-Djamel Seriai ……………………………………................... Co-Directeur de ThèseChristelle Urtado ……………………………………………….............. Co-Encadrante de ThèseSylvain Vauttier ………………………………………………............... Co-Encadrant de Thèse