et al., 2013). The adapted method extracts both the
feature model and SPL-UML design from the exist-
ing product source codes. To do so, it first applies
reverse engineering techniques to extract the design
(class and sequence diagrams) of the different prod-
ucts. Secondly, it uses the Formal Concept Analysis
(FCA)(Ganter and Wille, 1996) technique to unify the
design of the different products and to extract the de-
sign of the SPL. At the same time, our method uses
the FCA and LSI (Latent Semantic Indexing) (Bink-
ley and Lawrie, 2011) techniques to extract the fea-
ture model from the source code of the product vari-
ants. Finally, the design of the SPL is enriched with
the information contained in the feature model and
it is represented in SPL-UML. The originality of our
bottom-up process is that it extracts a feature model
and a SPL design from source code that may have dif-
ferent vocabulary and structures.
The rest of this paper is organized as follows.
Section 2 first overviews existing works interested in
the extraction of SPL from product source code; sec-
ondly, it presents existing UML profiles for SPL de-
scription. Section 3 describes the proposed UML pro-
file for SPL in terms of stereotypes and tagged values.
Section 4 presents our method for SPL design extrac-
tion from product source codes and feature models.
In addition, it illustrates the method through an exam-
ple of an SPL for mobile phones. Finally, Section 5
summarizes the paper and outlines future work.
2 RELATED WORK
To motivate our design process and UML notation for
SPL, we briefly overview, in this section, bottom up
processes and UML profiles for SPL.
2.1 Existing Bottom-up Extraction
Processes
Several works investigated feature model extraction
from the source code of products in order to construct
an SPL ((Ziadi et al., 2012), (Al-Msie’Deen et al.,
2012),(Riebisch, 2003), (Nan and Steve, 2009)). For
instance, Ziadi et al, (Ziadi et al., 2012) propose
an approach that first abstracts the input products in
SoCPs (Sets Of Construction Primitives) and, sec-
ondly, it identifies features by determining common
and intersecting SoCPs. The obtained results show
that the approach can handle products with variable
names for classes, methods and attributes. However,
this approach produces a feature model which con-
tains only one mandatory feature and the others are
considered as optional features. Thus, it identify nei-
ther separated mandatory features, nor alternative fea-
tures and their related constraints such as the mutual
exclusion.
On the other hand, Al-Msiedeeen (Al-Msie’Deen
et al., 2012) propose an approach based on the defini-
tion of the mapping model between OO elements and
feature model elements. This approach uses FCA to
cluster similar OO elements into one feature. It uses
LSI to define a similarity measure based on which the
clustering is decided. This approach improves the ap-
proach of Ziadi (Ziadi et al., 2012) since it extracts
mandatory features and optional features along with
some constraints among features like And and Re-
quire. However, it does not treat product variants with
different structures or different terminologies. Mo-
rover, l-Msiedeeen (Al-Msie’Deen et al., 2012) does
not extract the design which facilite the comprehen-
sion of SPL.
Salman et al, (Salman et al., 2012) present a ge-
netic algorithm to recover traceability links between
feature models and source code. Traceability links
in SPL are needed to relate variation points and vari-
ants with all corresponding low level artifacts (re-
quirements, design, source code and test cases arti-
facts). The genetic algorithm can determine approxi-
mately the implementation of each feature (by linking
the feature to classes). However, it generates just one
solution for each run, and the number of runs neces-
sary to determine all possible classes for each feature
is unknown.
All of the approaches in (Ziadi et al., 2012), (Al-
Msie’Deen et al., 2012), (Salman et al., 2012) rely
on one underlying hypothesis: all source codes use
the same vocabulary and they have the same struc-
ture. That is, these approaches cannot be applied in
the derivation of SPL from product variants that were
produced by different developers. Moreover, in case
of maintenance or evolution, all feature models ex-
tracted in these works do not provide sufficient infor-
mation because the source product designs are totally
ignored. Such lost information would have to be re-
discovered by the developers in order to understand
the behavior and structure of the system.
2.2 Existing UML Profiles for SPL
Several studies (e.g., (ClauB, 2005) , (Ziadi, 2004),
(Gomaa, 2005)) have been interested in modeling
product lines with UML 2.0, the standard for object-
oriented analysis and design. In particular, they fo-
cused on defining profiles to manage the concept of
variability in the SPL. The proposed UML profiles
contain stereotypes, tagged values and constraints that
MODELSWARD2014-InternationalConferenceonModel-DrivenEngineeringandSoftwareDevelopment
310