thesis defense-spg€¦ · title: microsoft powerpoint - thesis_defense-spg author: eric created...

59
1 Implementing Software Product Line Adoption Strategies Candidate:Vander Alves Supervisors: Paulo Borba and Geber Ramalho March 23, 2007

Upload: others

Post on 25-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

1

Implementing Software Product Line Adoption

StrategiesCandidate:Vander Alves

Supervisors: Paulo Borba and Geber RamalhoMarch 23, 2007

Page 2: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

2

Different devices, 15 to 60 different applications…

With plenty of common

functionality, but also with

variability

64kb, flip 4Mb, flip 100Kb, no flip

Page 3: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

3

A

CB'

D

Little reuse and high cost

A

CB

A

CB

D

Page 4: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

4

Goal: automate product line

A

CB'

DA

CB

A

CB

D

A

B

C

D B'

DStrategic reuse of common artifacts and handling of

variability

Page 5: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

5

Software Product Lines (SPL)

Source: SEI

Page 6: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

6

GO SPL!SPL benefits• Higher productivity• Higher quality• Low cost

But higher complexity• Variability management• Adoption strategies

Page 7: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

7

SPL challengesVariability managementAdoption strategy

Page 8: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

8

Variability management

Highly variant domains• Realm of SPL• Different artifacts• Often crosscutting implementation• high instantiation cost

Page 9: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

9

Mobile games domainScreen SizesKeyboard Specific APIs

MemoryProcessing PowerNumber of colors

Porting Porting

Page 10: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

10

Massive variability

Page 11: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

11

Aspect-Oriented Programming

Extension to OOModularizing crosscutting concerns• Tangling• ScatteringLanguage and tool supportDifferent levels of abstraction (AOSD, Early Aspects,…)

Page 12: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

12

Adoption StrategiesProactiveExtractiveReactive

Page 13: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

13

Source: Krueger, PFE’01

Proactive Adoption Strategy

Page 14: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

14

Source: Krueger, PFE’01

Reactive Adoption Strategy

Page 15: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

15

Source: Krueger, PFE’01

Extractive Adoption Strategy

Page 16: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

16

ProblemReactive and Extractive very relevantLack of guidelines• Implementation• Feature modelEssential requirements• Concrete guidelines• Safety

Page 17: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

17

Key ideaMethod to create and evolve product lines• Combine adoption strategies • Refactorings to guide the process

Concrete guidelinesSafety

Page 18: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

18

IdentifyVariability

ExtractSPL

ReactSPL

MigrateSPL

RefactorFeature Model

UpdateConfiguration Knowledge

Our Method

Page 19: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

19

IdentifyVariability

ExtractSPL

ReactSPL

MigrateSPL

RefactorFeature Model

UpdateConfiguration Knowledge

Our Method

Page 20: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

20

Extract SPL

Page 21: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

21

IdentifyVariability

ExtractSPL

ReactSPL

MigrateSPL

RefactorFeature Model

UpdateConfiguration Knowledge

Our Method

Page 22: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

22

React SPL

Page 23: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

23

Further React SPL

Page 24: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

24

IdentifyVariability

ExtractSPL

ReactSPL

MigrateSPL

RefactorFeature Model

UpdateConfiguration Knowledge

Our Method

Page 25: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

25

Migrate SPL

Page 26: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

26

Method propertiesExtractive + reactive approachesAOP-based variation management• isolate crosscutting variations from the

core• reuse opportunityRefactorings to guide the process• Concrete and declarative guidelines • Safety• Derived from elementary AOP laws

Page 27: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

27

Example - extractive refactoring

Load images variation• Images are loaded on demand• Images loaded only once

Page 28: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

28

Extractive RefactoringLoad images variation point

Page 29: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

29

Page 30: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

30

Extractive Refactoring example

tsclass C {

fsmsT' m(ps) {

body'body

}}

