410 likes | 554 Views
Research @ GSD Lab, University of Waterloo. Yingfei Xiong, 2011. About me. 2004~2006,Ph.D. Student@SEI, PKU SA Group 2006~2009,Ph.D. Student@U Tokyo Advisors: Zhenjiang Hu, Masato Takeichi 2009~,PostDoc@U Waterloo Advisor:Krzysztof Czarnecki. Generative Software Development Laboratory.
E N D
Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011
About me • 2004~2006,Ph.D. Student@SEI, PKU • SA Group • 2006~2009,Ph.D. Student@U Tokyo • Advisors: Zhenjiang Hu, Masato Takeichi • 2009~,PostDoc@U Waterloo • Advisor:Krzysztof Czarnecki
Generative Software Development Laboratory • Leaded by Krzysztof Czarnecki • Generative programming • Cardinarity-based feature model • Staged configuration • 12 papers cited 100+ times • Ph.D Thesis cited 2000+ times • “Probably one of the best groups in MDE” • Jean Bezivin, University of Nantes
Generative Software Development Laboratory • 1 faculty • 1 research associate • 2 postdocs • 7+1 Ph.D. Students • 2 MASc. Students • 2 Visitors • 2010 publications • ICSE, ASE, SPLC, ICSM, ICMT, SLE, RE industry track, MDI, VaMoS... • With only 1 rejection
Funding Industry + Government match
Application-oriented • Real industry applications > publications in top venues • Usefulness verified on real data > intelligent solution • Most needed problem > interesting / promising problem
Data-Centric Collect data Analyze data Discover problem Discover solution Evaluate Apply to industry / write paper Idea-centric Idea Develop into a solution Refine problem Collect data Evaluate Write paper Data Centric Problem-centric Problem Analyze Problem Propose solution Collect data Evaluate Write paper
Publication • No publication in 2008 • No publication in 2009 • 2010 • [VaMoS] Variability Model of the Linux Kernel • [SPLC] Evolution of the Linux Kernel Variability Model • [ASE] Variability Modeling in the Real: A Perspective from the Operating Systems Domain • [ICSE] Reverse Engineering Feature Models
Discussion • Advantages: • Solving real world problem • No false assumption • Direct application to industry • Disadvantages: • Fewer papers • collecting data requires a lot of work • problem may not be easily solvable • work may not be easily appreciated • Potentially short-sighted
Fix Generation for Feature Model Configuration • CDL: a configuration language for embeded operation system • eCos: graphical configurator for CDL • Both developed by RedHat • FODA feature model with attribute
cdl_option DEBUG { display "Enable Debug" } cdl_option LOG { display "Enable Log" } cdl_option LOG_LEVEL { display "Log Level" active_if LOG flavor data default_value 5 } cdl_option TRACE { display "Enable Trace" requires DEBUG & LOG } cdl_option TRACE_LEVEL { display "Trace Level" active_if TRACE flavor data default_value 3 requires TRACE_LEVEL < LOG_LEVEL } CDL Example
Problem: No complete fix list • "if CYGPKG_MYPKG_OP1 is active, make sure that the list of tests for that package is a substring ofCYGDAT_MYPKG_ACTIVE_TESTS. This works 50% ofthe time. Problem is the other 50% of the time,rather than fiddling with the substrings, it enables/ disables my subpackage!"
Is it possible to give complete solution list? Will it be too long to use? Will it be too long to generate?
Features: A,B,C,D,E,F Constraints A -> B \/ C B -> D \/ E E -> F \/ G Configuration: A=true B,C,D,E,F=false Fixes A->false B->true, D->true B->true , E-> true, F-> true B->true, E->true, G->true C->true Boolean Features
Factors affecting the number of fix • How many features are inter-related • How many disjunction are used in constraints • Observation: Both factors are of low values in real CDL models
Non-Boolean Features • Features: A, B • Constraints: A > B • Configuration: A=10, B=11
Abstract Fixes • Features: A, B • Constraints: A > B • Configuration: A=10, B=11 • Fixes: • Change A { A>11 } • Change B { B<10 }
Minimal Fixes • Changing as few variables as possible • Change A { A>11 } • is better than • Change A, B {A>B} • Constraints as loose as possible • Change A {A>11} • is better than • Change A {A>12}
Factors affecting abstract fixes • How many variables are inter-constrained • How complex the constraints are • Observation: Both factors are low
Fix Generation for Boolean Features: • Statically analyze the violated constraint • Statically analyze interactions • Remove unnecessary fixes based on dynamic fixes
An Example • Variables: A, B, C, D • Constraints: • A->(B/\C) • B->(!C\/D) • Configuration: A=true, B=false, C=true, D=false • A->(B/\C) is violated
fix[A->(B/\C)] =fix[!A] ⋃ fix[B/\C] ={<A=false>} ⋃ (fix[B] × fix[C]) ={<A=false>} ⋃ {<B=true, C=true>} ={<A=false>, <B=true, C=true>} Constraints: A->(B/\C) B->(!C\/D) Configuration: A=true, B=false, C=true, D=false Step 1. Analyze the Violated Constraint
{<B=true, C=true>} changes B and C fix[true->(!true\/D)] =fix[false]⋃fix[false\/D] ={}⋃fix[false]⋃fix[D] ={<D=true>} FixSet ={<A=false>}⋃ ({<B=true,C=true>}×{<D=true>} ={<A=false>, <B=true, C=true, D=true>} Constraints: A->(B/\C) B->(!C\/D) Configuration: A=true, B=false, C=true, D=false Step 2: Analyze Interactions
{<A=false>, <B=true, C=true, D=true>} becomes {<A>, <B, D>} Constraints: A->(B/\C) B->(!C\/D) Configuration: A=true, B=false, C=true, D=false Step 3: Remove unnecessary fix
Non-Boolean Features • Represent non-boolean constraints as boolean variables • Statically analyze boolean constraints • Convert the fix back to abstract ones
An Example • Features: • M, N:Boolean • A, B:Int • Constraints: • N -> A>10 • A<B -> M • Configuration: • A=8, B=2, M=false, N=true
Features: M, N:Boolean A, B:Int Constraints: N -> A>10 A<B -> M Configuration: A=8, B=2, M=false, N=true Boolean Variables: X: A>10 Y: A<B Converted Constraints: N -> X Y -> M Converted Configuration: X=false Y=true M=false, N=true Step1: Represent as boolean variables
Features: M, N:Boolean A, B:Int Configuration: A=8, B=2, M=false, N=true Boolean Variables: X: A>10 Y: A<B Converted Constraints: N -> X Y -> M fix[N->X]={<N=false>, <X=true>} Step 2.1: Analyze Single Constraint
Features: M, N:Boolean A, B:Int Configuration: A=8, B=2, M=false, N=true Boolean Variables: X: A>10 Y: A<B Converted Constraints: N -> X Y -> M <X=true> relates to Y fix[Y->M]={<Y=false>, <M=true>} FixSet={<N=false>}⋃ ({X=true}×{<Y=false>, <M=true>}={<N=false>, <X=true, Y=fasle>, <X=true, M=true>} Step 2.2: Analyze Interaction
Features: M, N:Boolean A, B:Int Configuration: A=8, B=2, M=false, N=true Boolean Variables: X: A>10 Y: A<B Converted Constraints: N -> X Y -> M <X=true, Y=false> All variables in X and Y {A, B} All non-empty subsets {A} {B} {A,B} Step 3.1 Produce Variable Set
Features: M, N:Boolean A, B:Int Configuration: A=8, B=2, M=false, N=true Boolean Variables: X: A>10 Y: A<B Converted Constraints: N -> X Y -> M Step 3.2 Build a partial order • <X=true, Y=false> {A} {B} {A,B}
Features: M, N:Boolean A, B:Int Configuration: A=8, B=2, M=false, N=true Boolean Variables: X: A>10 Y: A<B Converted Constraints: N -> X Y -> M Step 3.3 Test Satisfiability using SMT solvers • <X=true, Y=false> • Change A {A>10, A<2} • unsatisfiable • Change B {8>10, 8<B} • unsatisfiable • Change A, B {A>10, A<B} • satisfiable
Evaluation • Verification of all observation • Is the number of fixes always small? • Is the generation from non-boolean constraints always fast?
Summary • Application-oriented, data-centric research method • "Data-centric" is probably important to software engineering research