research @ gsd lab, university of waterloo yingfei xiong, 2011

41
Research @ GSD Lab, Un iversity of Waterloo Yingfei Xiong, 2011

Upload: jared-jennings

Post on 18-Jan-2016

217 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Research @ GSD Lab, University of Waterloo

Yingfei Xiong, 2011

Page 2: 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

Page 3: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

Page 4: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

Page 5: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Funding

Industry + Government match

Page 6: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Application-oriented, data-centric research

Page 7: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Application-oriented

• Real industry applications > publications in top venues

• Usefulness verified on real data > intelligent solution

• Most needed problem > interesting / promising problem

Page 8: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Data Centric

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

Problem-centric

Problem

Analyze Problem

Propose solution

Collect data

Evaluate

Write paper

Page 9: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Rafael's Bug Report Assignment

Page 10: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Thiago's API Migration

Page 11: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

RehanUse Case Discovery

Page 12: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Steven / Thorsten / RafaelReal World Feature Model

Page 13: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Publication

• No publication in 2008• No publication in 2009• 2010

– [VaMoS] Variability Model of the Linux Kernel– [SPLC] Evolution of the Linux Kernel Variabilit

y Model– [ASE] Variability Modeling in the Real: A Pers

pective from the Operating Systems Domain– [ICSE] Reverse Engineering Feature Models

Page 14: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Moises, YingfeiProcess Model Refinement

Page 15: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

Page 16: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

Page 17: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

CDL Examplecdl_option DEBUG {

display "Enable Debug"}

cdl_option LOG {display "Enable Log"

}

cdl_option LOG_LEVEL {display "Log Level"active_if LOGflavor datadefault_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

}

Page 18: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Demo

Page 19: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Problem: No complete fix list

• "if CYGPKG_MYPKG_OP1 is active, make sure that the list of tests for that package is a substring of CYGDAT_MYPKG_ACTIVE_TESTS. This works 50% of the time. Problem is the other 50% of the time, rather than fiddling with the substrings, it enables / disables my subpackage!"

Page 20: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Is it possible to give complete solution list?

Will it be too long to use?

Will it be too long to generate?

Page 21: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Boolean Features

• 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->tr

ue– C->true

Page 22: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

Page 23: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Non-Boolean Features

• Features: A, B

• Constraints: A > B

• Configuration: A=10, B=11

Page 24: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Abstract Fixes

• Features: A, B

• Constraints: A > B

• Configuration: A=10, B=11

• Fixes:– Change A { A>11 }– Change B { B<10 }

Page 25: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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}

Page 26: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Factors affecting abstract fixes

• How many variables are inter-constrained

• How complex the constraints are

• Observation: Both factors are low

Page 27: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Fix Generation for Boolean Features:

1. Statically analyze the violated constraint

2. Statically analyze interactions

3. Remove unnecessary fixes based on dynamic fixes

Page 28: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

Page 29: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Step 1. Analyze the Violated Constraint

fix[A->(B/\C)]

=fix[!A] fix[B/\C]⋃={<A=false>} (fix[B] × ⋃

fix[C])

={<A=false>} {<B=tru⋃e, C=true>}

={<A=false>, <B=true, C=true>}

• Constraints:– A->(B/\C)– B->(!C\/D)

• Configuration: – A=true, B=false, C=tru

e, D=false

Page 30: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Step 2: Analyze Interactions

{<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=tru

e, D=true>}

• Constraints:– A->(B/\C)– B->(!C\/D)

• Configuration: – A=true, B=false, C=tru

e, D=false

Page 31: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Step 3: Remove unnecessary fix

{<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=tru

e, D=false

Page 32: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Non-Boolean Features

• Represent non-boolean constraints as boolean variables

• Statically analyze boolean constraints

• Convert the fix back to abstract ones

Page 33: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

Page 34: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Step1: Represent as boolean variables

• 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

Page 35: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

• fix[N->X]={<N=false>, <X=true>}

Page 36: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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> relates to Y• fix[Y->M]={<Y=false>,

<M=true>}

• FixSet={<N=false>} ({X=tr⋃ue}×{<Y=false>, <M=true>}={<N=false>, <X=true, Y=fasle>, <X=true, M=true>}

Page 37: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

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

• <X=true, Y=false>• All variables in X and

Y– {A, B}

• All non-empty subsets– {A}– {B}– {A,B}

Page 38: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Step 3.2 Build a partial order

• 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

{A} {B}

{A,B}

• <X=true, Y=false>

Page 39: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Step 3.3 Test Satisfiability using SMT solvers

• 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>• Change A {A>10, A<

2}– unsatisfiable

• Change B {8>10, 8<B}– unsatisfiable

• Change A, B {A>10, A<B}– satisfiable

Page 40: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Evaluation

• Verification of all observation– Is the number of fixes always small?– Is the generation from non-boolean constraint

s always fast?

Page 41: Research @ GSD Lab, University of Waterloo Yingfei Xiong, 2011

Summary

• Application-oriented, data-centric research method

• "Data-centric" is probably important to software engineering research