on the notion of variability in software product lines

31
SEGROUP On the notion of Variability in Software Product Lines Jilles van Gurp Jan Bosch Mikael Svahnberg

Upload: kesia

Post on 20-Feb-2016

20 views

Category:

Documents


0 download

DESCRIPTION

On the notion of Variability in Software Product Lines. Jilles van Gurp Jan Bosch Mikael Svahnberg. SEGROUP, University of Groningen. Frameworks. http://segroup.cs.rug.nl/ Founded August 2000 Before that we were known as RISE, University of Karlskrona/Ronneby, Sweden - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: On the notion of Variability in Software Product Lines

SEGROUP

On the notion of Variability in Software Product Lines

Jilles van GurpJan Bosch

Mikael Svahnberg

Page 2: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 2

SEGROUP

SEGROUP, University of Groningen

http://segroup.cs.rug.nl/Founded August 2000Before that we were known as RISE, University of

Karlskrona/Ronneby, SwedenThird author is still in Sweden

SPLs

SOC

Software Architecture

Frameworks

Page 3: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 3

SEGROUP Contents

What and whyVariation pointsFeaturesManaging VariabilityConcluding remarks

Page 4: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 4

SEGROUP

Possible systems

Running code

Linked code

Compiled code

Source code

Design Documentation

Architecture Description

Requirement Specification

User expectations, technologies

1

8 Possible systems8

1

Development = constraining variability

Page 5: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 5

SEGROUP So, what is variability?

Variability is a delayed design decisionRather than specifying now, you allow for choice

laterVariability is relevant throughout the development

process, including run-time

Page 6: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 6

SEGROUP

Reuse = using an existing piece of software in a different context

Reuse requires that the reused software adapts to the new context

Software without variability is not reusableOpportunistic reuse does not work, the software

needs to be prepared for reuseSo, reuse requires variability

Why do we need variability?

Page 7: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 7

SEGROUP

More variability in software

More supported contexts

More reusable software!

Variability is needed for reuse

SPLs are all about reusing software assets

Page 8: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 8

SEGROUP

How much variability do we need?

Just enough, not more, not less

Variation points increase complexity– So, too much variability

increases the cost of software

Variation is needed to meet future requirements– So, too little variability

makes meeting those requirements expensive

cost

changes

lots of variation

no variation

That’s what we want in a SPL

Page 9: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 9

SEGROUP Variation point

A concrete point in one of the representations of the software where variants of an entity can be

inserted.

#define

idl interface

abstract class property

.o fileif statement

Page 10: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 10

SEGROUP Variation point stages

ImplicitSelect Variant

BoundIntroduce variation

point & variants

Designed

i.e. create an abstract description of the variants and specify the variants (can be done later)

Page 11: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 11

SEGROUP Example

During requirement specification the need is identified to draw multiple graphical widgets on the screen

Implicit

During the design an abstact widget class is introduced and several subclasses

Designed

During implementation a widget subclass (e.g. a button) is instantiated and used.

Bound

Page 12: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 12

SEGROUP

Adding variants to a variation point

Open/closed variation pointsVariants can be added in specific representations

only.

– E.g. you can’t add subclasses in the requirements specification. Nor can you do so in an executing program (unless you have dynamic linking).

But you can add subclasses in the source code

Page 13: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 13

SEGROUP

Variability Realization Techniques

Technique Binding-time Example Variation point

Inheritance Implementation GUI Components Abstract class

Plugins Link-time / Run-time (language dep.)

Winamp visualization plugin

Interface

Parameters Application startup Xterm parameters A variable

#define Compilation Support for different platforms

Preprocessor directive

Page 14: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 14

SEGROUP

When is the best time to introduce variability?

Before you have invested in assets that need to be redesigned if you introduce variation

I.e. before you design the system

Page 15: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 15

SEGROUP Feature

A logical unit of behavior that is specified by a set of functional and quality requirements [bosch]

