39
Mathieu Acher, Benoit Combemale, Philippe Collet, Olivier Barais, Philippe Lahire and Robert B. France Composing your Composi2ons of Variability Models

Composing your Compositions of Variability Models (Models 2013 presentation)

Embed Size (px)

DESCRIPTION

Modeling and managing variability is a key activity in a growing number of software engineering contexts. Support for composing variability models is arising in many engineering scenarios, for instance, when several subsystems or modeling artifacts, each coming with their own variability and possibly developed by different stakeholders, should be combined together. In this paper, we consider the problem of composing fea- ture models (FMs), a widely used formalism for representing and reasoning about a set of variability choices. We show that several composition operators can actually be defined, depending on both matching/merging strategies and semantic properties expected in the composed FM. We present four alternative forms and their implementations. We discuss their relative trade-offs w.r.t. reasoning, customizability, traceability, composability and quality of the resulting feature diagram. We summarize these findings in a reading grid which is validated by revisiting some relevant existing works. Our contribution should assist developers in choosing and implementing the right composition operators.

Citation preview

Page 1: Composing your Compositions of Variability Models (Models 2013 presentation)

Mathieu  Acher,  Benoit  Combemale,  Philippe  Collet,  Olivier  Barais,  Philippe  Lahire  and  Robert  B.  France  

Composing  your  Composi2ons  of  Variability  Models  

Page 2: Composing your Compositions of Variability Models (Models 2013 presentation)

2  2  

Extensible  architect

ures  

(eg  plugins-­‐based)  

Configura2on  

files  

System  

Preferences  

Configurators  

Source  code  Build  

systems  

Comparison  of  *  

Structural  or  behav

orial    

models  

External  Variability  Internal  Variability  Variability  @  run.2me  

Page 3: Composing your Compositions of Variability Models (Models 2013 presentation)

3  3  

*systems,  viewpoints,  concerns,  stakeholders  

MULTI-­‐*  VARIABILITIES  

Page 4: Composing your Compositions of Variability Models (Models 2013 presentation)

4  4  Variability  Modeling  with  Feature  Models  

Page 5: Composing your Compositions of Variability Models (Models 2013 presentation)

5  5  

   

   

       

   

   

   

       

   

   

   

       

   

   

   

       

   

Composing  Large,  Complex  &  Mul2ple  Feature  Models  

Page 6: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  1:  Building  Feature  Models  from  product  descrip2ons  

6  Haslinger,  et.  Al.  On  extrac*ng  feature  models  from  sets  of  valid  feature  combina*ons.  In  FASE’13.  Acher  et.  Al.  On  extrac*ng  feature  models  from  product  descrip*ons.  In:  VaMoS’12  

•  Choosing  a  product  among  a  set  of  products  

user  

Page 7: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  1:  Building  Feature  Models  from  product  descrip2ons  

7  Haslinger,  et.  Al.  On  extrac*ng  feature  models  from  sets  of  valid  feature  combina*ons.  In  FASE’13.  Acher  et.  Al.  On  extrac*ng  feature  models  from  product  descrip*ons.  In:  VaMoS’12  

•  CreaNng  a  new  product  

domain  analyst  

Page 8: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  1:  Building  Feature  Models  from  product  descrip2ons  

8  Haslinger,  et.  Al.  On  extrac*ng  feature  models  from  sets  of  valid  feature  combina*ons.  In  FASE’13.  Acher  et.  Al.  On  extrac*ng  feature  models  from  product  descrip*ons.  In:  VaMoS’12  

•  Switching  to  a  SoQware  Product  Line  approach  from  a  set  of  products  

product  manager  

Page 9: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  1:  Building  Feature  Models  from  product  descrip2ons  

9  Haslinger,  et.  Al.  On  extrac*ng  feature  models  from  sets  of  valid  feature  combina*ons.  In  FASE’13.  Acher  et.  Al.  On  extrac*ng  feature  models  from  product  descrip*ons.  In:  VaMoS’12  

fm1  fm2  

fm8  ……….  

Page 10: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  2:  Managing  complexity  in  large  scale  organiza2ons  

10  10  

   

   

   

   

   

   

   

Integrated  view  

Departments  

Page 11: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  2:  Managing  complexity  in  large  scale  organiza2ons  

11  Reiser,  M.O.,  Weber,  M.:  MulN-­‐level  feature  trees:  A  pragmaNc  approach  to  managing  highly  complex  product  families.  Requir.  Eng.  12(2)  (2007)  

Views  &  references  between  feature  models  

