SlideShare a Scribd company logo
1 of 18
A Study of Variability Spaces
in Open Source Software
Sarah Nadi
University of Waterloo, Canada
PhD Advisor: Richard C. Holt
ICSE ’13 Doctoral Symposium – May 21st 2013
San Francisco, USA
Variability in Real Life
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 2
• Integrated Garage Door Opener
• Electronic Compass
Command navigation package
• Heated Front Seats
• Exterior Power Folding Mirrors
Premium Package
Example of Software Variability
The Linux kernel
I want usb
support on
ARM
architecture!
User 1
I want sound
support on
x86
architecture!
User 2
Variant 2 Variant 1
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 3
What functionality
will each choice
provide?
Code Space
Supporting Variability
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 4
What can I
configure?
How will my choices
select the right
implementation
parts?
Configuration
Space
Build Space
[Czarnecki & Eisenecker., 2000] [Svahnberg et al., 2005] [Tartler et al., 2011]
Feature1 -> Feature2
Block1 -> Feature2
File1 -> Feature1
(e.g., Kconfig files)
(e.g., C code files) (e.g., Makefiles)
Build Space
Code Space
Configuration
Space
Previous Work
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 5
Change evolution
[Adams et al.
2008, McIntosh et al.
2011]
Feasibility of mapping
extraction [Berger et
al., 2010]
Change evolution (Lotufo et
al. 2009 & 2011)
Use of feature modeling
concepts [She et al.,
2010][Berger et al., 2010]
Consistency with code
space
[Tartler et al. 2011]
Studying & extracting
implemented variability
[Liebig et al., 2010, Sincero et
al, 2010]
Variability aware parsing
[Kaestner et al.,2011]
Consistency with
configuration space [Tartler et
al. 2011]
What is the origin of these
anomalies? How are they
fixed?
What variability constraints
does 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 Build
Space play?
Examples of Systems Supporting Build-
time Variability
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 7
BusyBoxLinux kernel
> 12,000 features > 1,000 features > 800 features
RQ1: Variability Constraints in 3 Spaces?
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 8
Build SpaceCode Space
Configuration
Space
= ?
• Identify overlap in constraints
• Identify constraints that are only
in one side
Challenges
• Accurately extract code constraints
• Meaningfully compare constraints
Benefits
• Uncover limits of static analysis
• Accurate reverse engineering
• Better maintenance
BusyBox
RQ2: Role of Build System in Variability?
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 9
Makefile
Constraint
Extractor
Build Space
Constraints
≈ 50% of configuration space features are only
used in the build space!
[Nadi & Holt, JSEP ‘13]
[Liebig et al., 2010]
Limitations
• Extractor specific to Kbuild
• Relies on text parsing of Makefiles
Benefits
• Show which parts of the system
control most of variability
RQ3: Is Variability Consistent?
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 10
Code Space
Configuration
Space
Build Space
[Tartler et al., 2011]
Syntactic Anomalies
• Don’t deal with constraints
• Related to the setup of conditional
compilation in Kbuild
Semantic Anomalies
• Conflicts between constraints
• Requires a SAT solver
• Dead (never selected) &
undead (always selected) code
blocks and files
RQ3 Cont’d: Detecting Syntactic Anomalies
X
XX
X
X
Variable Not
Used anomaly
X
File Not Used
anomaly
Feature Not
Defined anomaly
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 11
[Nadi & Holt, WCRE ‘11]
RQ3 Cont’d: Detecting Semantic Variability
Anomalies
• '
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 12
[Nadi&Holt, CSMR ‘12]
More anomalies detected when build space
constraints are considered!
#ifdef X
//B1
#else
//B2
#endif
foo.c
(Code Space)
RQ3 Cont’d: Example of a Code Block
Anomaly
Undead block!
Dead block!
foo.c => X
Build Space
foo.c will be
compiled
only if X is
selected“Testing X inside foo.c is a waste
of text, since foo.c is built only
when 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 14
1 Exploratory study with existing patches
2 Mine git repository across
several releases to confirm patterns
Variability Anomalies
[Nadi et al., MSR ’13]
Incomplete
configuration
patches
Code patches
Time
cause fix
14% 26%
Avoid future anomalies & provide automatic fix solutions!
Limitations & Future Work
• Build time variability
• External validity
• Focused on certain types of anomalies
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 15
Future 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 between
variability spaces
• Decrease variability anomalies in software systems
• Improve maintainability of variable software
Sarah 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ästner
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 17
Sarah Nadi Study of Variability Spaces - ICSE DS 2013 18
Time2011
WCRE ‘11
CSMR ‘12
2012 2013 2014
MSR ‘13
In progress
JSEP ‘13
BusyBox
Other anomalies
Questions?
snadi@uwaterloo.ca
http://swag.uwaterloo.ca/~snadi

