managing variability with koala
Post on 12-Jan-2016
38 Views
Preview:
DESCRIPTION
TRANSCRIPT
Managing Variability with Koala
Rob van OmmeringPhilips ResearchIPA Lentedagen 2005,April 1st, 2005
2© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Introducing my domain…
2000 1990
1979
2 MB 64 kB
1 kBMoore’s Law
1965
3© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
(1) Complexity
Code Size Evolution of High End TV Software
2
4
8
16
32
64
256
512
1024
2048
12000
30004096
32000
100000
64000
1
10
100
1000
10000
100000
1978 1980 1982 1984 1986 1988 1990 1992 1994 1996 1998 2000 2002 2004 2006 2008 2009
Year of Market Introduction
Kby
tes
4© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Image
Sound
100 Hz
100 Hz
quality
quality
Dolby
Dolby
AC3AC3
DataProcessing
UserInterface
Txt
Txt
EPGEPGmenusmenus
animationanimation
3D3D
Connectivity
P50P50
1394
1394
StorageDevice
TiVoTiVo
VCR
VCR
DVDDVD
TVCRTVCR
HDHD
BroadcastingStandard
DTVDTV
RegionEuEuUSUS
APAP
Video Output Device
PTVPTV
FTVFTVLCTVLCTV
Price
UTVUTV
MTVMTV
(2) Diversity
5© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
(3) Lead Time
Was:• Yearly cycle of product introduction
– Christmas– World championship
Is:• Decreasing to 6 or 3 months
– Otherwise loose shelf space in shop
6© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Related product families
VCRVCR
AudioAudio
STBSTB
DVDDVD
7© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Convergence
TVTV
TVTV
TVTV
TVTV
TVTV
VCRVCR
DVDDVD
HDHD
AudioAudio
STBSTB
TVCRTVCR
TV-DVDTV-DVD
TivoTivo
Home TheaterHome Theater
Digital TVDigital TV
+
+
+
+
+
=
=
=
=
=
8© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Recent examples of convergence…
GPS + GSM
GSM + DigCamPDA + GPS
CD-RW, DVD, Card, TV PDA + GSM + DigCam
9© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Summary…
Software GrowsExponentially(Moore’s Law)
Software GrowsExponentially(Moore’s Law)
Market demands...Market demands... Shorter lead time…More product variation...Shorter lead time…More product variation...
Need more people...Need more time...Need more people...Need more time...
10© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
ProductProductFamily
ProductPopulation
ApplicationDomain Everything
A specific TV TV, FTV, PTV TV, VCR, DVD, ... All CE Products World
Decomposition paradigm Decomposition paradigm Composition paradigm Composition paradigm
Separate product information from component informationSeparate product information from component information
11© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
A product population is:
- a set of products with many commonalities, - but also with many differences, - developed by different sub organizations, - each with its own time-line / lifecycle.
- a set of products with many commonalities, - but also with many differences, - developed by different sub organizations, - each with its own time-line / lifecycle.
SingleProductSingle
ProductProductFamily
ProductFamily
ProductPopulation
ProductPopulation
UnrelatedProductsUnrelatedProducts
DecompositionDedicated components
CompositionCOTS
12© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Koala is…
CC
C2
C1
C3
- a component model - with an ADL - to build populations of - resource constrained products
13© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Koala101
14© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Component
CTunerCTuner
component CTuner{ …}
A Koala component is: - a unit of design/implementation - a unit of reuse
Compare a Koala component to: - a Java or .Net class - a COM coclass
A component is described in CDL (Component Definition Language)
15© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Provides Interface
pCTuner
pCTuner
component CTuner{ provides ITuner p;}
A Koala interface is: - a unit of specification - a unit of binding
Compare a Koala interface to: - a Java or .Net interface - a COM interface
An interface is described in IDL (Interface Definition Language)
interface ITuner{ void Tune(int freq);}
16© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Provides Interfaces
i pCTuner
i pCTuner
component CTuner{ provides IInit i; ITuner p;}
A component may (and usually will) provide more than one interface.
An interface is a small set of functions that are semantically related.
interface ITuner{ void Tune(int freq);}
interface IInit{ void Init(void);}
17© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Commonality and Variation
CTunerCTuner
ITun
er
IIn
it
CSearchTunerCSearchTuner
ITun
er
IIn
it
ISea
rchT
uner
CVideoCVideo
IVid
eo
IIn
it
Commonality Variation
Components in the repository
18© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Requires Interfaces
i pCTunerr m
i pCTunerr m
component CTuner{ provides IInit i; ITuner p; requires IRtk r; IMem m;}
Components access functions in their environment through explicit requires interfaces
interface ITuner{ void Tune(int freq);}
interface IInit{ void Init(void);}
interface IRtk{ Sem CreateSem();}
interface IMem{ void *malloc(int size);}
19© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
A Product
CTunerCTuner
CRtkCRtk CMemCMem
CAppCApp
component CProduct{ contains component CApp app; component CTuner tun; component CRtk rtk; component CMem mem; connects app.i = tun.i; app.p = tun.p; tun.r = rtk.r ; tun.m = rtk.m;}
CProductAlso a
component!
20© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Another Product
CTunerCTuner
CRtk2CRtk2 CMem2CMem2
CApp2CApp2
CProduct2
Same!
Different!
Requires interfaces are variation points!
21© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Compound Component
CTunerCTuner
CMemCMem
CPlatform
The component model is recursive
component CPlatform{ provides … requires … contains … connects …}
22© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Glue Module
COsCOs
CTunerCTunerSometimes interfaces are not connected 1:1
Examples:- interface mismatch- tracing / logging- special strategies
We can then insert a glue module
component CXxx{ contains component CTuner tun; component COs os; module m; connects tun.m = m; m = os.m; …}
23© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Code Module
We also use modules to implement a component
There is no distinction between code and glue modules!
component C{ provides I1 p1; I2 p2; I3 p3; requires Ia ra; Ib rb; Ic rc; contains module m1, m2; connects p1 = m1; p2 = m1; p3 = m2; m1 = ra; m1 = rb; m2 = rb; m2 = rc;}
24© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Implementing a Module
component CProduct{ …. connects within m1 { p1.f(x) = ra.g(2*x); … }}
Interface functions can be implemented in CDL…
…or in the underlying implementation language (following the language binding conventions)
25© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Diversity Interface
CC
interface IDiv{ bool Fast; int Color;}
Component can be parameterized…
…to postpone certain decisions to product time
component C{ requires IDiv div;}
26© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Switch
C1C1
C2C2 C3C3
component C{ provides … requires … contains … connects switch div.Fast in { c1.r } out { c2.p } on false, { c3.p } on true;}
Also the binding decision can be postponed.
A switch can be statically evaluated or converted into run-time code.
27© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Diversity Spreadsheet
C1C1
C2C2 C2C2
Parameters of subcomponents can be partially filled in…
… and partially diverted to parameters of the compound component
28© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Optional Interface
C C
Parameters of subcomponents can be partially filled in…
… and partially diverted to parameters of the compound component
component C{ provides … requires IX r optional;}
29© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Sub-typing and evolution
C C’
IB+ IB
Provide more...
IA IB IA IB+ IC
C’ C
Koala subtypes interfacesbased on set inclusion offunctions
C C’
IB- IB
Require less…???
IA IB-IA IB IC
C’ C
Koala reports an error if anon-existing interface isbound…!
30© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Reflection
C1 C1
A component can observe whether interfaces are actually connected.
This allows components to adapt themselves to their environment automatically.
31© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
My old digital camera…
Dedicated
Dedicated
“Dedicated”
32© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
The one I wanted to buy…
33© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
The one I bought…
All general purpose components!
34© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
One snag though…
Can do 110 Volts and 220 Volts
But be careful!
35© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Self-configuring components
Components specify howmany resources they require
This can be summed and provided tothe component that delivers theresources at the product level
C1C1C3C3
C1C1
+
36© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Multi threading
C1C1
Step 1: use message pumps created on virtual pump engines required through a diversity interface
Step 2: bind these to pump engines (a real dispatcher loop)
Problem: many (>100) activities but few (<10) threads
C2C2
C3C3
CF
ireB
rigad
eC
Fire
Brig
ade
Same thread,No synchronisation required
Different thread,Synchronisation
required
37© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Threading Analysis
a
a
b
b
b
c
*
*
Attribute interfaces witha symbolic thread label
38© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Threading calculus
a
a
a
a
a
b
c
d
*
*
*
*
*
a
*
a
a
*
a
*
X
X
X
X
X
O
39© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Unification
p
a
a
p
p
b
b
p
q
b
c
q
Thread labelsare unified
Prepared forcall on differentthreads, but calledon the same thread
q must besame as p
C is a new thread,and cannot beequal to q
40© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
41© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
UsingKoala
42© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Our approach…
Under a common architecture...Under a common architecture...
… a set of subsystemsis developed...… a set of subsystemsis developed...
…with which productscan be built...…with which productscan be built...
… executed in projects!… executed in projects!
43© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Domain vs application engineering
Architecture
Products
Subsystems
Domain
Application
44© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Bangalore
Singapore
EindhovenBrugge
Wien
Knoxville
Sunnyvale
BriarcliffHamburg
Southampton
Yawnoc’s Law
Sou
rce:
Dav
id W
eissThe structure of the organization should mirror the
architecture of the software.
Surprisingly(?), the development managers agree, but the architects protest…
45© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
In-house versus 3rd party
02468
101214161820
2003 2004 2005 2006
In-house
Supplier
ISV
Source-code
in MBytes
46© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
Leveraging & Architecture
OS
OS
ApplicationsApplications
A/V platformA/V platform
OS
OS
ApplicationsApplications
A/V platformA/V platform
MiddlewareMiddleware
ApplicationsApplications
DriversDrivers
Middleware ?
47© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005
TheEnd
top related