Vorlesung Software Engineering

35
Software Engineering Research Group: Processes and Measurement Fachbereich Informatik TU Kaiserslautern Last update: 10/01/2012 Grundlagen des Software Engineering Fundamentals of Software Engineering Winter Term 2011/12 Prof. Dr. Dr. h. c. Dieter Rombach Chapter 5.4: Software System Engineering - Software Product Line Architecture

Transcript of Vorlesung Software Engineering

Software Engineering Research Group: Processes and Measurement

Fachbereich Informatik

TU Kaiserslautern

Last update: 10/01/2012

Grundlagen des Software Engineering Fundamentals of Software Engineering

Winter Term 2011/12

Prof. Dr. Dr. h. c. Dieter Rombach

Chapter 5.4: Software System Engineering -

Software Product Line Architecture

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 1

SW Product Line

Architecture Goals

The goals of this chapter are to be able to:

– Define product line engineering

– Understand the concept of commonalities and variabilities

– Understand SPL architectural concepts

– Understand variation modeling

– Characterize Kobra development approach

Literature

– C. Atkinson, J. Bayer, C. Bunse, O. Laitenberger, R. Laqua, E. Kamsties, D. Muthig, B.

Paech, J. Wüst, and J. Zettel. Component-based Product Line Engineering with

UML, Component Series, Addison-Wesley, 2001

– I. John and M. Eisenbarth, "A decade of scoping: a survey," in Proceedings of the 13th

International Software Product Line Conference, ser. SPLC '09. Pittsburgh, PA,

USA: Carnegie Mellon University, 2009, pp. 31-40.

– J. Lee and D. Muthig, "Feature-oriented variability management in product line

engineering," Commun. ACM, vol. 49, no. 12, pp. 55-59, Dec. 2006.

– D. Muthig and C. Atkinson, "Model-Driven product line architectures," in Software

Product Lines, ser. Lecture Notes in Computer Science, G. Chastek, Ed. Berlin,

Heidelberg: Springer Berlin / Heidelberg, Jul. 2002, vol. 2379, ch. 8, pp. 79-90.

– K. Pohl, G. Böckle, and F. J. Linden, Software Product Line Engineering: Foundations,

Principles and Techniques. Secaucus, NJ, USA: Springer-Verlag New York, Inc.,

2005.

– D. Weiss and C. Lai. Software Product Line Engineering - A Family-Based Software

Development Process, Addison-Wesley, 1999

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 2

SW Product Line

Architecture Motivation: Typical Challenges

For System-Developing Organizations

– Series of development projects (leverage on commonalities, reuse)

– „Increasing complexity of systems (avoid complexity explosion)

– Need for reducing cost, effort, and time-to-market (can be reduced via reuse)

– „Increasing request for quality solutions (certification hard w/o reuse)

– „Increasing demand for customized products (easy adaptation if anticipated)

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 3

SW Product Line

Architecture Variability in Time vs. Variability in Space [bachmann+05]

Variability

– the ability of a core asset to adapt to usages in the different product contexts that are

within the product line scope

Variability in Time (releases, dominant in IS)

– the existence of different versions of an artifact that are valid at different times

Variability in Space (variants, dominant in ES)

– the existence of an artifact in different shapes at the same time

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 4

SW Product Line

Architecture What is "Software Product Line Engineering" (SPLE)?

Software Product Line Engineering

– a paradigm to develop software applications using platforms and mass customization.

[Pohl+05]

Family/Domain Engineering (creating reusable artifacts)

– the process of software product line engineering in which the commonality and the

variability of the product line are defined and realized. [Pohl+05]

Application Engineering (creating customer applications from reusable artifacts)

– the process of software product line engineering in which the applications of the

product line are built by reusing domain artifacts and exploiting the product line

variability. [Pohl+05]

= +

SPLE

P2

Family Engineering

P2

Application Engineering

P2 P1 P3

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 5