Figure  from  [Reiser2007]  

Page 12: Composing your Compositions of Variability Models (Models 2013 presentation)

When  Feature  Models  have  to  be  composed      

12  

Page 13: Composing your Compositions of Variability Models (Models 2013 presentation)

13  

Solu2on  

•  Iden2fica2on  and  implementa2on  of  4  solu2ons  for  composing  feature  models  

•  A  reading  grid  to  compose  (i.e.  choose)  your  composi2ons  

Page 14: Composing your Compositions of Variability Models (Models 2013 presentation)

Feature  Models  

Hierarchy:  rooted  tree    Variability:    •  mandatory,    •  opNonal,    •  Groups:  exclusive  or  inclusive  features  •  Cross-­‐tree  constraints  

F6

F2

S

F4F1

F5

Optional

Mandatory

Xor-Group

Or-Group

fm1  

Page 15: Composing your Compositions of Variability Models (Models 2013 presentation)

Feature  Models  

15  

F6

F2

S

F4F1

F5

fm1  

set  of  valid  configura2ons  

configura2on    seman2cs  

Page 16: Composing your Compositions of Variability Models (Models 2013 presentation)

Feature  Models  

16  

fm1  

(proposi2onal)  

φ

Reasoning  

F6

F2

S

F4F1

F5

Around  30  reasoning  opera*ons  available  

FM  =        Feature  diagram  +        Proposi2onal  formula  Ψ  [She  et.  Al,  ICSE  2011]  

Page 17: Composing your Compositions of Variability Models (Models 2013 presentation)

Illustra2on:  merging  suppliers  

17  

F6

F2

S

F3F1

F5 F6

F2

S

F4F1

F5<<implies>>F6

F2

S

F4F1

F5

?  

fm1   fm2   fm3  

Inten2on:  union  Matching  :  ?  Merging  :  ?  

configura2on    seman2cs  

Page 18: Composing your Compositions of Variability Models (Models 2013 presentation)

F6

F2

S

F3F1

F5

F4F3 <<implies>> F1

Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6) ^ (F1 v F3 v F4 v ~F5 v ~F6)

Logic  based  solu2on  

18  

F6

F2

S

F3F1

F5 F6

F2

S

F4F1

F5<<implies>>F6

F2

S

F4F1

F5

φ1

φ2

φ3 O’   φ

c =  ………   ………  

Synthesis  

M.  Acher  et.  Al  .  Comparing  Approaches  for  ImplemenNng  Feature  Model  ComposiNon  »  ECMFA’10  

[Andersen  et.  Al.  Efficient  Synthesis  of  Feature  Models  

SPLC’12]  

Matching  by  name  Merging  by  configura2on    

Page 19: Composing your Compositions of Variability Models (Models 2013 presentation)

Reference  based  solu2on  

19  

F6

F2

S

F3F1

F5 F6

F2

S

F4F1

F5<<implies>>F6

F2

S

F4F1

F5

aka  operaNonal  

F6

F2

S

F4F1

F5 F6

F2

S

F3F1

F5 F6

F2

S

F4F1

F5<<implies>>

F6

F2

S

F3F1

F5

F4

R

InputFMs

fm1

FMr union

fm2 fm3

(F1 ⬄ (fm1.F1 v fm2.F1 v fm3.F1)) ^atmost1 (fm1.F1, fm2.F1, fm3.F1) ^ (F6 ⬄ (fm1.F6 v fm2.F6 v fm3.F6)) ^atmost1(fm1.F6, fm2.F6, fm3.F6) ^(F4 ⬄ (fm1.F4 v fm3.F4)) ^atmost1(fm1.F4, fm3.F4) ^(S ⬄ (fm1.S v fm2.S v fm3.S)) ^atmost1(fm1.S, fm2.S, fm3.S) ^(F2 ⬄ (fm1.F2 v fm2.F2 v fm3.F2)) ^atmost1(fm1.F2, fm2.F2, fm3.F2) ^ (F5 ⬄ (fm1.F5 v fm2.F5 v fm3.F5)) ^ atmost1(fm1.F5, fm2.F5, fm3.F5) ^ (F3 ⬄ fm2.F3)

Ѱr union =

Matching  by  name  Merging  by  reference   View  of  interest  

Rela2ons  through  constraints  

Page 20: Composing your Compositions of Variability Models (Models 2013 presentation)

Current  Approaches  

fm1 fm2

φc

o =

fmr

fmc

fm1 fm2o =

fmr

fmc

(reference based)

(with local synthesis) (with slicing)

fm1 fm2