More Related Content

Similar to A Study of Variability Spaces in Open Source Software

odersky-adg-v5-220711161332-10853f8f.pdf
odersky-adg-v5-220711161332-10853f8f.pdfodersky-adg-v5-220711161332-10853f8f.pdf
odersky-adg-v5-220711161332-10853f8f.pdf
Ilham213720
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?
OpenFest team
 
Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)
Ravi Okade
 

Similar to A Study of Variability Spaces in Open Source Software (20)

odersky-adg-v5-220711161332-10853f8f.pdf
odersky-adg-v5-220711161332-10853f8f.pdfodersky-adg-v5-220711161332-10853f8f.pdf
odersky-adg-v5-220711161332-10853f8f.pdf
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
Journal Seminar: Is Singularity-based Container Technology Ready for Running ...
 
Software variability management - 2017
Software variability management - 2017Software variability management - 2017
Software variability management - 2017
 
Why kernelspace sucks?
Why kernelspace sucks?Why kernelspace sucks?
Why kernelspace sucks?
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache Beam
 
An Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux ContainersAn Updated Performance Comparison of Virtual Machines and Linux Containers
An Updated Performance Comparison of Virtual Machines and Linux Containers
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a serviceCOMMitMDE'18: Eclipse Hawk: model repository querying as a service
COMMitMDE'18: Eclipse Hawk: model repository querying as a service
 
Automated hardware testing using docker for space
Automated hardware testing using docker for spaceAutomated hardware testing using docker for space
Automated hardware testing using docker for space
 
Metamorphic Domain-Specific Languages
Metamorphic Domain-Specific LanguagesMetamorphic Domain-Specific Languages
Metamorphic Domain-Specific Languages
 
Software variability management - 2019
Software variability management - 2019Software variability management - 2019
Software variability management - 2019
 
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
ContainerDays Boston 2015: "CoreOS: Building the Layers of the Scalable Clust...
 
Data Structures problems 2002
Data Structures problems 2002Data Structures problems 2002
Data Structures problems 2002
 
Realizing the Promise of Portable Data Processing with Apache Beam
Realizing the Promise of Portable Data Processing with Apache BeamRealizing the Promise of Portable Data Processing with Apache Beam
Realizing the Promise of Portable Data Processing with Apache Beam
 
Seminar on Parallel and Concurrent Programming
Seminar on Parallel and Concurrent ProgrammingSeminar on Parallel and Concurrent Programming
Seminar on Parallel and Concurrent Programming
 
What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)What is Java Technology (An introduction with comparision of .net coding)
What is Java Technology (An introduction with comparision of .net coding)
 
Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)
 
Exploiting NoSQL Like Never Before
Exploiting NoSQL Like Never BeforeExploiting NoSQL Like Never Before
Exploiting NoSQL Like Never Before
 
Life & Work of Butler Lampson | Turing100@Persistent
Life & Work of Butler Lampson | Turing100@PersistentLife & Work of Butler Lampson | Turing100@Persistent
Life & Work of Butler Lampson | Turing100@Persistent
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 

