Reverse Engineering Feature Models from Software Configurations

34
Reverse Engineering Feature Models from Software Configurations R. AL-msie’deen, M. Huchard, A.-D. Seriai, C. Urtado, S. Vauttier LIRMM, CNRS et Université de Montpellier LGI2P, Ecole des Mines d’Alès France Oct. 7-10, 2014 R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 1 / 34

description

Reverse Engineering Feature Models from Software Configurations

Transcript of Reverse Engineering Feature Models from Software Configurations

Page 1: Reverse Engineering Feature Models from Software Configurations

Reverse Engineering Feature Modelsfrom Software Configurations

R. AL-msie’deen, M. Huchard,A.-D. Seriai, C. Urtado, S. Vauttier

LIRMM, CNRS et Université de MontpellierLGI2P, Ecole des Mines d’Alès

France

Oct. 7-10, 2014

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 1 / 34

Page 2: Reverse Engineering Feature Models from Software Configurations

1 Context

2 FCA and feature model

3 Algorithm

4 Case study

5 Conclusion

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 2 / 34

Page 3: Reverse Engineering Feature Models from Software Configurations

Context

1 Context

2 FCA and feature model

3 Algorithm

4 Case study

5 Conclusion

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 3 / 34

Page 4: Reverse Engineering Feature Models from Software Configurations

Context

Product Line Engineering

Feature model

Assets Variable Architecture

Derived Products

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 4 / 34

Page 5: Reverse Engineering Feature Models from Software Configurations

Context

Building a productFeature selection

Selected ImplementedAssets Architecture

Product

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 5 / 34

Page 6: Reverse Engineering Feature Models from Software Configurations

Context

Product Line Reverse Engineering

Similar Productsdeveloped in undisciplined manner

Which Feature model?

Which Assets?Which Architecture?

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 6 / 34

Page 7: Reverse Engineering Feature Models from Software Configurations

Context

Software Product Line

Feature model

Assets

Variable architecture

Software systems

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 7 / 34

Page 8: Reverse Engineering Feature Models from Software Configurations

Context

Software Product Line Reverse Engineering (REVPLINE)

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 8 / 34

Page 9: Reverse Engineering Feature Models from Software Configurations

Context

Focus: building the feature model

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 9 / 34

Page 10: Reverse Engineering Feature Models from Software Configurations

Context

Feature model

Classical FODA model: A tree

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 10 / 34

Page 11: Reverse Engineering Feature Models from Software Configurations

Context

Existing approaches

Acher et al., semi-automatic approachLopez-Herrejon et al., genetic algorithmShe et al., heuristics based on textual description and given featuredependenciesZiadi et al., ad hoc algorithm, simpl. intents of Attribute ConceptsLoesch et al., FCA for understanding variabilityYang et al., FCA, pruning and merging similar concepts in the conceptlattice, uses concept specialization for subfeature relationshipsRyssel et al., FCA (AC-poset), computes FM and compleximplications, uses specialization between concepts for sub featurerelationships

→ Find automatically a simple FM model, with cross-tree constraints, nohypothetic subfeature relationships

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 11 / 34

Page 12: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

1 Context

2 FCA and feature model

3 Algorithm

4 Case study

5 Conclusion

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 12 / 34

Page 13: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

Using existing similar software products

Cell_

Pho

ne

Wireless

Infrared

Bluetoo

th

Accu_

Cell

Stron

g

Medium

Weak

Display

Gam

es

Multi_Player

Single_

Player

Artificial_Opp

onent

P-1 × × × × × × × ×P-2 × × × × × × × ×P-3 × × × × × × × × ×P-4 × × × × × × × ×P-5 × × × × × × ×P-6 × × × × × × ×P-7 × × × × × × × × ×P-8 × × × × × × × × ×P-9 × × × × × × × × × ×P-10 × × × × × × ×P-11 × × × × × × × × ×P-12 × × × × × × × × ×P-13 × × × × × × × × × ×P-14 × × × × × × × × × ×P-15 × × × × × × × × × ×P-16 × × × × × × × × × × ×

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 13 / 34

Page 14: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

What reveals FCA: Mandatory features

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 14 / 34

Page 15: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

Features always appearing together

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 15 / 34

Page 16: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

Implications, with different possible semantics

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 16 / 34

Page 17: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