Unit of incrementation as systems evolve [gibson]

Page 16: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 16

SEGROUP Features and Variability

Feature = unit of changeVariation = allowing for changeVariation can be described in terms of featuresFeatures are typically specified earlyVariation points need to be identified early

Page 17: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 17

SEGROUP Managing Variability

Find the variation points earlyConstrain the variation pointsSelect the appropriate technique for implementingManage the variants

Page 18: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 18

SEGROUP Feature Diagrams

Can be used to model features and the relations between them

Can be used to trace featuresCan be used to model variability

Page 19: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 19

SEGROUP Example Feature Diagram

Mail Client

Type Message Send MessageReceive Message

Pop3 IMAP

Internal Editor

EditSignature file

runtime

runtime

VI Emacs

TCP Connection

anExternalFeature

aFeature

or specialization

xor specialization

composition

optional feature

runtime

Runtime platform

Linuxwin32

compiletime

Page 20: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 20

SEGROUP

Variation point = specializationThree types:

– 0 or 1 variant = optional variant– E.g. printing debug information

– 1 out of n variants = single variant (xor)– E.g. a background picture on your desktop

– m out of n variants = multiple parallel variants (or)– E.g. retrieving email from a POP3 account and an IMAP account

simultaneously

Patterns of Variability

Page 21: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 21

SEGROUP Example 1, single variant

Mozilla

Theme

Classic Modern User provided

run-time

•Designed during AD

•Bound at run-time

•Open at run-time

Page 22: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 22

SEGROUP Example 2, optional variant

Mozilla

PSM

•Introduced during AD

•Bound at link time

•Open at link time (= run-time)

Page 23: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 23

SEGROUP

Example 3, multiple parallel variants

Mozilla

Necko

http ftp file gopher finger

•Introduced during AD

•Bound at run-time

•Open during DD

Page 24: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 24

SEGROUP

Example 4, optional single variant

Java Support

IBM JavaBlackdown JavaSUN JRE

Link-time

Mozilla •Introduced during AD

•Open at run-time

•Bound at run-time

Page 25: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 25

SEGROUP Trends in variability

Variation points are increasingly open and bound at run-time

• E.g. MS media player can download and use new codecs without even restarting the application

Going from static to dynamic linking has been a major push in doing so

• E.g. DLLs can be upgraded separately from the apps that use it• E.g. jar files can be downloaded on demand and used right

away

Page 26: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 26

SEGROUP Why run-time variability?

Going through the edit/compile/debug/deploy cycle is expensive

It is convenient for end usersBecause we can!

Page 27: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 27

SEGROUP Variation management process

Make Feature Diagram

For each variation point:

•Abstraction level

•Assess binding time

•When it’s open

Select Realization Technique + variant management technique (e.g. manual or automatic)

Add variants

Bind

Page 28: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 28

SEGROUP Related Work

Recent work– Bachmann & Bass– Clauss (improved UML notation)– Upcoming feature modeling workshop at GCSE

Page 29: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 29

SEGROUP Our Contributions

Terminology• Makes discussions about variability to the point

Patterns of variabilityExtensions to the feature diagram notation

• Enables communicating variability

Methodology for managing variability

Page 30: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 30

SEGROUP Future work

Integrate with UML (people are already working on this)• Trace variation points in e.g. use case diagrams or collaboration

diagrams or even source code• Tool support

Further develop methodology and best practices• Our method can be used as a starting point

Taxonomy of variability realization techniques• Mikael Svahnberg

Validation. E.g. case studies.• One of my colleagues is working on this

Late variability techniques• E.g. Separation of Concerns, AOP, SOP, MDSOC

Page 31: On the notion of Variability in Software Product Lines

22/04/23 http://segroup.cs.rug.nl 31

SEGROUP Contact information

[email protected]

[email protected]

[email protected]

•Contact info•More publications•Personal homepages•Mailing list