A Study of Variability Spaces in Open Source Software

  • 1. A Study of Variability Spaces in Open Source Software Sarah Nadi University of Waterloo, Canada PhD Advisor: Richard C. Holt ICSE ’13 Doctoral Symposium – May 21st 2013 San Francisco, USA
  • 2. Variability in Real Life Sarah Nadi Study of Variability Spaces - ICSE DS 2013 2 • Integrated Garage Door Opener • Electronic Compass Command navigation package • Heated Front Seats • Exterior Power Folding Mirrors Premium Package
  • 3. Example of Software Variability The Linux kernel I want usb support on ARM architecture! User 1 I want sound support on x86 architecture! User 2 Variant 2 Variant 1 Sarah Nadi Study of Variability Spaces - ICSE DS 2013 3
  • 4. What functionality will each choice provide? Code Space Supporting Variability Sarah Nadi Study of Variability Spaces - ICSE DS 2013 4 What can I configure? How will my choices select the right implementation parts? Configuration Space Build Space [Czarnecki & Eisenecker., 2000] [Svahnberg et al., 2005] [Tartler et al., 2011] Feature1 -> Feature2 Block1 -> Feature2 File1 -> Feature1 (e.g., Kconfig files) (e.g., C code files) (e.g., Makefiles)
  • 5. Build Space Code Space Configuration Space Previous Work Sarah Nadi Study of Variability Spaces - ICSE DS 2013 5 Change evolution [Adams et al. 2008, McIntosh et al. 2011] Feasibility of mapping extraction [Berger et al., 2010] Change evolution (Lotufo et al. 2009 & 2011) Use of feature modeling concepts [She et al., 2010][Berger et al., 2010] Consistency with code space [Tartler et al. 2011] Studying & extracting implemented variability [Liebig et al., 2010, Sincero et al, 2010] Variability aware parsing [Kaestner et al.,2011] Consistency with configuration space [Tartler et al. 2011]
  • 6. What is the origin of these anomalies? How are they fixed? What variability constraints does 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 Build Space play?
  • 7. Examples of Systems Supporting Build- time Variability Sarah Nadi Study of Variability Spaces - ICSE DS 2013 7 BusyBoxLinux kernel > 12,000 features > 1,000 features > 800 features
  • 8. RQ1: Variability Constraints in 3 Spaces? Sarah Nadi Study of Variability Spaces - ICSE DS 2013 8 Build SpaceCode Space Configuration Space = ? • Identify overlap in constraints • Identify constraints that are only in one side Challenges • Accurately extract code constraints • Meaningfully compare constraints Benefits • Uncover limits of static analysis • Accurate reverse engineering • Better maintenance BusyBox
  • 9. RQ2: Role of Build System in Variability? Sarah Nadi Study of Variability Spaces - ICSE DS 2013 9 Makefile Constraint Extractor Build Space Constraints ≈ 50% of configuration space features are only used in the build space! [Nadi & Holt, JSEP ‘13] [Liebig et al., 2010] Limitations • Extractor specific to Kbuild • Relies on text parsing of Makefiles Benefits • Show which parts of the system control most of variability
  • 10. RQ3: Is Variability Consistent? Sarah Nadi Study of Variability Spaces - ICSE DS 2013 10 Code Space Configuration Space Build Space [Tartler et al., 2011] Syntactic Anomalies • Don’t deal with constraints • Related to the setup of conditional compilation in Kbuild Semantic Anomalies • Conflicts between constraints • Requires a SAT solver • Dead (never selected) & undead (always selected) code blocks and files
  • 11. RQ3 Cont’d: Detecting Syntactic Anomalies X XX X X Variable Not Used anomaly X File Not Used anomaly Feature Not Defined anomaly Sarah Nadi Study of Variability Spaces - ICSE DS 2013 11 [Nadi & Holt, WCRE ‘11]
  • 12. RQ3 Cont’d: Detecting Semantic Variability Anomalies • ' Sarah Nadi Study of Variability Spaces - ICSE DS 2013 12 [Nadi&Holt, CSMR ‘12] More anomalies detected when build space constraints are considered!
  • 13. #ifdef X //B1 #else //B2 #endif foo.c (Code Space) RQ3 Cont’d: Example of a Code Block Anomaly Undead block! Dead block! foo.c => X Build Space foo.c will be compiled only if X is selected“Testing X inside foo.c is a waste of text, since foo.c is built only when X is selected” Sarah Nadi Study of Variability Spaces - ICSE DS 2013 13
  • 14. RQ4: Intro. & Fix of Variability Anomalies? Sarah Nadi Study of Variability Spaces - ICSE DS 2013 14 1 Exploratory study with existing patches 2 Mine git repository across several releases to confirm patterns Variability Anomalies [Nadi et al., MSR ’13] Incomplete configuration patches Code patches Time cause fix 14% 26% Avoid future anomalies & provide automatic fix solutions!
  • 15. Limitations & Future Work • Build time variability • External validity • Focused on certain types of anomalies Sarah Nadi Study of Variability Spaces - ICSE DS 2013 15 Future Work • Study other systems • Analyze other types of anomalies
  • 16. 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 between variability spaces • Decrease variability anomalies in software systems • Improve maintainability of variable software Sarah Nadi Study of Variability Spaces - ICSE DS 2013 16
  • 17. 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ästner Sarah Nadi Study of Variability Spaces - ICSE DS 2013 17
  • 18. Sarah Nadi Study of Variability Spaces - ICSE DS 2013 18 Time2011 WCRE ‘11 CSMR ‘12 2012 2013 2014 MSR ‘13 In progress JSEP ‘13 BusyBox Other anomalies Questions? snadi@uwaterloo.ca http://swag.uwaterloo.ca/~snadi

Editor's Notes

  1. Different choices u can make: heated leather seats, integrated garage opener etc.Mixture of software and hardware.. We focus on software
  2. Example of SW variability.. User chooses the options…Different variants can be generated…Ability to be extended, changed and customized
  3. 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
  4. Busybox: UNIX utilities into a single small executableeCos: OS for embedded applications
  5. Scattering degree (in how many constraints does a feature appear)Tangling degree (how many features in a constraint)
  6. Color boxes on left side