Mutually exclusive, with different possible semantics

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 17 / 34

Page 18: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

Mutually exclusive, with different possible semantics

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 18 / 34

Page 19: Reverse Engineering Feature Models from Software Configurations

FCA and feature model

From FCA information to the feature model

Used similar software systems are only examples of possible productsand may contain flawsOnly hypotheses can be found in the concept lattice or AOC-posetFor each extracted knowledge, one has to choose wether:

it will be in the tree orit will be encoded into cross-tree constraints

Choose the form of the tree (which kind of nodes, how many levels)

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 19 / 34

Page 20: Reverse Engineering Feature Models from Software Configurations

Algorithm

1 Context

2 FCA and feature model

3 Algorithm

4 Case study

5 Conclusion

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 20 / 34

Page 21: Reverse Engineering Feature Models from Software Configurations

Algorithm

Extracting base features

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 21 / 34

Page 22: Reverse Engineering Feature Models from Software Configurations

Algorithm

Extracting AND feature nodes

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 22 / 34

Page 23: Reverse Engineering Feature Models from Software Configurations

Algorithm

Extracting XOR feature node

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 23 / 34

Page 24: Reverse Engineering Feature Models from Software Configurations

Algorithm

Extracting OR feature node

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 24 / 34

Page 25: Reverse Engineering Feature Models from Software Configurations

Algorithm

Extracting require cross-tree constraints

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 25 / 34

Page 26: Reverse Engineering Feature Models from Software Configurations

Algorithm

Extracting exclude cross-tree constraints

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 26 / 34

Page 27: Reverse Engineering Feature Models from Software Configurations

Algorithm

The resulting feature model

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 27 / 34

Page 28: Reverse Engineering Feature Models from Software Configurations

Case study

1 Context

2 FCA and feature model

3 Algorithm

4 Case study

5 Conclusion

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 28 / 34

Page 29: Reverse Engineering Feature Models from Software Configurations

Case study

Case study

Derived products from existing SPLExisting feature models for expert comparisonCorrectness (precision / recall) is evaluated by comparing productsgenerated by the computed FM and initial products

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 29 / 34

Page 30: Reverse Engineering Feature Models from Software Configurations

Case study

Results

Group of Features CTCs Evaluation Metrics

# case study Num

berof

Produ

cts

Num

berof

Features

Base

Atomic

Set

ofFeatures

Inclusive-or

Exclusive-or

Requires

Excludes

Execution

times

(inms)

Precision

Recall

F-M

easure

1 ArgoUML-SPL 20 11 × × × 509 60% 100% 75%3 Graph product line 8 18 × × × × × 551 62% 100% 76%4 Berkeley DB 10 43 × × × × × × 661 50% 100% 66%2 Mobile media 8 18 × × × 441 68% 100% 80%3 Health complaint-SPL 10 16 × × × × 439 57% 100% 72%4 Video on demand 16 12 × × × × 572 66% 100% 80%5 Wiki engines 8 21 × × × × × × 555 54% 100% 70%7 Wikipedia 10 14 × × × × 552 72% 100% 84%5 Mobile phone 5 5 × × × 406 70% 100% 82%6 DC motor 10 15 × × 444 83% 100% 90%7 Cell phone-SPL 16 13 × × × × × × 486 51% 100% 68%

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 30 / 34

Page 31: Reverse Engineering Feature Models from Software Configurations

Conclusion

1 Context

2 FCA and feature model

3 Algorithm

4 Case study

5 Conclusion

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 31 / 34

Page 32: Reverse Engineering Feature Models from Software Configurations

Conclusion

Conclusion

A method which computes a simple FM model from productconfigurationsAdmits all initial product configurationsFocused on logical organizationWith cross-tree constraintsNo hypothetic sub-feature relationships

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 32 / 34

Page 33: Reverse Engineering Feature Models from Software Configurations

Conclusion

Perspectives

Use information from source code and FCA for extracting sub-features(tree structure)Improve XOR computation (compute several)Compute covering sets of featuresDefine several alternative orders for computing the tree and evaluatethem on the case study

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 33 / 34

Page 34: Reverse Engineering Feature Models from Software Configurations

Conclusion

Thank you!

R. AL-msie’deen et al. (LIRMM-LGI2P) Feature Models Oct. 7-10, 2014 34 / 34