φ1 φ2 φc

fmco

o' =

=

(logic based)

fm1 fm2

φc

o =

fmr

fmc

φc'

20  

RIGID   TOO  OPEN  

Page 21: Composing your Compositions of Variability Models (Models 2013 presentation)

Other  candidates?  

21  

Page 22: Composing your Compositions of Variability Models (Models 2013 presentation)

Building  New  Approaches  

fm1 fm2

φc

o =

fmr

fmc

fm1 fm2o =

fmr

fmc

(reference based)

(with local synthesis) (with slicing)

fm1 fm2

φ1 φ2 φc

fmco

o' =

=

(logic based)

fm1 fm2

φc

o =

fmr

fmc

φc'

22  

Page 23: Composing your Compositions of Variability Models (Models 2013 presentation)

Local  synthesis  solu2on  

23  

F6

F2

S

F4F1

F5 F6

F2

S

F3F1

F5 F6

F2

S

F4F1

F5<<implies>>

F6

F2

S

F3F1

F5

F4

R

InputFMs

fm1

FMr union

fm2 fm3

(F1 ⬄ (fm1.F1 v fm2.F1 v fm3.F1)) ^atmost1 (fm1.F1, fm2.F1, fm3.F1) ^ (F6 ⬄ (fm1.F6 v fm2.F6 v fm3.F6)) ^atmost1(fm1.F6, fm2.F6, fm3.F6) ^(F4 ⬄ (fm1.F4 v fm3.F4)) ^atmost1(fm1.F4, fm3.F4) ^(S ⬄ (fm1.S v fm2.S v fm3.S)) ^atmost1(fm1.S, fm2.S, fm3.S) ^(F2 ⬄ (fm1.F2 v fm2.F2 v fm3.F2)) ^atmost1(fm1.F2, fm2.F2, fm3.F2) ^ (F5 ⬄ (fm1.F5 v fm2.F5 v fm3.F5)) ^ atmost1(fm1.F5, fm2.F5, fm3.F5) ^ (F3 ⬄ fm2.F3)

Ѱr union =

Merging  by  reference  +  local  synthesis  over  {S,  F1  to  F6}  

Over  Approxima2on  (generaliza2on)  with  2  «  new  »configura2ons  

F6

F2

S

F3F1

F5

F4F3 <<implies>> F1

Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6) ^ (F1 v F3 v F4 v ~F5 v ~F6)Larger  Ψ  

Page 24: Composing your Compositions of Variability Models (Models 2013 presentation)

Slicing  solu2on  

24  

F6

F2

S

F4F1

F5 F6

F2

S

F3F1

F5 F6

F2

S

F4F1

F5<<implies>>

F6

F2

S

F3F1

F5

F4

R

InputFMs

fm1

FMr union

fm2 fm3

(F1 ⬄ (fm1.F1 v fm2.F1 v fm3.F1)) ^atmost1 (fm1.F1, fm2.F1, fm3.F1) ^ (F6 ⬄ (fm1.F6 v fm2.F6 v fm3.F6)) ^atmost1(fm1.F6, fm2.F6, fm3.F6) ^(F4 ⬄ (fm1.F4 v fm3.F4)) ^atmost1(fm1.F4, fm3.F4) ^(S ⬄ (fm1.S v fm2.S v fm3.S)) ^atmost1(fm1.S, fm2.S, fm3.S) ^(F2 ⬄ (fm1.F2 v fm2.F2 v fm3.F2)) ^atmost1(fm1.F2, fm2.F2, fm3.F2) ^ (F5 ⬄ (fm1.F5 v fm2.F5 v fm3.F5)) ^ atmost1(fm1.F5, fm2.F5, fm3.F5) ^ (F3 ⬄ fm2.F3)

Ѱr union =

Merging  by  reference  +  slicing  with  {S,  F1  to  F6}  

M.  Acher  et.  Al  .  SeparaNon  of  concerns  in  feature  modeling:  support  and  applicaNons  AOSD’12  

Slice  result  =  projected  set  of  configura2ons  onto  the  criterion  

Same  FM  as  the  denota2onal  version  

F6

F2

S

F3F1

F5

F4F3 <<implies>> F1

Ѱ = (F1 v F3 v ~F4 v ~F5 v ~F6) ^ (F1 v F3 v F4 v ~F5 v ~F6)

Page 25: Composing your Compositions of Variability Models (Models 2013 presentation)

How  to  use  it?  

25  hgp://familiar-­‐project.github.com/  

Page 26: Composing your Compositions of Variability Models (Models 2013 presentation)

