Top Banner
Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st , 2005
47

Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

Mar 31, 2015

Download

Documents

Tyrese Eden
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

Managing Variability with Koala

Rob van OmmeringPhilips ResearchIPA Lentedagen 2005,April 1st, 2005

Page 2: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 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

Page 3: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 4: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 5: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 6: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

6© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

Related product families

VCRVCR

AudioAudio

STBSTB

DVDDVD

Page 7: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

+

+

+

+

+

=

=

=

=

=

Page 8: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 9: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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...

Page 10: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 11: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 12: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 13: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

13© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

Koala101

Page 14: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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)

Page 15: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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);}

Page 16: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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);}

Page 17: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 18: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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);}

Page 19: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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!

Page 20: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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!

Page 21: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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 …}

Page 22: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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; …}

Page 23: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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;}

Page 24: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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)

Page 25: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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;}

Page 26: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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.

Page 27: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 28: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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;}

Page 29: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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…!

Page 30: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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.

Page 31: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

31© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

My old digital camera…

Dedicated

Dedicated

“Dedicated”

Page 32: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

32© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

The one I wanted to buy…

Page 33: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

33© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

The one I bought…

All general purpose components!

Page 34: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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!

Page 35: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

+

Page 36: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 37: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 38: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 39: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 40: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

40© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

Page 41: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

41© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

UsingKoala

Page 42: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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!

Page 43: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

43© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

Domain vs application engineering

Architecture

Products

Subsystems

Domain

Application

Page 44: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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…

Page 45: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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

Page 46: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

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 ?

Page 47: Managing Variability with Koala Rob van Ommering Philips Research IPA Lentedagen 2005, April 1 st, 2005.

47© 2005 Philips Research, Rob van Ommering, IPA Lentedagen, Made, April 1st 2005

TheEnd