SW Product Line

Architecture Life Cycle of a Software Product Line

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 6

SW Product Line

Architecture

Product Line Infrastructure

Domain

Product Line

Life Cycle

Domain

Family Engineering

Product

Line

Artifact Base

Fe

ed

ba

ck

Documentation

Identification

Classification Evolution

Coordination

Evaluation

Integration

Adaptation

Application Engineering

Product Product

Requirements

Requirements C

Requirements B

Product

Requirements A

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 7

SW Product Line

Architecture Scoping

Product Line Scoping is the process of identifying and bounding capabilities

(products, features) and areas (subdomains, existing assets) of the product line

where investment into reuse is economically useful and beneficial to product

development. [John+09]

[John+09]

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 8

SW Product Line

Architecture Scoping Example

Product Feature Matrix

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 10

SW Product Line

Architecture Goals of Software Product Line Engineering

Reduction in the time to market required for individual products

„Reduction in required development effort per application (product)

Reduction in overall development effort per product line

Increase in quality

etc. [Weiss+ 99]

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 11

SW Product Line

Architecture Product Line Economics – Development Effort

# Delivered System

1 2 3 4 5 6

Effort

Single

System

Investment

PL

Instance

Single System

Development

Product Line

Approach

Rule of thumb:

Savings begin

between 2nd

and 3rd product. Rule of thumb:

Investment

ranges

between

development

efforts for 1

and 2 systems.

[Weiss/Lai], [Fraunhofer PuLSE™],

etc.

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 12

SW Product Line

Architecture

# Delivered Products

1 2 3 4 5 6

Single-system

Development

(independent)

PL Engineering

(proactive)

PL Engineering

(reactive)

Single-system

Development

(clone-and-own)

Successful

Product Lines

Product Line Strategy – Product Line Economics (Revisited)

Effort

(~ TTM-1

~Cost)

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 13

SW Product Line

Architecture SW Architecture

Architecture is the first artifact that translates the problem into in the solution space

„Provides an overview on the system

„Enables early discussion and assessment of design alternatives

„Architecture is the output of the software design process

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 14

SW Product Line

Architecture PL System Architecture as a Mediator

Specification & decomposition of a whole family of systems

– covering the most important common design decisions

– supporting SW variations for system customization

Constraints & guidance of PL Implementation

– allowing parallelization of work in family and application engineering

– ensuring that the quality attributes can be achieved in all members of the PL

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 15

SW Product Line

Architecture What offers a product line architecture?

Enables making considerations about variability early on

„Product Line Architecture enables encapsulating the variability

[Mann+ 09]

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 16

SW Product Line

Architecture Architectural Drivers

Business goals

– Customer organization

– Developing organization

„Quality attributes

– System in use

– System under development

„Key functional requirements

– Unique properties

– Make system viable

„Constraints

– Organizational and technical

– Cost and time

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 17

SW Product Line

Architecture Architecture Usage Scenarios

and who are the stakeholders?

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 18

SW Product Line

Architecture Architecture stakeholders

General Architecture

stakeholders

Additional Architecture

stakeholders in a PL

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 19

SW Product Line

Architecture Fraunhofer Architecture Process

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 20

SW Product Line

Architecture Planning

Incremental definition of an architecture

– „ Align with project plan

System increments

Availability of necessary non-software components or artifacts

– First iteration typically addresses complete systems at a high level of abstraction

(conceptual view)

Scope of Iterations

– Document all required decisions (revisit if backtracking is necessary)

– Constrain decisions as little as possible (but as much as necessary)

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 21

SW Product Line

Architecture Realization

Refining quality requirements

– „Define main qualities

– „Identify categories of requirements

– „Identify and apply architectural scenarios

Identifying subsystems, components, and connectors

– „Check consistency, conformity, and completeness with respect to quality

requirements

– „Handling of constraints and alternatives

„Analyzing and mitigating risks

