A Study of Variability Spaces in Open Source Software
Upcoming SlideShare
Loading in...5
×
 

A Study of Variability Spaces in Open Source Software

on

  • 161 views

ICSE '13 Doctoral Symposium

ICSE '13 Doctoral Symposium

Statistics

Views

Total Views
161
Views on SlideShare
149
Embed Views
12

Actions

Likes
0
Downloads
2
Comments
0

2 Embeds 12

http://swag.uwaterloo.ca 11
https://twitter.com 1

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Different choices u can make: heated leather seats, integrated garage opener etc.Mixture of software and hardware.. We focus on software
  • Example of SW variability.. User chooses the options…Different variants can be generated…Ability to be extended, changed and customized
  • Configuration space: what you can configure, the dependencies between features, represented in some format (Kconfig)Code space: implement functionality, certain blocks can be conditionalBuild Space: Files are conditionally compiled.. E.g., Kbuild
  • Busybox: UNIX utilities into a single small executableeCos: OS for embedded applications
  • Scattering degree (in how many constraints does a feature appear)Tangling degree (how many features in a constraint)
  • Color boxes on left side

A Study of Variability Spaces in Open Source Software A Study of Variability Spaces in Open Source Software Presentation Transcript

  • A Study of Variability Spacesin Open Source SoftwareSarah NadiUniversity of Waterloo, CanadaPhD Advisor: Richard C. HoltICSE ’13 Doctoral Symposium – May 21st 2013San Francisco, USA
  • Variability in Real LifeSarah Nadi Study of Variability Spaces - ICSE DS 2013 2• Integrated Garage Door Opener• Electronic CompassCommand navigation package• Heated Front Seats• Exterior Power Folding MirrorsPremium Package
  • Example of Software VariabilityThe Linux kernelI want usbsupport onARMarchitecture!User 1I want soundsupport onx86architecture!User 2Variant 2 Variant 1Sarah Nadi Study of Variability Spaces - ICSE DS 2013 3
  • What functionalitywill each choiceprovide?Code SpaceSupporting VariabilitySarah Nadi Study of Variability Spaces - ICSE DS 2013 4What can Iconfigure?How will my choicesselect the rightimplementationparts?ConfigurationSpaceBuild Space[Czarnecki & Eisenecker., 2000] [Svahnberg et al., 2005] [Tartler et al., 2011]Feature1 -> Feature2Block1 -> Feature2File1 -> Feature1(e.g., Kconfig files)(e.g., C code files) (e.g., Makefiles)
  • Build SpaceCode SpaceConfigurationSpacePrevious WorkSarah Nadi Study of Variability Spaces - ICSE DS 2013 5Change evolution[Adams et al.2008, McIntosh et al.2011]Feasibility of mappingextraction [Berger etal., 2010]Change evolution (Lotufo etal. 2009 & 2011)Use of feature modelingconcepts [She et al.,2010][Berger et al., 2010]Consistency with codespace[Tartler et al. 2011]Studying & extractingimplemented variability[Liebig et al., 2010, Sincero etal, 2010]Variability aware parsing[Kaestner et al.,2011]Consistency withconfiguration space [Tartler etal. 2011]
  • What is the origin of theseanomalies? How are theyfixed?What variability constraintsdoes each space provide?So, What’s the Problem??????? Are the spaces consistent?Sarah Nadi Study of Variability Spaces - ICSE DS 2013 6?What role does the BuildSpace play?
  • Examples of Systems Supporting Build-time VariabilitySarah Nadi Study of Variability Spaces - ICSE DS 2013 7BusyBoxLinux kernel> 12,000 features > 1,000 features > 800 features
  • RQ1: Variability Constraints in 3 Spaces?Sarah Nadi Study of Variability Spaces - ICSE DS 2013 8Build SpaceCode SpaceConfigurationSpace= ?• Identify overlap in constraints• Identify constraints that are onlyin one sideChallenges• Accurately extract code constraints• Meaningfully compare constraintsBenefits• Uncover limits of static analysis• Accurate reverse engineering• Better maintenanceBusyBox
  • RQ2: Role of Build System in Variability?Sarah Nadi Study of Variability Spaces - ICSE DS 2013 9MakefileConstraintExtractorBuild SpaceConstraints≈ 50% of configuration space features are onlyused in the build space![Nadi & Holt, JSEP ‘13][Liebig et al., 2010]Limitations• Extractor specific to Kbuild• Relies on text parsing of MakefilesBenefits• Show which parts of the systemcontrol most of variability
  • RQ3: Is Variability Consistent?Sarah Nadi Study of Variability Spaces - ICSE DS 2013 10Code SpaceConfigurationSpaceBuild Space[Tartler et al., 2011]Syntactic Anomalies• Don’t deal with constraints• Related to the setup of conditionalcompilation in KbuildSemantic Anomalies• Conflicts between constraints• Requires a SAT solver• Dead (never selected) &undead (always selected) codeblocks and files
  • RQ3 Cont’d: Detecting Syntactic AnomaliesXXXXXVariable NotUsed anomalyXFile Not UsedanomalyFeature NotDefined anomalySarah Nadi Study of Variability Spaces - ICSE DS 2013 11[Nadi & Holt, WCRE ‘11]
  • RQ3 Cont’d: Detecting Semantic VariabilityAnomalies• Sarah Nadi Study of Variability Spaces - ICSE DS 2013 12[Nadi&Holt, CSMR ‘12]More anomalies detected when build spaceconstraints are considered!
  • #ifdef X//B1#else//B2#endiffoo.c(Code Space)RQ3 Cont’d: Example of a Code BlockAnomalyUndead block!Dead block!foo.c => XBuild Spacefoo.c will becompiledonly if X isselected“Testing X inside foo.c is a wasteof text, since foo.c is built onlywhen X is selected”Sarah Nadi Study of Variability Spaces - ICSE DS 2013 13
  • RQ4: Intro. & Fix of Variability Anomalies?Sarah Nadi Study of Variability Spaces - ICSE DS 2013 141 Exploratory study with existing patches2 Mine git repository acrossseveral releases to confirm patternsVariability Anomalies[Nadi et al., MSR ’13]IncompleteconfigurationpatchesCode patchesTimecause fix14% 26%Avoid future anomalies & provide automatic fix solutions!
  • Limitations & Future Work• Build time variability• External validity• Focused on certain types of anomaliesSarah Nadi Study of Variability Spaces - ICSE DS 2013 15Future Work• Study other systems• Analyze other types of anomalies
  • Overall Contributions & Benefits• Contributions• Established the importance of build system variability• Quantified build system variability• Detected variability anomalies in the Linux kernel• Studied causes and fixes of variability anomalies• Benefits• Guide future variability analysis by determining overlaps betweenvariability spaces• Decrease variability anomalies in software systems• Improve maintainability of variable softwareSarah Nadi Study of Variability Spaces - ICSE DS 2013 16
  • Acknowledgements• University of Waterloo• Ric Holt (Supervisor)• Krzysztof Czarnecki• Mike Godfrey• Friedrich-Alexander-Universität Erlangen-Nürnberg• Christian Dietrich• Reinhard Tartler• Daniel Lohmann• Leipzig University• Thorsten Berger• Carnegie Mellon University• Christian KästnerSarah Nadi Study of Variability Spaces - ICSE DS 2013 17
  • Sarah Nadi Study of Variability Spaces - ICSE DS 2013 18Time2011WCRE ‘11CSMR ‘122012 2013 2014MSR ‘13In progressJSEP ‘13BusyBoxOther anomaliesQuestions?snadi@uwaterloo.cahttp://swag.uwaterloo.ca/~snadi