Automatically Extracting Configuration Constraints Sarah Nadi *, Thorsten Berger *, Christian Kästner +, and Krzysztof Czarnecki * Product Line Engineering.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

Delta Confidential 1 5/29 – 6/6, 2001 SAP R/3 V4.6c PP Module Order Change Management(OCM)
You have been given a mission and a code. Use the code to complete the mission and you will save the world from obliteration…
Advanced Piloting Cruise Plot.
Kapitel S3 Astronomie Autor: Bennett et al. Raumzeit und Gravitation Kapitel S3 Raumzeit und Gravitation © Pearson Studium 2010 Folie: 1.
Kapitel 21 Astronomie Autor: Bennett et al. Galaxienentwicklung Kapitel 21 Galaxienentwicklung © Pearson Studium 2010 Folie: 1.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Chapter 1 The Study of Body Function Image PowerPoint
1 Copyright © 2013 Elsevier Inc. All rights reserved. Appendix 01.
1 Copyright © 2010, Elsevier Inc. All rights Reserved Fig 2.1 Chapter 2.
By D. Fisher Geometric Transformations. Reflection, Rotation, or Translation 1.
Business Transaction Management Software for Application Coordination 1 Business Processes and Coordination.
Copyright CompSci Resources LLC Web-Based XBRL Products from CompSci Resources LLC Virginia, USA. Presentation by: Colm Ó hÁonghusa.
Summary of Convergence Tests for Series and Solved Problems
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Jeopardy Q 1 Q 6 Q 11 Q 16 Q 21 Q 2 Q 7 Q 12 Q 17 Q 22 Q 3 Q 8 Q 13
Title Subtitle.
My Alphabet Book abcdefghijklm nopqrstuvwxyz.
DIVIDING INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
FACTORING ax2 + bx + c Think “unfoil” Work down, Show all steps.
Addition Facts
Year 6 mental test 5 second questions
Knowledge Extraction from Technical Documents Knowledge Extraction from Technical Documents *With first class-support for Feature Modeling Rehan Rauf,
Solve Multi-step Equations
Richmond House, Liverpool (1) 26 th January 2004.
Plan Recognition in Virtual Laboratories Ofra Amir and Yaakov (Kobi) Gal Ben-Gurion University of The Negev Department of Information Systems Engineering.
Configuration management
Software change management
ABC Technology Project
1 Undirected Breadth First Search F A BCG DE H 2 F A BCG DE H Queue: A get Undiscovered Fringe Finished Active 0 distance from A visit(A)
VOORBLAD.
Example-Driven Modeling Using Michał Antkiewicz, Kacper Bąk, Krzysztof Czarnecki, Zinovy Diskin, Dina Zayan 1, and Andrzej Wąsowski 2
1 Breadth First Search s s Undiscovered Discovered Finished Queue: s Top of queue 2 1 Shortest path from s.
Constant, Linear and Non-Linear Constant, Linear and Non-Linear
BIOLOGY AUGUST 2013 OPENING ASSIGNMENTS. AUGUST 7, 2013  Question goes here!
Factor P 16 8(8-5ab) 4(d² + 4) 3rs(2r – s) 15cd(1 + 2cd) 8(4a² + 3b²)
Flexible Product Line Engineering With a Virtual Platform Michał Antkiewicz NIER Track, ICSE’14 June 5,
© 2012 National Heart Foundation of Australia. Slide 2.
Lets play bingo!!. Calculate: MEAN Calculate: MEDIAN
Understanding Generalist Practice, 5e, Kirst-Ashman/Hull
Chapter 5 Test Review Sections 5-1 through 5-4.
GG Consulting, LLC I-SUITE. Source: TEA SHARS Frequently asked questions 2.
Addition 1’s to 20.
25 seconds left…...
U1A L1 Examples FACTORING REVIEW EXAMPLES.
H to shape fully developed personality to shape fully developed personality for successful application in life for successful.
Januar MDMDFSSMDMDFSSS
REGISTRATION OF STUDENTS Master Settings STUDENT INFORMATION PRABANDHAK DEFINE FEE STRUCTURE FEE COLLECTION Attendance Management REPORTS Architecture.
Week 1.
Chapter 10: The Traditional Approach to Design
Analyzing Genes and Genomes
We will resume in: 25 Minutes.
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
Essential Cell Biology
Intracellular Compartments and Transport
Excel Lesson 15 Working with Auditing and Analysis Tools Microsoft Office 2010 Advanced Cable / Morrison 1.
A SMALL TRUTH TO MAKE LIFE 100%
PSSA Preparation.
VPN AND REMOTE ACCESS Mohammad S. Hasan 1 VPN and Remote Access.
Essential Cell Biology
How Cells Obtain Energy from Food
Introduction to Domain Engineering Dr Michał Antkiewicz 1
Immunobiology: The Immune System in Health & Disease Sixth Edition
Energy Generation in Mitochondria and Chlorplasts
CpSc 3220 Designing a Database
From Model-based to Model-driven Design of User Interfaces.
Presentation transcript:

Automatically Extracting Configuration Constraints Sarah Nadi *, Thorsten Berger *, Christian Kästner +, and Krzysztof Czarnecki * Product Line Engineering Workshop, Univ. of Waterloo Dec. 9 th 2013 * +

