17-708 software product lines: concepts and implementation...
TRANSCRIPT
![Page 1: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/1.jpg)
17-708 SOFTWARE PRODUCT LINES:
CONCEPTS AND IMPLEMENTATION
FEATURE INTERACTIONS
CHRISTIAN KAESTNER
CARNEGIE MELLON UNIVERSITY
INSTITUTE FOR SOFTWARE RESEARCH
1
![Page 2: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/2.jpg)
READING
ASSIGNMENT NOV 16
tbd
![Page 3: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/3.jpg)
LEARNING GOALS
Understand the nature of feature interactions and the optional feature problem; disentangle the different meanings of the terms
Identify common sources of feature interactions
Use appropriate strategies to avoid, mitigate, or detect feature interactions
Select and apply implementation strategies for the optional feature problem
![Page 4: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/4.jpg)
Nhlabatsi, Armstrong, Robin Laney, and Bashar Nuseibeh.
"Feature interaction: the security threat from within software
systems." Progress in Informatics 5 (2008): 75-89.
![Page 5: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/5.jpg)
![Page 6: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/6.jpg)
![Page 7: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/7.jpg)
[:weather:]
Plugin
:) 8-) ;-) …
Plugin
Today's weather: [:weather
![Page 8: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/8.jpg)
Hands-free entry
Night lock
Electronic operation
Intruder defense
…
Example from P. Zave
![Page 9: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/9.jpg)
Feature Interactions
Features designed in isolation
(divide and conquer)
Interact in intended and unintended ways
when composed
(Failure of compositionality
due to hidden underlying domain)
![Page 10: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/10.jpg)
"The physical world has no compositionality." . M. Jackson, FI Dagstuhl 2014 .
![Page 11: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/11.jpg)
SOURCES
Overlapping preconditions (nondeterminism)
Requirements inconsistency
Conflicting goals
Violations of assumptions
Resource contention
Nhlabatsi, Armstrong, Robin Laney, and Bashar Nuseibeh.
"Feature interaction: the security threat from within software
systems." Progress in Informatics 5 (2008): 75-89.
![Page 12: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/12.jpg)
INTERACTION TYPES
Nondeterminism
Dependence
Override (same precondition)
Negative impact (same precondition)
Override (linked trigger events)
Negative impact (linked trigger events)
Order
Bypass
Infinite loop
Nhlabatsi, Armstrong, Robin Laney, and Bashar Nuseibeh.
"Feature interaction: the security threat from within software
systems." Progress in Informatics 5 (2008): 75-89.
![Page 13: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/13.jpg)
Keck, Dirk O., and Paul J. Kuehn. "The feature and service
interaction problem in telecommunications systems: A survey."
Software Engineering, IEEE Transactions on 24, no. 10 (1998):
779-796.
![Page 14: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/14.jpg)
Handling Interactions
Composition mechanism with default
resolution
(telecommunication, Android,
home automation)
![Page 15: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/15.jpg)
Handling Interactions
Isolation, noninterference (to some degree)
(Android, Kernel drivers, browser plugins)
![Page 16: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/16.jpg)
Handling Interactions
Detection in requirements or
implementations
true -> true
true -> (WORLD v BYE)
¬ (WORLD ˄ BYE)
![Page 17: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/17.jpg)
DETECTION
Formal methods
Model checking
Detecting overlapping preconditions
…
Requirements
Identifying shared resources
![Page 18: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/18.jpg)
Apel, Sven, Don Batory, Christian Kästner, and Gunter Saake.
Feature-Oriented Software Product Lines. Berlin: Springer, 2013.
![Page 19: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/19.jpg)
Ferber, Stefan, Jürgen Haag, and Juha Savolainen. "Feature
interaction and dependencies: Modeling features for
reengineering a legacy product line." In Software product lines,
pp. 235-256. Springer Berlin Heidelberg, 2002.
![Page 20: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/20.jpg)
Ferber, Stefan, Jürgen Haag, and Juha Savolainen. "Feature
interaction and dependencies: Modeling features for
reengineering a legacy product line." In Software product lines,
pp. 235-256. Springer Berlin Heidelberg, 2002.
![Page 21: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/21.jpg)
ONLINE TECHNIQUES
Calder, Muffy, Mario Kolberg, Evan H. Magill, and Stephan Reiff-
Marganiec. "Feature interaction: a critical review and considered
forecast." Computer Networks 41, no. 1 (2003): 115-141.
![Page 22: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/22.jpg)
OPTIONAL
FEATURE
PROBLEM
![Page 23: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/23.jpg)
OPTIONAL FEATURE
PROBLEM
Code focused view – how to implement coordination code between two features
Applicable only once interactions identified and detected
![Page 24: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/24.jpg)
Weather Smiley
Coordination
![Page 25: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/25.jpg)
Statistics
(buffer hit ratio,
table size and
cardinality, …)
Transactions
(locks, commit,
rollback, …)
Transactions per second
25
![Page 26: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/26.jpg)
PRODUCTS
DB with statistics without transactions
DB with transactions, without statistics
DB with statistics and
transactions
26
![Page 27: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/27.jpg)
UNDESIRED
PRODUCTS
DB with transactions without statistics
measuring transactions per second
(larger and slower than necessary)
DB with statistics without transactions
trying to measure transactions
per second(?)
27
![Page 28: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/28.jpg)
MODULES
Stat Lock
DB
Stat Lock
DB
Database
Statistics Transactions
Txn-StatsLockStat Lock
DB
Stat
Where to implement
transactions/sec
How to create product without
transactions but with statistics
transactions/sec really a feature?
28
![Page 29: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/29.jpg)
MULTIPLE IMPL.
Variability Impl. Effort Binary Size & Perf. Code Quality
Products
29
![Page 30: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/30.jpg)
DOCUMENT
DEPENDENCIES
Products
Variability Impl. Effort Binary Size & Perf. Code Quality
30
![Page 31: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/31.jpg)
MOVING SOURCE
CODE
Variability Impl. Effort Binary Size & Perf. Code Quality
Products
31
![Page 32: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/32.jpg)
CHANGE BEHAVIOR
Variability Impl. Effort Binary Size & Perf. Code Quality
Products
32
![Page 33: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/33.jpg)
PREPROCESSOR
Variability Impl. Effort Binary Size & Perf. Code Quality
#ifdef TXN
lock();
#ifdef STAT
lockCount++;
#endif
#endif
Products
33
![Page 34: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/34.jpg)
GLUE CODE MODULES
Variability Impl. Effort Binary Size & Perf. Code Quality
Products
34
![Page 35: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/35.jpg)
OVERVIEW
Lö
su
ng
Va
riab
ility
Effo
rt
Siz
e &
Pe
rf.
Qu
ality
Multiple impl
Dependency
Move source code
Change behavior
Preprocessor
Glue code modules
35
![Page 36: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/36.jpg)
EXPERIENCE
BERKELEY DB
Dependencies?
• Would render important features de-facto mandatory
Change behavior?
• undesired
Glue code module?
• Extracted 76% of statistics code into 9 modules
• possible but labor intensive
Preprocessor
• Faster, easier
• Scattered code
36
![Page 37: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/37.jpg)
Scale
![Page 38: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/38.jpg)
Scale
![Page 39: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/39.jpg)
Scale
![Page 40: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/40.jpg)
REMINDER: VARIABILITY
MANAGEMENT
see mass customization in automotive
Identify relevant variability
Reduce unnecessary variation to avoid interactions and optional code problems
![Page 41: 17-708 Software Product Lines: Concepts and Implementation ...ckaestne/17708/19_featureinteraction.pdf · 17-708 SOFTWARE PRODUCT LINES: CONCEPTS AND IMPLEMENTATION FEATURE INTERACTIONS](https://reader036.vdocument.in/reader036/viewer/2022070922/5fba922d7f880f29b4484d39/html5/thumbnails/41.jpg)
FURTHER READING
Calder, Muffy, Mario Kolberg, Evan H. Magill, and Stephan Reiff-Marganiec. "Feature interaction: a critical review and considered forecast." Computer Networks 41, no. 1 (2003): 115-141.