27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

study was planned and carried out to validate the complexity<br />

metrics; Section IV discusses the results obtained in this<br />

study; and Section V provides the conclusions and directions<br />

for future work.<br />

II. COMPLEXITY METRICS FOR SOFTWARE PRODUCT<br />

LINE ARCHITECTURES<br />

The complexity understanding is essential from the PL<br />

adoption point as a PL manager is able to analyze the<br />

complex of the potential PL products to be produced.<br />

Organizations which have a developed PL core asset<br />

for a certain domain can analyze the complexity of the<br />

distinct configurations and the PL evolution. Therefore, a PL<br />

manager may choose from a set of feasible configurations<br />

which are the most interesting to be produced.<br />

The complexity metrics for PLA were composed based on<br />

the Cyclomatic Complex (CC) [11] and Weighted Methods<br />

per Class (WMC) [6]. The CC metric measures the quantity<br />

of decision logic represented by the number of paths to be<br />

tested in a source code. The WMC metric is the sum of the<br />

CC metric for each concrete method in an object-oriented<br />

class. Abstract methods have WMC value 0.0. Each metric<br />

measures the complexity of class, interface and component<br />

based on one of the following PL variability concepts:<br />

• Variability, according to Bosch [4], is “the ability of<br />

a software or artifact to be changed, customized or<br />

configured for use in a particular context.” Although<br />

a variability can take place at different levels of abstraction<br />

and artifacts, the complexity metrics in this<br />

paper address only class and component UML artifacts<br />

that result from PL activities [14] and represents the<br />

PLA;<br />

• Variation Point is the resolution of variabilities in<br />

generic artifacts of a PL. According to Jacobson et al.<br />

[9], “a variation point identifies one or more locations at<br />

which the variation will occur.” Thus, a variation point<br />

may take place at generic artifacts and at different levels<br />

of abstraction. Basically, a variation point answers the<br />

question: What varies in a PL? [16]; and<br />

• Variant represents the possible elements through which<br />

a variation point may be resolved. It may also represent<br />

a way to directly resolve a variability. Basically, a<br />

variant answers the question: How does a variability<br />

or a variation point vary in a PL? [16].<br />

The complexity metrics taken into consideration in this<br />

paper are as follows:<br />

CompInterface: measures the complexity of an interface.<br />

It always has value 0.0 as an interface has no concrete methods<br />

to calculate the WMC metric. This metric is represented<br />

by the following formula (1):<br />

}<br />

CompInterface(Cls) = WMC(Itf)=0.0,<br />

where:<br />

• n=#ofconcrete methods (Mtd) of an interface (Itf)<br />

(1)<br />

CompClass: measures the complexity of a class. It is the<br />

WMC metric value for a class. This metric is represented<br />

by the following formula:<br />

⎫<br />

n∑<br />

CompClass(Cls) = WMC(Cls)= WMC(Mtd i),<br />

⎪⎬<br />

i=1<br />

where:<br />

• n=#ofconcrete methods (Mtd) of a class Cls<br />

CompVarPointClass: measures the complexity of a variation<br />

point. It is the value of the metric CompClass (Equation<br />

2), for a class which is a variation point, plus the sum of the<br />

CompClass (Equation 2) value for each associated variant<br />

class. This metric is represented by the following formula:<br />

⎫<br />

CompVarPointClass(Cls) = CompClass(Cls) +<br />

n∑<br />

CompClass(Ass i),<br />

⎪⎬<br />

i=1<br />

where:<br />

• n = # of (inclusive + exclusive + optional + mandatory) variant<br />

classes and interfaces associated (Ass)<br />

CompVariabilityClass: measures the complexity of a variability.<br />

It is the sum of the metric CompVarPointClass<br />

(Equation 3), for each variation point. This metric is represented<br />

by the following formula:<br />

⎫<br />

nV P<br />

∑<br />

⎪⎬<br />

CompVariabilityClass(Vbt) =<br />

CompV arPointClass(Cls i),<br />

i=1<br />

where:<br />

• nVP = # of class and interface (Cls) variation points<br />

CompVarComponent: measures the complexity of a variable<br />

PLA component. It is the sum of the metric CompVariabilityClass<br />

(Equation 4), for each variability in a<br />

component. This metric is represented by the following<br />

formula:<br />

CompVarComponent(Cpt) =<br />

nV ar<br />

∑<br />

CompV ariabilityClass(Var i),<br />

i=1<br />

where:<br />

• nVar=#ofvariabilities (Var) in a component (Cpt)<br />

⎪⎭<br />

⎪⎭<br />

⎪⎭<br />

⎫<br />

⎪⎬<br />

CompPLA: measures the complexity of a PLA. It is<br />

the sum of the CompVarComponent (Equation 5) for each<br />

component of a PLA. This metric is represented by the<br />

following formula:<br />

⎫<br />

nCpt<br />

∑<br />

CompPLA(PLA) = CompV arComponent(Cpt i), ⎪⎬<br />

i=1<br />

where:<br />

• nCpt = # of PLA variable components<br />

• Cpt i is the o i th component of a PLA<br />

⎪⎭<br />

⎪⎭<br />

(2)<br />

(3)<br />

(4)<br />

(5)<br />

(6)<br />

623

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!