thesis defense-spg€¦ · title: microsoft powerpoint - thesis_defense-spg author: eric created...
TRANSCRIPT
1
Implementing Software Product Line Adoption
StrategiesCandidate:Vander Alves
Supervisors: Paulo Borba and Geber RamalhoMarch 23, 2007
2
Different devices, 15 to 60 different applications…
With plenty of common
functionality, but also with
variability
64kb, flip 4Mb, flip 100Kb, no flip
3
A
CB'
D
Little reuse and high cost
A
CB
A
CB
D
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
5
Software Product Lines (SPL)
Source: SEI
6
GO SPL!SPL benefits• Higher productivity• Higher quality• Low cost
But higher complexity• Variability management• Adoption strategies
7
SPL challengesVariability managementAdoption strategy
8
Variability management
Highly variant domains• Realm of SPL• Different artifacts• Often crosscutting implementation• high instantiation cost
9
Mobile games domainScreen SizesKeyboard Specific APIs
MemoryProcessing PowerNumber of colors
Porting Porting
10
Massive variability
11
Aspect-Oriented Programming
Extension to OOModularizing crosscutting concerns• Tangling• ScatteringLanguage and tool supportDifferent levels of abstraction (AOSD, Early Aspects,…)
12
Adoption StrategiesProactiveExtractiveReactive
13
Source: Krueger, PFE’01
Proactive Adoption Strategy
14
Source: Krueger, PFE’01
Reactive Adoption Strategy
15
Source: Krueger, PFE’01
Extractive Adoption Strategy
16
ProblemReactive and Extractive very relevantLack of guidelines• Implementation• Feature modelEssential requirements• Concrete guidelines• Safety
17
Key ideaMethod to create and evolve product lines• Combine adoption strategies • Refactorings to guide the process
Concrete guidelinesSafety
18
IdentifyVariability
ExtractSPL
ReactSPL
MigrateSPL
RefactorFeature Model
UpdateConfiguration Knowledge
Our Method
19
IdentifyVariability
ExtractSPL
ReactSPL
MigrateSPL
RefactorFeature Model
UpdateConfiguration Knowledge
Our Method
20
Extract SPL
21
IdentifyVariability
ExtractSPL
ReactSPL
MigrateSPL
RefactorFeature Model
UpdateConfiguration Knowledge
Our Method
22
React SPL
23
Further React SPL
24
IdentifyVariability
ExtractSPL
ReactSPL
MigrateSPL
RefactorFeature Model
UpdateConfiguration Knowledge
Our Method
25
Migrate SPL
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
27
Example - extractive refactoring
Load images variation• Images are loaded on demand• Images loaded only once
28
Extractive RefactoringLoad images variation point
29
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‘; …
31
Refactorings
32
IdentifyVariability
ExtractSPL
ReactSPL
MigrateSPL
RefactorFeature Model
UpdateConfiguration Knowledge
Our Method
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
34
But PL refactoring should go beyond code…
coreA +Startup +Clouds
coreA
Startup
Clouds
Startup Clouds Startup Clouds
Game GameRain of fire
35
Startup
Clouds
coreB
coreBStartup
Clouds
coreB
OnDemand Hybrid
OnDemand Hybrid
and deal with populations and families too!
36
Feature model refactorings as improved configurability
A
B C
A
B C⊑
{A,B} ⊆ {A,B}
{A,C} {A,C}
… {A,B,C}…
37
Refactoring catalog
A
B
forms
C
A
BfsB
forms
CfsC
⊑
A
B
forms
⊑A
B
forms
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
39
Case StudiesEvaluate method in industrial-strength domainConsider analytical and quantitative dataIdentify enhancements to method
40
Rain of FireExtractive/Reactive5KLOC
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
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
43
Best Lap15 KLOC16 families, 65 devicesMigrate stepVariability identification by locating tags with toolMigration strategies• Arena feature• Mostly static variability
44
Configuration knowledgeVaried granularityNon-compositional piecesReflect feature dependency• Arena feature
45
Aspect reusability in Best Lap
46
AnalysisMinor increase on SPL LOC• Aspect declarationsBut improved modularity• Reusability• Locality • Adaptability • Pluggability• Independent development14 % increase on Jar size
47
ConclusionsRelevance of extractive and reactive adoption strategiesOrthogonal relevance of variability managementsMotivation in highly variant domain
48
ConclusionsMethod for SPL extraction and reactionRefactorings for variability management• Guidelines and safety• Novel notion for SPLsValidation in case studiesDomain independent method
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
50
Future workTraceability with tests and architectureVariability in other artefactsMore case studiesCase studies in other domains
51
Future workDefinition of metric suite for SPLExtend tool supportHandle additional variability• Import variation• Super class constructor call• Adding an else-if Block
52
Implementing Software Product Line Adoption
StrategiesCandidate:Vander Alves
Supervisors: Paulo Borba and Geber RamalhoMarch 23, 2007
53
Backup slides
54
Tool SupportSpecially critical for PLsPrototypeAspectJEclipse (JDT & AJDT)
55
Extract Before Block
56
Extract Before Block
57
Extract Before Block
58
Extract Before Block
59