Variability in real life Sarah Nadi 2 Integrated Garage Door Opener Electronic Compass Command navigation package Black Dacota Leather Automatic Trunk Premium Package Comfort Seats, Front Black Leatherette Selection will result in: + Addition of premium package - Removal of Black Leathertte

Handling variability Build Independently Sarah Nadi 3 Clone & OwnShare Assets Slide credits: T. Berger Software Product Lines (SPL) Product configuration Variability modeling Components DSLs Generators Preprocessors Design patterns … [Dubinski et al., CSMR ‚13]

But.. How can we build an SPL? Sarah Nadi 4 X Expensive and not always possible P1P2P3 Migrate … Build from scratch

What is involved in migrating? Sarah Nadi 5 Refactor Code Create Variability Model Detect Variation Points Identify Configurable Features Identify Feature Dependencies Refactor Architecture [She et al., ICSE‘11]

Variability model constraints Sarah Nadi 6 [Benavides et al., 2010] Hierarchy Constraint: MP3 => Media Cross-tree Constraint: Camera => High Res.

Can we automatically extract constraints? To what extent? Sarah Nadi 7

Scope C based systems using conditional compilation Focus on build-time variability Identify two sources of constraints Sarah Nadi 8

1. Conditional build-time errors Sarah Nadi 9 Specification 1: Every valid configuration of the system must not contain build-time errors.

Pre-processor Error if ASH && NOMMU Parser Error if ASH && EDITING && !MAX_LEN Type Error if ASH && EDITING_VI && MAX_LEN && !EDITING Invalid Configuration Constraint: ASH => !NOMMU Sarah Nadi 10

2. Feature effect Avoid meaningless configurations which do not add/remove parts of the code If we add/remove a feature, we want to get different functionality Determine under which configurations, a feature has an effect on the code Sarah Nadi 11 Specification 2: Every valid configuration should yield a lexically different program

Feature effect Sarah Nadi 12 MAX_LEN && EDITING && ASH MAX_LEN && EDITING_VI && ASH MAX_LEN => ASH && (EDITING || EDITING_VI)

Extract constraints by brute force Sarah Nadi 13 PnPn P3P2P1 … Build Individually If every configuration with feature X compiles except when Y is also selected X => !Y Not scalable--- 2 n combinations If every configuration with feature Z does not change the selected code except if W is also selected Z => W

Extracting constraints in a single pass Make use of variability-aware parsing & type checking to mimic build-time behaviour. Sarah Nadi 14 [Kästner et al., OOPSLA ‘11]

Infrastructure Developed tool FarCE – Feature Constraints Extraction Rely on previous work: TypeChef – Type-Checking Ifdef Variability KBuildMiner To analyze variability models: LVAT CDLTools Sarah Nadi 15

Empirical study Objectives: O1: Evaluate accuracy and scalability of extraction O2: Quantitatively and qualitatively study kinds of (extractable) constraints in real-world systems Used four systems with existing variability models Compare extracted constraints to existing hierarchy & crosstree edges in the model Sarah Nadi 16 Linux Kernel 7,691 C files 6,559 Features BusyBox 535 C files 844 Features eCos 579 C files 1,254 features uClibc 1,628 C files 367 features

Is the extraction accurate? Sarah Nadi 17 Specification 1 is 95% accurate Specification 2 is 76% accurate

Which constraints are recovered? Sarah Nadi 18 Can automatically recover 23% of variability model constraints! 5% by Specification 1 17% by Specification 2 Hierarchy edges reflected in code nesting Crosstree edges prevent build- time errors

Qualitative analysis of 144 unrecovered constraints What about constraints not found? Sarah Nadi 19 21% additional analyses 19% limitation in comparison 19% configurator-related 29% unknown 9% domain knowledge 3% limitation in extraction Manual analysis of constraints is hard! Some constraints are non-technical & need expert knowledge Qualitative analysis is subjective

Challenges Presence conditions and constraints explode Limit complexity of constraints used Use non-SAT based constraint combination techniques Different ways to compare constraints Our comparison is limited to binary constraints Other techniques which may be used? Understand the intent of different constraints without interviewing developers Sarah Nadi 20

Sarah Nadi 21 Automatically DoneAccurateExtracts substantial parts of VM An expert may still be needed Sarah Nadi (finishing soon … interested in a post doc) Extracting configuration constraints from code (95% & 76% respectively) Conditional Build-time errors & Feature Effect (Avg. 23% & up to 65%) Questions?

Pre-processor Error if ASH && NOMMU Parser Error if ASH && EDITING && !MAX_LEN Type Error if ASH && EDITING_VI && MAX_LEN && !EDITING Invalid Configuration Constraint: ASH => !NOMMU Sarah Nadi 22 Linker Error if ASH && EDITING && !INIT

Constraint formulas Preprocessor, parser, and type-checking constraints Linker constraints Feature effect 23 conditional symbol table Sarah Nadi

How are constraints used? Hierarchy edges are mainly reflected in how features are used/nested in the code (Spec 2: feature effect analysis) Cross tree edges are often used to prevent build-time errors (Spec 1: conditional build-time errors) Sarah Nadi 24

Partial pre-processor (lexer) 25 slide credits: C. Kästner Sarah Nadi

parser 26 slide credits: C. Kästner Sarah Nadi

Is the analysis scalable? Sarah Nadi 27 Can analyze Linux files in 12hr with parallelization