tsclass C {

fsmsT' m(ps) {

body}

}privileged aspect A {before (context):

execution (σ(C.m)) && bind (context) {

body' [cthis/this]}

}

•body does not use local variables declared in body‘;•there is no designator within or withincode capturing join points inside body‘; …

Page 31: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

31

Refactorings

Page 32: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

32

IdentifyVariability

ExtractSPL

ReactSPL

MigrateSPL

RefactorFeature Model

UpdateConfiguration Knowledge

Our Method

Page 33: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

33

Product line derivation and evolution benefit from refactoring

Core

Startup

Core’

OnDemand Hybrid OnDemand Hybrid

Product 1

Product 2

Guidelines and safety

Extractive Reactive

Page 34: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

34

But PL refactoring should go beyond code…

coreA +Startup +Clouds

coreA

Startup

Clouds

Startup Clouds Startup Clouds

Game GameRain of fire

Page 35: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

35

Startup

Clouds

coreB

coreBStartup

Clouds

coreB

OnDemand Hybrid

OnDemand Hybrid

and deal with populations and families too!

Page 36: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

36

Feature model refactorings as improved configurability

A

B C

A

B C⊑

{A,B} ⊆ {A,B}

{A,C} {A,C}

… {A,B,C}…

Page 37: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

37

Refactoring catalog

A

B

forms

C

A

BfsB

forms

CfsC

A

B

forms

⊑A

B

forms

Page 38: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

38

Refactoring populations and families: feature models

A

B C

A

B C⊑

A

B

FM1 FM2 FM3

fm1 fm2 ⊑ fm =fm1 ⊑ fm ∧ fm2 ⊑ fm

Page 39: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

39

Case StudiesEvaluate method in industrial-strength domainConsider analytical and quantitative dataIdentify enhancements to method

Page 40: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

40

Rain of FireExtractive/Reactive5KLOC

Page 41: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

41

Rain of Fire

Variability identification with concern graphsPlatform variation fully isolated• Load images on demand• flip feature reusedRefactoring set was useful guideCoarse-grained configuration knowledge

Page 42: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

42

0

1000

2000

3000

4000

5000

6000

7000

8000

9000

10000

P1 P2 P3 Total

Line

s of

Cod

e

Original Implementation

SPL Implementation

Core Assets

Classes

Aspects

Page 43: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

43

Best Lap15 KLOC16 families, 65 devicesMigrate stepVariability identification by locating tags with toolMigration strategies• Arena feature• Mostly static variability

Page 44: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

44

Configuration knowledgeVaried granularityNon-compositional piecesReflect feature dependency• Arena feature

Page 45: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

45

Aspect reusability in Best Lap

Page 46: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

46

AnalysisMinor increase on SPL LOC• Aspect declarationsBut improved modularity• Reusability• Locality • Adaptability • Pluggability• Independent development14 % increase on Jar size

Page 47: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

47

ConclusionsRelevance of extractive and reactive adoption strategiesOrthogonal relevance of variability managementsMotivation in highly variant domain

Page 48: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

48

ConclusionsMethod for SPL extraction and reactionRefactorings for variability management• Guidelines and safety• Novel notion for SPLsValidation in case studiesDomain independent method

Page 49: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

49

Assumptions and limitationsAOP does not handle all variability• But most variabilities and comparative

analysisPointcut languages still too syntactic• But tool support alleviates thisInefficient AOP implementations• But optimizers may mitigate this

Page 50: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

50

Future workTraceability with tests and architectureVariability in other artefactsMore case studiesCase studies in other domains

Page 51: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

51

Future workDefinition of metric suite for SPLExtend tool supportHandle additional variability• Import variation• Super class constructor call• Adding an else-if Block

Page 52: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

52

Implementing Software Product Line Adoption

StrategiesCandidate:Vander Alves

Supervisors: Paulo Borba and Geber RamalhoMarch 23, 2007

Page 53: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

53

Backup slides

Page 54: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

54

Tool SupportSpecially critical for PLsPrototypeAspectJEclipse (JDT & AJDT)

Page 55: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

55

Extract Before Block

Page 56: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

56

Extract Before Block

Page 57: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

57

Extract Before Block

Page 58: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

58

Extract Before Block

Page 59: Thesis Defense-spg€¦ · Title: Microsoft PowerPoint - Thesis_Defense-spg Author: eric Created Date: 11/7/2007 2:25:17 PM

59