analysis of

  • 格式:pdf
  • 大小:192.30 KB
  • 文档页数:5

1

Afirststeptowardsaframeworkfortheautomated

analysisoffeaturemodels

DavidBenavides,SergioSegura,PabloTrinidad,AntonioRuiz-Cort´es

Dpto.ofComputerLanguagesandSystems

UniversityofSeville

{benavides,sergio,trinidad,aruiz}@tdg.lsi.us.es

Abstract—Featuremodellingisacommonmechanismforvariabilitymanagementinthecontextofsoftwareproductlines.Afteryearsofprogress,thenumberofproposalstoautomaticallyanalysefeaturemodelsisstillmodestandthedataabouttheperformanceofthedifferentsolversandlogicrepresentationsusedinsuchareaarepracticallynon–existent.ThreeofthemostpromisingproposalsfortheautomatedanalysisoffeaturemodelsarebasedonthemappingoffeaturemodelsintoCSP,SATandBDDsolvers.Inthispaperwepresentaperformancetestbetweenthreeoff-the-shelfJavaCSP,SATandBDDsolverstoanalysefeaturemodelswhichisanovelcontribution.Inaddition,weconcludethattheintegrationofsuchproposalsinaframeworkwillbeakeychallengeinthefuture.

IndexTerms—SoftwareProductLines,VariabilityManage-ment,FeatureModels.

I.INTRODUCTION

FeatureModels(FMs)areoneofthemostcommonvari-

abilitymechanisms.Goodtoolsupportisneededtodebug,

extractinformationandinsummaryanalyzeFMsinorderto

selectthemasavariabilitymechanisminaSoftwareProduct

Line(SPL)approach.AFMrepresentsallpossibleproducts

ofaSPLinasinglemodelusingfeatures.FMscanbeusedin

differentstagesofdevelopmentsuchasrequirementsengineer-

ing[10],[11],architecturedefinitionorcodegeneration[1],

[3].AFMisatree–likestructureandconsistsof:i)relations

betweenaparentfeatureanditschildfeatures.ii)cross–tree

constraintsthataretypicallyinclusionorexclusionstatements

oftheform“iffeatureFisincluded,thenfeatureXmustalso

beincluded(orexcluded)”.

AutomatedanalysisofFMsisanimportantchallengein

SPLresearch[1],[2].Itcanbeperformedusingoff–the–

shelfsolverstoautomaticallyextractusefulinformationof

theSPLsuchasthenumberofpossiblecombinationsof

features,alltheconfigurationsfollowingacriteria,finding

theminimumcostconfiguration,etc.Althoughtherehave

beensomepromisingproposalsbasedintherepresentation

ofFMsasaConstraintSatisfactionProblem(CSP),boolean

SATisfiabilityproblem(SAT)andBinaryDecisionDiagrams

(BDD)theperformanceofthesolversworkingwithsuch

representationsisunknownfortheSPLcommunity.

Inapreviouswork,wepresentedaperformancecomparison

oftwoCSPjavasolversanalysingFMs[8].Inthispaperwego

furtherintegratingdifferentsolversandlogicrepresentations.

Firstwegiveacompletemappingforthethreesolvers(BDD,

SATandCSP)andthenwepresentaperformancecomparisonofthem.Tothebestofourknowledge,thisisthefirsttestthat

measurestheperformanceofsolversdealingwithdifferent

logicrepresentationsofFMs.

Theremainderofthepaperisstructuredasfollows:in

SectionIItheautomatedanalysisofFMsisoutlinedand

detailsonhowtotranslateaFMintoaCSP,BDDandSATare

presented.SectionIIIfocusesontheresultsoftheexperiment.

Finallywesummarizeourconclusionsanddescribeourfuture

workinSectionIV.

II.AUTOMATEDANALYSISOFFEATUREMODELS

OnceaFMistranslatedintoasuitablerepresentationitis

possibletouseoff–the–shelfsolverstoautomaticallyperform

agreatvarietyofoperationssuchascalculatingthenumber

ofpossiblecombinationsoffeatures,retrievingconfigurations

followingacriteria,findingtheminimumcostconfiguration,

etc[6].

Thereisagreatvarietyoftechniquesandtoolsthatcanbe

usedintheautomatedanalysisofFMs.Thispaperfocuson

threewellknownproblemsintheareaofautomatedreasoning:

ConstraintSatisfactionProblems(CSP),BooleanSatisfiability

Problems(SAT)andBinaryDecisionDiagrams(BDD).All

thoserepresentationshavenotbeenyetfullyadoptedinthe

automatedanalysisofFMs.Inthenextsectionswewillgive

abriefoverviewofeachofthemandfinallywewillintroduce

howtranslatingaFMintoaCSP,SATandBDD.

A.ConstraintSatisfactionProblem

ConstraintProgrammingcanbedefinedasthesetoftech-

niquessuchasalgorithmsorheuristicsthatdealwithCSPs.

ACSPconsistsonasetofvariables,finitedomainsforthose

variablesandasetofconstraintsrestrictingthevaluesof

thevariables.ACSPissolvedbyfindingstates(valuesfor

variables)inwhichallconstraintsaresatisfied.CSPsolvers

candealwithnumericalvaluessuchasintegerdomains.The

mainideasconcerningtheuseofconstraintprogrammingon

FManalysiswerestatedin[6],[7].

B.BooleanSatisfiabilityProblem(SAT)

Apropositionalformulaisanexpressionconsistingona

setofbooleanvariables(literals)connectedbylogicopera-

tors(¬,∧,∨,→,↔).Thepropositionalsatisfiabilityproblem

(SAT)consistsondecidingwhetheragivenpropositional2

formulaissatisfiable,thatis,iflogicalvaluescanbeassigned

toitsvariablesinawaythatmakestheformulatrue.

Theproblemisrestrictedbyusingthepropositionalformu-

lasinconjunctivenormalform(CNF),thatis,propositional

formulascomposedbyaconjunctionofclausesinwhicheach

clauseisadisjunctionofliterals(e.g.((L1∨L2)∧(L3∨L4)∧

(L5∨L6))).Everypropositionalformulacanbeconvertedinto

anequivalentformulainCNFbyusinglogicalequivalences.