Uploaded by Michel Chaudron

Sw Prod Line Engineering Jacob Kruger

advertisement
Managing Large-Scale Software Systems:
Configurable Platforms for Engineering Variant-Rich Systems
Assist. Prof. Dr.-Ing. Jacob Krüger
Mathematics & Computer Science, Eindhoven University of Technology, The Netherlands
May 11, 2023 | Guest Lecture Advanced Software Engineering (2IP85)
Learning Objectives for Today
• anticipate variability as an inherent property of software
• understand the concept of product-line engineering
• be familiar with feature models
• know key properties of variability mechanisms
• reflect on the pros and cons of variant-rich systems
2
Managing Large-Scale Software Systems
Engineering One Software System is Complex
requirements
analysis
system and
software design
implementation
and unit testing
integration and
system testing
operation and
maintenance
3
Managing Large-Scale Software Systems
Engineering One Software System is Complex
daily sprint
requirements
analysis
system and
software design
implementation
and unit testing
product
backlog
integration and
system testing
operation and
maintenance
3
Managing Large-Scale Software Systems
working system
increment
sprint
backlog
sprint
Engineering One Software System is Complex
daily sprint
requirements
analysis
system and
software design
implementation
and unit testing
product
backlog
integration and
system testing
working system
increment
sprint
backlog
sprint
operation and
maintenance
→ one customized system for one customer or a standard system for all customers
3
Managing Large-Scale Software Systems
But Who Needs Exactly One System?
customization
(individual good)
4
Managing Large-Scale Software Systems
But Who Needs Exactly One System?
customization
(individual good)
4
Managing Large-Scale Software Systems
mass production
(one size fits all good)
But Who Needs Exactly One System?
mass customization
(mass produced individual good)
4
Managing Large-Scale Software Systems
Benefiting from Reuse – Facing Complexity
• how do we develop customized systems?
• from scratch
requirements
analysis
system and
software design
requirements
analysis
implementation
and unit testing
system and
software design
integration and
system testing
requirements
analysis
implementation
and unit testing
operation and
maintenance
system and
software design
integration and
system testing
implementation
and unit testing
operation and
maintenance
integration and
system testing
operation and
maintenance
5
Managing Large-Scale Software Systems
Benefiting from Reuse – Facing Complexity
• how do we develop customized systems?
• from scratch
• by reusing existing assets
5
Managing Large-Scale Software Systems
Benefiting from Reuse – Facing Complexity
• how do we develop customized systems?
• from scratch
• by reusing existing assets
• developing a variant-rich system via software reuse
• reduces costs and time, improves quality
• customizes system to different requirements
5
Managing Large-Scale Software Systems
Benefiting from Reuse – Facing Complexity
• how do we develop customized systems?
• from scratch
• by reusing existing assets
• developing a variant-rich system via software reuse
• reduces costs and time, improves quality
• customizes system to different requirements
32 years of evolution
5
•
•
•
•
≈1.1 million version-control revisions (system versions)
≈48 thousand forks (system variants)
≈15 thousand configuration options (features)
≈250 major distributions active (system integration)
Managing Large-Scale Software Systems
What is a ...?
• domain → the area within which a (variant-rich) software system acts
• scopes requirements for a variant-rich system
• defines concepts and terms relevant for a system
• includes respective software-engineering knowledge
• e.g., automotive, operating systems, medical devices
6
Managing Large-Scale Software Systems
What is a ...?
• domain → the area within which a (variant-rich) software system acts
• variant-rich system → a set of products sharing a common base
• includes products with common and custom features
• called product line or product family when building on a managed platform
• a platform is a single asset base from which products can be derived
• e.g., car platform, Linux Kernel, robot/drone firmware
6
Managing Large-Scale Software Systems
What is a ...?
• domain → the area within which a (variant-rich) software system acts
• variant-rich system → a set of products sharing a common base
• feature → an abstracted functionality of a system
• specifies commonalities/differences of individual products
• used to structure and configure a variant-rich system
• includes code, models, requirements, documentation, ...
• e.g., lane-keeping assistant, blind spot monitoring
6
Managing Large-Scale Software Systems
What is a ...?
• domain → the area within which a (variant-rich) software system acts
• variant-rich system → a set of products sharing a common base
• feature → an abstracted functionality of a system
• product/variant → a valid selection of features that forms a concrete system
6
Managing Large-Scale Software Systems
Variant-Rich Systems Typically Arise Unsystematic
• a product line has the most benefits when designed proactively ...
7
Managing Large-Scale Software Systems
Variant-Rich Systems Typically Arise Unsystematic
• a product line has the most benefits when designed proactively ...
• ... but most systems become variant-rich during their evolution
variability in time (revisions)
7
Managing Large-Scale Software Systems
Variant-Rich Systems Typically Arise Unsystematic
• a product line has the most benefits when designed proactively ...
• ... but most systems become variant-rich during their evolution
variability in time (revisions)
var. in space (features)
7
Managing Large-Scale Software Systems
Variant-Rich Systems Typically Arise Unsystematic
• a product line has the most benefits when designed proactively ...
• ... but most systems become variant-rich during their evolution
variability in time (revisions)
var. in space (features)
7
Managing Large-Scale Software Systems
Variant-Rich Systems Typically Arise Unsystematic
• a product line has the most benefits when designed proactively ...
• ... but most systems become variant-rich during their evolution
variability in time (revisions)
var. in space (features)
7
Managing Large-Scale Software Systems
Product-Line Engineering as a Systematic Process
domain engineering
product
management
platform
requirements
engineering
8
Managing Large-Scale Software Systems
platform
design
platform
implementation
platform
testing
Product-Line Engineering as a Systematic Process
domain engineering
product
management
platform
requirements
engineering
platform
design
platform
implementation
platform
testing
variant
requirements
engineering
variant
design
variant
implementation
variant
testing
application engineering
8
Managing Large-Scale Software Systems
Product-Line Engineering as a Systematic Process
domain engineering
product
management
platform
requirements
engineering
platform
design
platform
implementation
platform
testing
variant
requirements
engineering
variant
design
variant
implementation
variant
testing
application engineering
8
Managing Large-Scale Software Systems
Features Have Dependencies and Interact
• feature can have various dependencies
• mandatory
• optional
• excluding each other
• requiring each other
• ...
9
Managing Large-Scale Software Systems
Features Have Dependencies and Interact
• feature can have various dependencies
• mandatory
• optional
• excluding each other
• requiring each other
• ...
• features in one variant may interact (in unintended ways)
9
Managing Large-Scale Software Systems
Features Have Dependencies and Interact
• feature can have various dependencies
• mandatory
• optional
• excluding each other
• requiring each other
• ...
• features in one variant may interact (in unintended ways)
• relevant information for configuring a valid variant
9
Managing Large-Scale Software Systems
Features Have Dependencies and Interact
• feature can have various dependencies
• mandatory
• optional
• excluding each other
• requiring each other
• ...
• features in one variant may interact (in unintended ways)
• relevant information for configuring a valid variant
→ managing features on an abstract level (problem space) is helpful
9
Managing Large-Scale Software Systems
Feature Models Help Manage Variant-Rich Systems
ConfigDB
API
Get
Put
Transactions
Delete
OS
Windows
Linux
Transactions → Put ∨ Delete
Legend:
Abstract Feature
Concrete Feature
Mandatory
Optional
Or Group
Alternative Group
10
Managing Large-Scale Software Systems
Feature Models Help Manage Variant-Rich Systems
• feature hierarchy
ConfigDB
API
Get
Put
Transactions
Delete
OS
Windows
Linux
Transactions → Put ∨ Delete
Legend:
Abstract Feature
Concrete Feature
Mandatory
Optional
Or Group
Alternative Group
10
Managing Large-Scale Software Systems
Feature Models Help Manage Variant-Rich Systems
• feature hierarchy
• abstract features for structuring
• cross-tree constraints as propositional
formulas
ConfigDB
API
Get
Put
Transactions
Delete
OS
Windows
Linux
Transactions → Put ∨ Delete
Legend:
Abstract Feature
Concrete Feature
Mandatory
Optional
Or Group
Alternative Group
10
Managing Large-Scale Software Systems
Feature Models Help Manage Variant-Rich Systems
ConfigDB
API
Get
Put
Transactions
Delete
OS
Windows
Linux
Transactions → Put ∨ Delete
Legend:
Abstract Feature
Concrete Feature
Mandatory
Optional
Or Group
Alternative Group
10
Managing Large-Scale Software Systems
• feature hierarchy
• abstract features for structuring
• cross-tree constraints as propositional
formulas
• root feature always required
• child requires parent
• optional child can be enabled/disabled
• mandatory child is required
Feature Models Help Manage Variant-Rich Systems
ConfigDB
API
Get
Put
Transactions
Delete
OS
Windows
Linux
Transactions → Put ∨ Delete
Legend:
Abstract Feature
Concrete Feature
Mandatory
Optional
Or Group
Alternative Group
10
Managing Large-Scale Software Systems
• feature hierarchy
• abstract features for structuring
• cross-tree constraints as propositional
formulas
• root feature always required
• child requires parent
• optional child can be enabled/disabled
• mandatory child is required
• at least one child required in OR group
• exactly one child required in XOR group
Feature Models Help Manage Variant-Rich Systems
• feature hierarchy
• abstract features for structuring
• cross-tree constraints as propositional
API Transactions
OS
formulas
• root feature always required
Put Delete Windows Linux • child requires parent
Transactions → Put ∨ Delete
• optional child can be enabled/disabled
• mandatory child is required
Legend:
Abstract Feature
• at least one child required in OR group
Concrete Feature
• exactly one child required in XOR group
Mandatory
Optional
→ knowledge made explicit
Or Group
→ used for checking valid configurations
Alternative Group
ConfigDB
Get
10
Managing Large-Scale Software Systems
Products are Customized and Derived via Configurations
11
Managing Large-Scale Software Systems
Products are Customized and Derived via Configurations
11
Managing Large-Scale Software Systems
Product-Line Engineering as a Systematic Process
domain engineering
product
management
platform
requirements
engineering
platform
design
platform
implementation
platform
testing
variant
requirements
engineering
variant
design
variant
implementation
variant
testing
application engineering
12
Managing Large-Scale Software Systems
Numerous Design and Implementation Techniques Exist
• various mechanisms for implementing variability
• clone and own / version-control systems
• parameters
• conditional compilation
• build systems
• frameworks / plug-ins
• aspect-oriented programming
• (micro)services
• ...
• combinations
13
Managing Large-Scale Software Systems
Numerous Design and Implementation Techniques Exist
• various mechanisms for implementing variability
• clone and own / version-control systems
• parameters
• conditional compilation
• build systems
• frameworks / plug-ins
• aspect-oriented programming
• (micro)services
[Schmid and Verlage 2002]
• ...
developing for reuse requires more effort
• combinations
13
Managing Large-Scale Software Systems
Numerous Design and Implementation Techniques Exist
• various mechanisms for implementing variability
• clone and own / version-control systems
• parameters
• conditional compilation
• build systems
• frameworks / plug-ins
• aspect-oriented programming
• (micro)services
[Schmid and Verlage 2002]
• ...
developing for reuse requires more effort
• combinations
→ a platform requires a high-quality architecture integrating the variability mechanism
13
Managing Large-Scale Software Systems
Picking the “Right” Mechanism can be Hard
• binding time → at what time do we decide to enable or disable features
• various classifications
• compile-time: before or when compiling a program (e.g., C preprocessor)
• load-time: at program start (e.g., plug-ins)
• run-time: while the program is executed (e.g., runtime parameters)
14
Managing Large-Scale Software Systems
Picking the “Right” Mechanism can be Hard
• binding time → at what time do we decide to enable or disable features
• technology → through what means is variability implemented
• language-based: part of the programming language (e.g., parameters)
• tool-based: external tools (e.g., C preprocessor)
14
Managing Large-Scale Software Systems
Picking the “Right” Mechanism can be Hard
• binding time → at what time do we decide to enable or disable features
• technology → through what means is variability implemented
• representation/traceability → how variability is represented in the system
• nothing: no direct representation of features in code (e.g., parameters)
• annotations: single code base with marked features (e.g., C preprocessor)
• composition (deltas): features split into composable units (e.g., plug-ins)
14
Managing Large-Scale Software Systems
Parameters: Simple and Part of Every System
• simple mechanism used in every system (e.g., if, switch)
• binding at load-time (command line, config files) or run-time (settings dialog)
• language-based mechanism
• no explicit representation (sometimes considered annotative)
15
Managing Large-Scale Software Systems
Parameters: Simple and Part of Every System
• simple mechanism used in every system (e.g., if, switch)
• binding at load-time (command line, config files) or run-time (settings dialog)
• language-based mechanism
• no explicit representation (sometimes considered annotative)
• problems
• all code delivered at all times
• used ad hoc without tracing across assets
• quality dependent on discipline of developers
• scattered and tangled with remaining control flow
15
Managing Large-Scale Software Systems
Conditional Compilation: Removing Unused Code
• simple, flexible, ad hoc mechanism (e.g., C Preprocessor)
• binding at compile-time
• tool-based mechanism
• annotations
16
Managing Large-Scale Software Systems
Conditional Compilation: Removing Unused Code
• simple, flexible, ad hoc mechanism (e.g., C Preprocessor)
• binding at compile-time
• tool-based mechanism
• annotations
16
Managing Large-Scale Software Systems
Conditional Compilation: Removing Unused Code
• simple, flexible, ad hoc mechanism (e.g., C Preprocessor)
• binding at compile-time
• tool-based mechanism
• annotations
• problems
• undisciplined usage
• tangling and scattering of features
• error-prone
• hard to analyze and comprehend
16
Managing Large-Scale Software Systems
Plug-In Frameworks: Composing Additional Code
• modularizes features into composable units (plug-in / add-on)
• binding at compile-time, load-time, or run-time Eclipse platform
• language-based mechanism
workbench
• composition
JFace
help
plug-in
plug-in
SWT
plug-in
team
workspace
plug-in
runtime
extension point
(interface)
17
Managing Large-Scale Software Systems
Plug-In Frameworks: Composing Additional Code
• modularizes features into composable units (plug-in / add-on)
• binding at compile-time, load-time, or run-time Eclipse platform
• language-based mechanism
workbench
• composition
JFace
help
plug-in
plug-in
SWT
• problems
workspace
• plug-in management and overhead
runtime
• challenging to evolve (breaking changes)
• extensive preplanning required (extension points, interactions)
• cross-cutting features hard to implement
17
Managing Large-Scale Software Systems
plug-in
team
plug-in
extension point
(interface)
Product-Line Engineering as a Systematic Process
domain engineering
product
management
platform
requirements
engineering
platform
design
platform
implementation
platform
testing
variant
requirements
engineering
variant
design
variant
implementation
variant
testing
application engineering
18
Managing Large-Scale Software Systems
Product-Line Engineering Does Not Solve Everything
• limitations depending on the design and variability mechanism
19
Managing Large-Scale Software Systems
Product-Line Engineering Does Not Solve Everything
• limitations depending on the design and variability mechanism
• managing feature interactions
19
Managing Large-Scale Software Systems
Product-Line Engineering Does Not Solve Everything
• limitations depending on the design and variability mechanism
• managing feature interactions
• testing a platform as a whole
19
Managing Large-Scale Software Systems
Product-Line Engineering Does Not Solve Everything
• limitations depending on the design and variability mechanism
• managing feature interactions
• testing a platform as a whole
• performing code analyses
19
Managing Large-Scale Software Systems
Product-Line Engineering Does Not Solve Everything
• limitations depending on the design and variability mechanism
• managing feature interactions
• testing a platform as a whole
• performing code analyses
• comprehending the source code
19
Managing Large-Scale Software Systems
Product-Line Engineering Does Not Solve Everything
• limitations depending on the design and variability mechanism
• managing feature interactions
• testing a platform as a whole
• performing code analyses
• comprehending the source code
• tracing across assets
19
Managing Large-Scale Software Systems
Product-Line Engineering Does Not Solve Everything
• limitations depending on the design and variability mechanism
• managing feature interactions
• testing a platform as a whole
• performing code analyses
• comprehending the source code
• tracing across assets
→ many open research challenges
and practical problems
19
Managing Large-Scale Software Systems
A Software Platform Helps
• almost all modern systems are variant rich
• managing features through a platform has long-term benefits
• reduces development and maintenance costs
• improves quality
• decreases the time-to-market
• ...
• platforms enable advanced software-engineering concepts
• A/B testing
• continuous integration/devops
• digital twinning/simulation testing
• ...
20
Managing Large-Scale Software Systems
Learning Objectives for Today
• anticipate variability as an inherent property of software
• understand the concept of product-line engineering
• be familiar with feature models
• know key properties of variability mechanisms
• reflect on the pros and cons of variant-rich systems
21
Managing Large-Scale Software Systems
Download