on the impact of feature dependencies when maintaining preprocessor-based software product lines

Tags:

Post on 14-Sep-2014

162 Views

Category:

Education

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presentation at 10th International Conference on Generative Programming and Component Engineering (GPCE 2011)

TRANSCRIPT

OntheImpactofFeatureDependencieswhenMaintaining

Preprocessor‐basedSo<wareProductLines

MárcioRibeiroFelipeQueirozPauloBorba

TársisTolêdoClausBrabrandSérgioSoares

{mmr3,Cq,phmb,twt,scbs}@cin.ufpe.br

brabrand@itu.dk

VirtualSeparaKonofConcerns(VSoC)

2

ButnotenoughforFeatureModularity…

3

Problem

4

 Developerscanintroducecompila?onandbehavioralerrorstofeaturesduetofeaturedependencies…

…leadingtolowerproducKvity

 LateerrordetecKon  Developersdiscovertheproblemonlywhencompilingandexecu?ngtheproblema?cproduct

 DifficultnavigaKon  Developersnotawareoffeaturedependencies

  EvenworsewhenusingVSoC:featuresarehidden!

5

6

Tominimizetheseproblems:

EmergentInterfaces

EmergentInterfacesinanutshell

7

Dependenciescaptured!Developerscanfocusontheimpactedfeatures…

8

9

Featuredependenciescancauseproblems

10

EmergentInterfacescomplementVSoC

Agenda

11

Studysecngs

 43Preprocessor‐basedSoMwareProductlines  JavaandC  Differentsizesanddomains

 Scripttoolforcompu?ngtwometrics: MDi:numberofmethodswithpreprocessordirec?ves MDe:numberofmethodswithfeaturedependencies

12

Featuredependenciesourtoolconsiders

13

EffortesKmaKon:VSoCvs.EmergentInterfaces

14Num

berofFragm

ents

Num

berofFeatures

MethodsselecKon

 Randomlymethodsselec?on  Only methods that contain the feature dependencieswefocusonthiswork

 Whichmethodsshouldweselect? Manyfragments:favoringemergentinterfaces

  Fewfragments:nodifferences

15

Groups

 Twogroups:

 Why2asathreshold?  Differencesbetweenbothapproachesappearfrom2

  1:bothapproacheshavealwaysthesameeffortes?ma?on

16

MethodsselecKontofitthegroups

 Propor?onalselec?onaccordingtoeachSPL

 Example:libxml2  Group1:953methods(8methodsselected)  Group2:125methods(1methodselected)

 Majority(23productlines)  1:1

17

GeneralalgorithmforeffortesKmaKon

 Whilewedonotreach3replica?ons  Foreachproductline

  Randomlyselectmethodspropor?onallyaccording to thegroups

  Foreachmethod  Randomlyselectavariable

  From this variable, computeNoFa,NoFe, and LOC for bothapproaches

18

19

Results

20

QuesKon1:howoMenmethodswithpreprocessordirec?vescontainfeature

dependencies?

Frequencyoffeaturedependencies

21

MethodswithDependencies

MethodswithDirecKves

Ourdatarevealthat…

 Methods with direc?ves that also contain thefeaturedependencieswestudied: Max:88%(mobile‐rss)

 Min:12%(lampiro)

 So, the featuredependenciesweconsideredmaybecommoninthe43SPLsweanalyzed  Only6SPLshaveMDe/MDi<50%

22

23

QuesKon2:howfeaturedependenciesimpact

maintenanceeffortwhenusingVSoCandemergent

interfaces?

SelecKon:methods,groups,SPLs

 Foreachreplica?on:115methods

 Methodsselec?onaccordingtoeachproductline

24

EmergentInterfaceseffortesKmaKon

 Effortes?ma?oninallSPLs

 Methodsdistribu?onbygroups:

25

Whenincreasingthenumberoffragments…

26

 … the percentage of methods where EmergentInterfacesachieveeffortreduc?onalsoincreases…

65%

70%

75%

80%

85%

90%

95%

100%

>2 >3 >4 >5 >6

Replica?on1

Replica?on2

Replica?on3

EsKmaK

onofEffortred

ucKon

NumberofFragments

Threatstovalidity

 Metricsandeffortes?ma?on  Timebehermeasureseffort…  …butthemetricsares?lluseful

  Overheadtocomputeemergentinterfaces

 Dependencies  Interprocedural,chainofassignments…(notcomputed)

  So,thenumberswepresentedmightbeevenhigher…

27

Concludingremarks

28

 How oMen the feature dependencies we analyzedoccurinprac?ce? Max:88%;Min:12%;Majority>50%

 Emergentinterfacescanachieveeffortreduc?on  For the majority of the studied methods (65%): sameeffortofVSoC

  Nega?veimpactofVSoCisnotsocommon

 More significant effort reduc?ons: methods withmanyfragments(Group1)

top related