Feature location in a collection of software product variants using formal concept analysis

24
Feature Location In a Collection of Software Product Variants Using Formal Concept Analysis R. AL-msie’deen + , A.-D. Seriai + , M. Huchard + , C. Urtado * , S. Vauttier * and H. Eyal Salman + + LIRMM / CNRS & Montpellier 2 University, France Al-msiedee, Seriai, huchard, [email protected] * LGI2P / Ecole des Mines d’Al` es, Nˆ ımes, France Christelle.Urtado, [email protected] June 20, 2013 R. AL-msie’deen et al. Feature Location June 20, 2013 1 / 24

description

Feature location in a collection of software product variants using formal concept analysis

Transcript of Feature location in a collection of software product variants using formal concept analysis

Page 1: Feature location in a collection of software product variants using formal concept analysis

Feature Location In a Collection of Software ProductVariants Using Formal Concept Analysis

R. AL-msie’deen+, A.-D. Seriai+, M. Huchard+,C. Urtado∗, S. Vauttier∗ and H. Eyal Salman+

+LIRMM / CNRS & Montpellier 2 University, FranceAl-msiedee, Seriai, huchard, [email protected]

∗LGI2P / Ecole des Mines d’Ales, Nımes, FranceChristelle.Urtado, [email protected]

June 20, 2013

R. AL-msie’deen et al. Feature Location June 20, 2013 1 / 24

Page 2: Feature location in a collection of software product variants using formal concept analysis

Overview

Introduction

Feature Location Approach

Experimentation

Related work

Conclusion

Perspectives

References

R. AL-msie’deen et al. Feature Location June 20, 2013 2 / 24

Page 3: Feature location in a collection of software product variants using formal concept analysis

Introduction:

Companies usually develop a set of software variants that share somefeatures and differ in other ones to meet specific needs of customers.

To exploit existing software variants to build a software product line(SPL), the first step is to mine the feature model of this SPL. To doso, it is necessary to mine optional and mandatory features.

R. AL-msie’deen et al. Feature Location June 20, 2013 3 / 24

Page 4: Feature location in a collection of software product variants using formal concept analysis

Introduction:

Figure 1 : Feature location in a collection of software product variants

R. AL-msie’deen et al. Feature Location June 20, 2013 4 / 24

Page 5: Feature location in a collection of software product variants using formal concept analysis

Feature Location (FL) Approach:

Goal and Core Assumptions

Features versus Object-oriented Building Elements

Features versus OBEs: The Mapping Model

Identifying the common features and optional features using FCA

Feature Location Process

An Illustrative Example

R. AL-msie’deen et al. Feature Location June 20, 2013 5 / 24

Page 6: Feature location in a collection of software product variants using formal concept analysis

Goal and Core Assumptions:

In our work each software product variant PN is abstracted as a set ofObject-oriented Building Elements (OBEs).

Object-oriented Building Elements = package, class, attribute,method, local variable, attribute access, method invocation.

R. AL-msie’deen et al. Feature Location June 20, 2013 6 / 24

Page 7: Feature location in a collection of software product variants using formal concept analysis

Goal and Core Assumptions:

We consider that a feature corresponds to one and only one set ofOBEs. So the feature always has the same implementation in allproduct variants where it is present.

We also consider that feature implementations may overlap: a givenOBE can be shared between several features’ implementations. In ourapproach, we name such shared OBE as a junction.

R. AL-msie’deen et al. Feature Location June 20, 2013 7 / 24

Page 8: Feature location in a collection of software product variants using formal concept analysis

Features versus Object-oriented Building Elements:

Feature location in a collection of software variants consists inidentifying a group of OBEs that constitutes its implementation.

Our proposal consists in dividing the OBE set in specific subsets: thecommon feature set also called common block (CB) and severaloptional feature sets (Block of Variation, denoted as BVs).

Optional (resp. common) features appear in some but not all (resp.all) variants, they are implemented by OBEs that appear in some butnot in all (resp. all) variants.

R. AL-msie’deen et al. Feature Location June 20, 2013 8 / 24

Page 9: Feature location in a collection of software product variants using formal concept analysis

Features versus OBEs: The Mapping Model

R. AL-msie’deen et al. Feature Location June 20, 2013 9 / 24

Page 10: Feature location in a collection of software product variants using formal concept analysis

Identifying the CB and BVs via FCA:

The technique used to identify the CB and BVs relies on FCA.

FCA is a classification technique that takes data sets of objects(software variants) and their attributes (OBEs), and extracts relationsbetween these objects according to the attributes they share.

Then, the corresponding Attribute-Object-Concept poset(AOC-poset) is calculated.

R. AL-msie’deen et al. Feature Location June 20, 2013 10 / 24

Page 11: Feature location in a collection of software product variants using formal concept analysis

Identifying the CB and BVs via FCA:

In the AOC-poset:

The intent of the most general (i.e., top) concept gathers OBEs thatare common to all products. They constitute the CB.

The intents of all remaining concepts are BVs. They gather sets ofOBEs common to a subset of products and correspond to theimplementation of one or more features.

The extent of each of these concepts is the set of products havingthese OBEs in common.

R. AL-msie’deen et al. Feature Location June 20, 2013 11 / 24

Page 12: Feature location in a collection of software product variants using formal concept analysis

Feature Location Process:

Figure 2 : Feature Location Process.

R. AL-msie’deen et al. Feature Location June 20, 2013 12 / 24

Page 13: Feature location in a collection of software product variants using formal concept analysis

An Illustrative Example: Text Editor Variants

Software Variants FeaturesEditor 1 Core (Open, Close, Print)Editor 2 Core, Select-allEditor 3 Core, Copy, PasteEditor 4 Core, Select-all, Copy, Paste

Figure 3 : Text Editor variants described by their features (left) and featuremodel (right).

R. AL-msie’deen et al. Feature Location June 20, 2013 13 / 24

Page 14: Feature location in a collection of software product variants using formal concept analysis

An Illustrative Example: Text Editor Variants

Figure 4 : The Formal Context (left) and AOC-poset (right) for Text EditorVariants.

R. AL-msie’deen et al. Feature Location June 20, 2013 14 / 24

Page 15: Feature location in a collection of software product variants using formal concept analysis

Experimentation:

Case Study

Feature Location Result

Evaluation

R. AL-msie’deen et al. Feature Location June 20, 2013 15 / 24

Page 16: Feature location in a collection of software product variants using formal concept analysis

Case Study:

Table 1 : ArgoUML-SPL

Product # Product Description LOC NOP NOC NOOBEP1 All optional features disabled 82,924 55 1,243 74,444P2 All optional features enabled 120,348 81 1,666 100,420P3 Only Logging disabled 118,189 81 1,666 98,988P4 Only Cognitive disabled 104,029 73 1,451 89,273P5 Only Sequence diagram disabled 114,969 77 1,608 96,492P6 Only Use case diagram disabled 117,636 78 1,625 98,468P7 Only Deployment diagram disabled 117,201 79 1,633 98,323P8 Only Collaboration diagram disabled 118,769 79 1,647 99,358P9 Only State diagram disabled 116,431 81 1,631 97,760P10 Only Activity diagram disabled 118,066 79 1,648 98,777

LOC (Lines of Code)NOP (Number of Packages)NOC (Number of Classes)NOOBE (Number Of Object-oriented Building Elements)

R. AL-msie’deen et al. Feature Location June 20, 2013 16 / 24

Page 17: Feature location in a collection of software product variants using formal concept analysis

Feature Location Result:

Table 2 : Feature Location in ArgoUML-SPL

Feature # Feature Name # OBEs Junction # Junction Name # OBEs

1 Class Diagram 74431 1 Junction cognitive/deployment 7452 Diagram 1309 2 Junction cognitive/sequence 553 Use case Diagram 1928 3 Junction sequence/collaboration 1114 Collaboration Diagram 935 4 Junction state/logging 65 Cognitive Diagram 10193 5 Junction deployment/logging 186 Activity Diagram 1583 6 Junction collaboration/logging 137 Deployment Diagram 1334 7 Junction use case/logging 228 Sequence Diagram 3708 8 Junction sequence/logging 519 State Diagram 2597 9 Junction activity/logging 310 Logging 1149 10 Junction cognitive/logging 169

11 Junction between Junctions 3/6/8 1812 Junction activity/state 57

In Table 3 Junction means there is a tangling relation between two ormore features (i.e., overlap between feature implementations).

R. AL-msie’deen et al. Feature Location June 20, 2013 17 / 24

Page 18: Feature location in a collection of software product variants using formal concept analysis

Feature Location Result: Evaluation

According to Couto et al. [Couto et al., 2011] and to the feature model ofthe ArgoUML-SPL [Couto et al., 2011]:

For each feature/junction in ArgoUML-SPL; our approach correctlyretrieved all OBEs that were corresponding to this feature/junction(i.e., no missing OBE or irrelevant OBE).

R. AL-msie’deen et al. Feature Location June 20, 2013 18 / 24

Page 19: Feature location in a collection of software product variants using formal concept analysis

Related work

An inclusive survey about approaches linking features and source codein a single software is proposed in [Dit et al., 2012].

Rubin et al. [Rubin and Chechik, 2012] present an approach to locateoptional features from two product variants’ source code.

Ziadi et al. [Ziadi et al., 2012] propose an automatic approach forfeature identification from source code for a set of product variants.Their approach doesn’t consider the method body.

Xue et al. [Xue et al., 2012] propose an automatic approach toidentify the traceability links between software variants source codeand their features based on the FCA and LSI.

R. AL-msie’deen et al. Feature Location June 20, 2013 19 / 24

Page 20: Feature location in a collection of software product variants using formal concept analysis

Conclusion:

We present in this paper an approach for feature location in acollection of software product variants based on FCA.

We extended this work by distinguishing between the commonfeatures that appear in the common block and the optional featuresthat appear in the same block of variation based on the lexicalsimilarity between object-oriented building elements using LSI andFCA 1.

1R. AL-Msiedeen et al, Mining features from the object-oriented source code of acollection of software variants using formal concept analysis and latent semanticindexing, in 25th SEKE Conference, USA, 2013.

R. AL-msie’deen et al. Feature Location June 20, 2013 20 / 24

Page 21: Feature location in a collection of software product variants using formal concept analysis

Perspectives:

We will apply a clustering algorithm on the CB and BVs to determinemore precisely each feature implementation based on both lexical andstructural similarity.

1 Lexical similarity = textual similarity between OBEs.

2 Structural similarity = dependency between OBEs.

Inheritance.Method Invocation.Attribute Access.etc.

We also plan to use the identified common and optional features toautomate the building of the studied software family’s feature model.

R. AL-msie’deen et al. Feature Location June 20, 2013 21 / 24

Page 22: Feature location in a collection of software product variants using formal concept analysis

References I

Couto, M. V., Valente, M. T., and Figueiredo, E. (2011).Extracting software pproduct lines: A case study using conditionalcompilation.In CSMR ’11 Conference, CSMR ’11, pages 191–200. IEEE ComputerSociety.

Dit, B., Revelle, M., Gethers, M., and Poshyvanyk, D. (2012).Feature location in source code: a taxonomy and survey.Journal of Software: Evolution and Process, pages 53–95.

Rubin, J. and Chechik, M. (2012).Locating distinguishing features using diff sets.In 27th ASE Conference, ASE 2012, pages 242–245. ACM.

Xue, Y., Xing, Z., and Jarzabek, S. (2012).Feature location in a collection of product variants.In 19th RE Conference, pages 145–154. IEEE.

R. AL-msie’deen et al. Feature Location June 20, 2013 22 / 24

Page 23: Feature location in a collection of software product variants using formal concept analysis

References II

Ziadi, T., Frias, L., da Silva, M. A. A., and Ziane, M. (2012).Feature identification from the source code of product variants.In CSMR’2012, pages 417–422.

R. AL-msie’deen et al. Feature Location June 20, 2013 23 / 24

Page 24: Feature location in a collection of software product variants using formal concept analysis

Thank you for your attention

R. AL-msie’deen et al. Feature Location June 20, 2013 24 / 24