How  to  use  it?  

26  

Composition of Feature Models

Predefined

unionintersectionreduced product diff

Other

Implementation- accuracy- reasoning- customizability - composability

Denotational Operational

extract slicing local synthesis

Semantics

Boolean Logics

Hybrid

1..4

1.  Choose  a  seman2cs   2.  Choose  an  implementa2on  

Page 27: Composing your Compositions of Variability Models (Models 2013 presentation)

27  

Page 28: Composing your Compositions of Variability Models (Models 2013 presentation)

Feature  Diagram  Quality  ?  

28  

Denota2onal   Opera2onal   Local  synthesis   Slicing  

Diagram  Quality  

Reasoning  

Customizability  

Traceability  

Composability  

•  Maximality  •  Soundness  •  Completeness  

Page 29: Composing your Compositions of Variability Models (Models 2013 presentation)

Reasoning  over  resul2ng  configura2ons  ?  

29  

Denota2onal   Opera2onal   Local  synthesis   Slicing  

Diagram  Quality  

Reasoning  

Customizability  

Traceability  

Composability  •  Performing  assisted  configuraNon  •  AutomaNng  analysis  over  FMs  

Page 30: Composing your Compositions of Variability Models (Models 2013 presentation)

Customizability?  

30  

Denota2onal   Opera2onal   Local  synthesis   Slicing  

Diagram  Quality  

Reasoning  

Customizability  

Traceability  

Composability    •  Specifying  the  meaning  of  the  composiNon  

Page 31: Composing your Compositions of Variability Models (Models 2013 presentation)

Traceability?  

31  

Denota2onal   Opera2onal   Local  synthesis   Slicing  

Diagram  Quality  

Reasoning  

Customizability  

Traceability  

Composability  

•  Mapping  to  the  input  FMs  

Page 32: Composing your Compositions of Variability Models (Models 2013 presentation)

Composability?  (union  example)  

32  

Denota2onal   Opera2onal   Local  synthesis   Slicing  

Diagram  Quality  

Reasoning  

Customizability  

Traceability  

Composability  

•  AssociaNve,  commutaNve    

Page 33: Composing your Compositions of Variability Models (Models 2013 presentation)

A  reading  Grid  

33  

Denota2onal   Opera2onal   Local  synthesis   Slicing  

Diagram  Quality  

Reasoning  

Customizability  

Traceability  

Composability  

performance  

Page 34: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  1:  Building  Feature  Models  from  product  descrip2ons  

fm1  fm2  

fm8  ……….  

•  Reasoning  •  High-­‐quality  Feature  Diagram  (for  transformaNon)  

denota2onal  

Page 35: Composing your Compositions of Variability Models (Models 2013 presentation)

Scenario  2:  Managing  complexity  in  large  scale  organiza2ons  

35  35  

   

   

   

   

   

   

   

Integrated  view  

Departments  

•  Traceability  •  Complex  Mappings  

opera2onal  

Local  synthesis  Slicing  

Any  view  

Page 36: Composing your Compositions of Variability Models (Models 2013 presentation)

Ongoing  and  Future  Work  

•  User  assistance  in  the  merging  process  –  integraNon  of  ontological  knowledge  

•  Usage  of  composiNons  in  different  contexts  – and  performance  studies  

•  Explore  the  relaNons  from  features  to  assets  – mirorring  composiNon  both  in  the  bindings  and  assets  

Page 37: Composing your Compositions of Variability Models (Models 2013 presentation)

37  

Composing  your  Composi2ons  of  Variability  Models  

hhp://familiar-­‐project.github.com/  

Composition of Feature Models

Predefined

unionintersectionreduced product diff

Other

Implementation- accuracy- reasoning- customizability - composability

Denotational Operational

extract slicing local synthesis

Semantics

Boolean Logics

Hybrid

1..4

Seman2cs  Matching  Merging  

Page 38: Composing your Compositions of Variability Models (Models 2013 presentation)

blatant  adver2sing  

38  

22-­‐24  january  2014  Nice,  France    hgp://vamos2014.unice.fr  

Page 39: Composing your Compositions of Variability Models (Models 2013 presentation)

39  

Composing  your  Composi2ons  of  Variability  Models  

hhp://familiar-­‐project.github.com/  

Composition of Feature Models

Predefined

unionintersectionreduced product diff

Other

Implementation- accuracy- reasoning- customizability - composability

Denotational Operational

extract slicing local synthesis

Semantics

Boolean Logics

Hybrid

1..4?  Seman2cs  

Matching  Merging