– „Prototyping

– „Reverse Engineering

Recording of design decisions and rationales

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 22

SW Product Line

Architecture Documentation: Views, Models, Diagrams

Architectural View

– A representation of a system from the perspective of a related set of concerns

Benefits

– Separation of Concerns

– Complexity reduction

– Communication with stakeholders

Idea: View-based Design and Analyses

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 23

SW Product Line

Architecture Variation Modeling in UML

Unified Modeling Language (UML) is commonly used to describe software

architectures — at least for object-oriented systems

„UML does not support the description of PLAs

– „UML tools do not support it, either

– „some UML tools support UML extensibility mechanisms

Stereotypes

Tagged Values (Properties)

Constraints

→ Find a workaround using UML extensibility options

– allows to use existing tools

– product line architectures comply to the UML standard

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 24

SW Product Line

Architecture Typical variant elements in UML

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 25

SW Product Line

Architecture Feature Modeling

Feature modeling

– is the activity of identifying externally visible characteristics of products in a product

line and organizing them into a feature model. [Lee+06]

Features

– can be services, operations, non-functional characteristics, and technologies of a

particular product line. [Lee+06]

Type

Car

[1..1]

Truck

Engine

Diesel Electricity

[1..1]

Petrol

Wheel Trunk Seat

Vehicle

Mandatory

Optional

Alternative [min..max]

Variability Dependencies

requires

excludes

Constraint Dependencies requires

excludes

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 26

SW Product Line

Architecture Decision Modeling

Decisions

– are variation points that typically constrain the resolution of other variation points.

[Muthig+02]

Each Decision defines a question that captures the essence of the related

variability

A Decision Model includes

– id

– decision name

– question

– variation point

– resolution & default

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 27

SW Product Line

Architecture KobrA – Generic Component Model Suite

KobrA

– a systematic method that integrates component-based development with product line

engineering [Atkinson+01]

– makes use of the extension mechanisms of the UML [Muthig+02]

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 28

SW Product Line

Architecture Basic Goals [Atkinson+01]

Simple

– a method with separate concerns

Systematic

– concepts and guidelines defined in the method should be precise and unambiguous

– tell developers what they should do, rather than what they may do

Scalable

– be able to accommodate large-scale and small-scale problems in the same manner

– the method should be applicable incrementally

Practical

– compatible with commonly used technologies

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 29

SW Product Line

Architecture Role of a Component Specification

To describe the externally visible properties of a component

Defines a component’s

– supplied services (supplied interface)

– acquired services (components)

Provides the basis for the contract between the component and its clients

„Is defined in the context of the parent component’s realization (or the context

realization if the root)

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 30

SW Product Line

Architecture Primary Specification Models

Structural model

– data manipulated by the component, its environment, and any externally visible

structure

– one or more class diagrams

– „zero or more object diagrams

„Functional model

– computations performed by the component

– one operation specification for each operation

Behavioral model

– states exhibited by the component and the events that change them

– „zero or more state chart diagrams

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 31

SW Product Line

Architecture Example: Structural Model

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 32

SW Product Line

Architecture Example: Functional Model

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 33

SW Product Line

Architecture Example: Behavioral Model

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 34

SW Product Line

Architecture Role of a Component Realization

To describe the way in which a component realizes the services specified in the

specification

Defines a component’s

– private subcomponents

– architecture and design

� Is defined in the context of the component’s specification

– the realization models expand upon the information in the specification model

SW Product Line

Engineering (SPLE)

Motivation

Defintion

Life cycle

Goals

SPL Architecture

Introduction

Usage

Process

Variation Modeling

Modeling in UML

Feature Model

Decision Model

Kobra

Introduction

Comp. Specification

Comp. Realization

© Prof. Dr. Dr. h. c. Dieter Rombach, Fundamentals of Software Engineering, Winter Term 2011/12 35

SW Product Line

Architecture Example: Phone Component