Professional Documents
Culture Documents
Hassan Gomaa Department of Information and Software Engineering George Mason University Fairfax, Virginia 22030-4444 Phone: (703) 993-1652 Email: hgomaa@gmu.edu
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
GOMAA: Preface
Preface
June 2004
Overview
This book describes an evolutionary software engineering process for the development of software product lines, which uses the Unified Modeling Language (UML) notation. A software product line (or product family) consists of a family of software systems that have some common functionality and some variable functionality. The interest in software product lines emerged from the field of software reuse when developers and managers realized that they could obtain much greater reuse benefits by reusing software architectures instead of reusing individual software components. The field of software product lines is increasingly recognized in industry and government as being of great strategic importance for software development. Studies indicate that if three or more systems with a degree of common functionality are to be developed, then developing a product line is significantly more cost-effective than developing each system from scratch. The traditional mode of software development is to develop single systemsthat is, to develop each system individually. For software product lines, the development approach is broadened to consider a family of software systems. This approach involves analyzing what features (functional requirements) of the software family are common, what features are optional, and what features are alternatives. After the feature analysis, the goal is to design a software architecture for the product line, which has common components (required by all members of the family), optional components (required by only some members of the family), and variant components (different versions of which are required by different members of the family). Instead of starting from square one, the developer creates applications by adapting and configuring the product line architecture. To model and design families of systems, the analysis and design concepts for single product systems need to be extended to support software product lines. This book is intended to appeal to readers who are familiar with modeling and designing single systems, but who wish to extend their knowledge to modeling and designing software product lines. It is also intended to appeal to readers who are familiar with applying UML to the modeling and design of single systems but not with developing software product lines.
Pref-1
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
GOMAA: Preface
Pref-2
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
GOMAA: Preface
Software Product Line Requirements Modeling x Use case modeling. Model commonality and variability in the use case model. For this purpose, PLUS provides an approach to modeling kernel, optional, and alternative use cases, as well as an approach to modeling variation points in use cases. Feature modeling. Model product line features. Feature modeling is a key concept in software product lines. PLUS provides an approach for modeling common, optional, and alternative features, an approach for deriving the feature model from the use case model, and an approach for representing features with the UML notation.
Software Product Line Analysis Modeling x Static modeling. Develop a product line context model for the product line boundary. Determine kernel, optional, and alternative external classes. Develop a product line information (entity class) model: determine kernel, optional, and alternative entity classes. Dynamic interaction modeling. Develop interaction diagrams to realize kernel, optional, and alternative use cases. Use evolutionary development: the kernel first approach is applied to determine product line commonality, followed by product line evolution to determine variability. Dynamic state machine modeling. Develop kernel, optional, and alternative statecharts. Manage state machine variability through inheritance and parameterization. Feature/class dependency modeling. Determine the dependency that common, optional, and alternative features have with kernel, optional, and variant classes.
x x
Software Product Line Design Modeling x Software architectural patterns. Determine the software architectural structure and communication patterns that are most appropriate for the product line, given the catalog of architectural patterns. Component-based software design. Develop a component-based software design for the product line, which models kernel, optional, and variant components, as well as their ports and provided and required interfaces. Design the component-based architecture that explicitly models the components and their interconnections.
Software Application Engineering Develop a software application that is a member of the product line, by using the feature model to derive the application from the product line architecture and components.
Pref-3
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
GOMAA: Preface
Pref-4
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
GOMAA: Preface
Chapter 8: Finite State Machines and Statecharts for Software Product Lines
This chapter describes how finite state machine and statechart modeling concepts are extended to address software product lines. In particular, each state-dependent control classwhether kernel, optional, or variantneeds to be modeled with a finite state machine and depicted as a statechart. It is also possible to model variability using inherited state machines and parameterized state machines.
Pref-5
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
GOMAA: Preface
appropriate components and setting of the parameter values for individual components to include in the product line member. The chapter covers how the feature model is used to help in this process.
Pref-6
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
1
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-1
Introduction
Software Product Line Family of products / systems Some common components, some optional, some variant Designing Software Product Lines Object Oriented Analysis and Design of Software Product Lines Emphasis on modeling commonality and variability in software product lines Unified Modeling Language (UML) Standardized notation for object-oriented development UML notation extended to model software product lines Use UML standard extension mechanisms Stereotypes Constraints Tagged values UML 2.0 New concepts for depicting software architectures and components
SPL-2
1
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Software Reuse
Traditional Software Reuse Library of reusable code components Emphasis on code reuse Architecture Reuse Focuses on requirements and design reuse Much greater potential than code reuse Software Product line engineering Software engineering for family of products Reuse of requirements and architecture Application engineering Software engineering for one member of family Architecture for Software Product Lines Captures similarities and variations of product family
Copyright 2005 H. Gomaa
SPL-4
2
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-5
Product Line Requirements and Analysis Models, Product Line Architecture, Reusable Components
Application Requirements
Application Engineering
Application
SPL-6
3
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-7
Requirements Modeling
What should SPL Design Method provide?
Support variability in use case modeling Integrate feature modeling with other UML views
SPL-8
4
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-9
SPL-10
5
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-11
SPL-12
6
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-13
Developing Use Case Model for Software Product Lines Kernel First Approach Kernel First Approach Develop kernel use cases initially Example of Kernel First Approach Kernel use case in Microwave Product Line Cook Food Product Line Evolution Approach Address Product Line use case variability Cook Food kernel use case Several variation points Optional use cases in Microwave Product Line Set Time of Day Display Time of Day Copyright 2005 H. Gomaa Cook Food with Recipe
SPL-14
7
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Cook Food
User Timer
Example of Timing Requirement - When timer expires, system must switch off heater within 100 msecs
SPL-15
Timer
SPL-16
8
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-17
SPL-18
9
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-19
SPL-20
10
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Use Case Model for Software Product Lines - View Integration Approach
Specify use cases for each member of product line Compare use cases for different members Determine kernel, optional, and alternative use cases Kernel use cases needed by all Product Line members Optional use cases needed by some Product Line members Alternative use cases are mutually exclusive
SPL-21
Figure 4.13 E-commerce: Example of Reverse Engineering Approach: Supplier use cases in B2C systems
Supplier
Bill Customer
SPL-22
11
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Figure 4.14 E-commerce: Example of Reverse Engineering Approach: Supplier use cases in B2B systems
Supplier
Send Invoice
SPL-23
Figure 4.15 E-commerce: Example of Reverse Engineering Approach: Supplier use cases in E-Commerce product line
kernel Process Delivery Order Supplier kernel Confirm Shipment alternative Send Invoice alternative Bill Customer
SPL-24
12
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Feature Modeling for Software Product Lines Feature (Kang, SEI) Function or characteristic that differentiates between members of the software product line Feature modeling Very important for SPLs PLUS integrates feature modeling with other UML modeling views
SPL-25
Feature Modeling
Feature Function or characteristic that differentiates between members of the software product line Features are categorized as Common features Required by all members of product line Optional features Required by some members of product line Alternative features Choice of features One of the alternatives may be a default feature Parameterized feature Type, permitted values, default value
Copyright 2005 H. Gomaa
SPL-26
13
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-27
User
Timer
SPL-28
14
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Feature Modeling
Feature Dependencies One feature depends on another Dependency on common features is implicit Dependency on optional features is explicitly specified Feature Relationships Mutually exclusive features Zero or One out of a group of features Exactly one of a group of features One and only one out of a group of features One or more of a group of features One or more out of a group of features Mutually inclusive If one feature is picked, the other must be picked
Copyright 2005 H. Gomaa
SPL-29
SPL-30
15
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Feature Notation
Uses extension mechanisms of UML Stereotypes, tagged values, constraints common feature Feature Name, common feature Factory Kernel optional feature Feature Name {prerequisite = P} optional feature Light, optional feature Beeper alternative feature Feature Name {prerequisite = P} alternative feature French, alternative feature Spanish default feature Feature Name {prerequisite = P} default feature English parameterized feature Feature Name parameterized feature ATM Password Length {type = integer, permitted value = 4..8, default value = 4}
Copyright 2005 H. Gomaa
SPL-31
Feature Notation
zero-or-one-of feature group Feature Group Name {Alternative = A1An, Prerequisite = P} zero-or-one-of feature group Roof Rack {alternative = Basic Rack, Ski Rack, Bicycle Rack} exactly-one-of feature group Feature Group Name {default = D, alternative = A1An, prerequisite = P} exactly-one-of feature group Display Unit {default = One-line Display, alternative = Multi-line Display} at-least-one-of feature group Feature Group Name {default = D, feature = O1, , On, prerequisite = P} at-least-one-of feature group Hotel Reservations {default = Single Booking Reservations, feature = Block Tourist Reservations, Block Conference Reservations}
Copyright 2005 H. Gomaa
SPL-32
16
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-33
SPL-34
17
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-35
Microwave Oven Kernel Light Turntable Beeper Minute Plus One-line Display Multi-line Display English French Spanish German Italian Boolean Weight Analog Weight One-level Heating Multi-level Heating Power Level TOD Clock 12/24 Hour Clock Recipe Copyright 2005 H. Gomaa
common optional optional optional optional default alternative default alternative alternative alternative alternative default alternative default alternative optional optional parameterized optional
Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Set Time of Day Display Time of Day Set Time of Day Display Time of Day Cook Food with Recipe
kernel vp vp vp vp vp vp vp vp vp vp vp vp vp vp vp vp optional optional vp optional 12/24 Hour Clock Light Turntable Beeper Minute Plus Display Unit Display Unit Display Language Display Language Display Language Display Language Display Language Weight Sensor Weight Sensor Heating Element Heating Element Power Level
SPL-36
18
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-37
Analysis Modeling What should SPL Design Method provide? For product lines Support variability Static Modeling Dynamic Modeling
SPL-38
19
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-39
SPL-40
20
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Software Product Lines (PLUS) Second UML stereotype depicts reuse category kernel, optional, variant
SPL-41
SPL-42
21
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-43
SPL-44
22
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Dynamic Interaction Modeling for Software Product Lines Object interaction model Defines how objects participate in use cases Use communication (collaboration) diagrams or sequence diagrams Software Product Line Interaction model Determine objects that participate in each use case Determine sequence of messages sent between objects Develop at least 1 interaction diagram for each use case Kernel communication diagrams Optional communication diagrams Alternative communication diagrams
SPL-45
SPL-46
23
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
6.1: Start
8.2: Finished
entity : OvenData 6.2a: Start Timer 8.3: Timer Expired 8.3a: Display End prompt
6.3: Start Cooking Output 8.5 : Stop Cooking Output external output device : One-levelHeatingElement Copyright 2005 H. Gomaa
SPL-47
Incoming message to object-> input event on statechart Output event on statechart -> outgoing message from object
SPL-48
24
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
6.1: Start
8.2: Finished
state dependent control : MicrowaveOvenControl 6.2: Start Cooking 8.4 : Stop Cooking output device interface : One-levelHeatingElement Interface output device interface : One-lineDisplay Interface
entity : OvenData 6.2a: Start Timer 8.3: Timer Expired 8.3a: Display End prompt
6.3: Start Cooking Output 8.5 : Stop Cooking Output external output device : One-levelHeatingElement Copyright 2005 H. Gomaa
SPL-49
6.1: Start
8.2: Finished
6.3: Start Cooking Output 8.5 : Stop Cooking Output external output device : One-levelHeatingElement Copyright 2005 H. Gomaa
SPL-50
25
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Incoming message to object-> input event on statechart Output event on statechart -> outgoing message from object
SPL-51
6.1: Start
8.2: Finished
state dependent control : MicrowaveOvenControl 6.2: Start Cooking 8.4 : Stop Cooking output device interface : One-levelHeatingElement Interface output device interface : One-lineDisplay Interface
entity : OvenData 6.2a: Start Timer 8.3: Timer Expired 8.3a: Display End prompt
6.3: Start Cooking Output 8.5 : Stop Cooking Output external output device : One-levelHeatingElement Copyright 2005 H. Gomaa
SPL-52
26
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Figure 7.6 Communication diagram for kernel use case: Cook Food
external input device : DoorSensor 1,9: Door Opened Input 3:Door Closed Input product line system : MicrowaveOvenSystem external input device : BooleanWeightSensor 2,10: Weight Input external input device : Keypad 4: Cooking Time Key Input 5*: Numeric Key Input 6: Start Key Input input device interface : KeypadInterface 7.1,8.1: 4.1: Cooking Time Selected Decrement 5.1: Cooking Time Entered Cooking Time 6.1: Start 5.2a: Update Cooking Time state dependent control : MicrowaveOvenControl 6.2: Start Cooking 8.4 : Stop Cooking output device interface : One-levelHeatingElement Interface 4.2: Prompt for Time 5.2: Display Cooking Time output device interface : One-lineDisplay Interface 7.2: Time left 8.2: Finished external timer : Clock
input device interface : BooleanWeightSensor Interface 2.1 : Item Placed 10.1 : Item Removed
timer : OvenTimer
entity : OvenData
8.3: Timer Expired 7.3: Update Cooking time Display 8.3a: Display End Prompt 4.3,8.3a.1: Read 4.4,8.3a.2: Prompt entity : EnglishDisplay Prompts
6.3: Start Cooking Output 8.5 : Stop Cooking Output external output device : One-levelHeating Element
4.5: Time Prompt 5.3,7.4: Display Time 8.3a.3: End Prompt external output device : One-lineDisplay
SPL-53
timer : TODTimer
T1.2: TOD
SPL-54
27
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
State Machine Models for SPLs Design statechart for each state dependent class Model state machine variability Inherited vs Parameterized State Machines Inherited State Machine Different statechart for each alternative or optional feature Disadvantage: Each feature & feature combination needs an inherited state machine Leads to combinatorial explosion of inherited state machines Often better to design parameterized state machine
SPL-55
SPL-56
28
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-57
SPL-58
29
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-59
SPL-60
30
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-61
Cancel/Cancel Timer
Door Closed [Time Remaining] Door Opened/ Stop Timer Door Open With Item
Door Opened
3.1: Door Closed [Zero Time] Cooking 8.3: Timer Expired Door Shut With Item
Cancel/ Stop Timer 5.1: Cooking Time Entered/ 5.2: Display Cooking Time, 5.2a: Update Cooking Time
Ready To Cook
SPL-62
31
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Figure 8.12 Parameterized Statechart for Microwave Oven Control (all features)
1.1: Door Opened / 1.2: Switch On[light] Door Shut Door Closed / Switch Off [light] Door Open Item Removed/ Cancel Recipe, Display Recipe Cancelled
10.1: Item Removed Door Closed [Time Remaining]/ Switch Off [light] Door Open With Item Door Opened/ Switch On [light] 9.1: Door Opened/ 9.2: Switch On [light] R4.1: Recipe Entered [recipe] Cancel R8.3: Timer Expired Cancel/ Cancel Timer
Door Opened/ Stop Timer 3.1: Door Closed [Zero Time]/ 3.2: Switch Off [light] 8.3: Timer Expired/ 8.4d: Clear Power Level [power],8.4b: Switch Off [light]
Cooking 6.11: Minute Plus[minuteplus]/ 6.12: Add Minute entry / 4M.2a,6.2: Start Cooking, 6.2c: Start Turning [turn], 6.2b: Switch On [light], exit/ 8.4: Stop Cooking, 8.4a: Beep [beeper], 8.4c: Stop Turning [turn]
4M.1: Minute Plus[minuteplus]/ 4M.2: Start Minute Cancel/ Stop Timer, Switch Off [light] 5.1: Cooking Time Entered/ 5.2: Display Cooking, 5.2a: Update Cooking Time
Ready To Cook
SPL-63
SPL-64
32
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-65
Communication Diagram For Microwave Oven SPL - Impact Of Beeper and Light Features
Optional objects added Impact on kernel control object Feature dependent messages
SPL-66
33
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-67
SPL-68
34
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
default entity CheckingAccount - lastDepositAmount : Real = 0 + credit (amount : Real) + debit (amount : Real) + readLastDepositAmount() : Real
variant entity SavingsAccount - cumulativeInterest : Real = 0 - debitCount : Integer = 0 - maxFreeDebits : Integer = 3 - bankCharge : Real = 2.50 + credit (amount : Real) + debit (amount : Real) + clearDebitCount() + addInterest (interestRate : Real) + readCumulativeInterest () : Real
SPL-69
SPL-70
35
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
kernel-param-vp entity OvenData - cookingTime : Integer = 0 {range >=0} - selectedPowerLevel : powerType = High {Range = High, Medium, Low} {feature = Power Level} - itemWeight : Real = 0.0 {range > 0} {feature = Analog Weight} - selectedRecipe : Integer = 0 {range > 0}{feature = Recipe} - TODvalue : Time = 12:00 {feature = TOD Clock} - TODmaxHour : Time = 12:00 {permitted value = 12:00, 24:00} {feature = TOD Clock}
SPL-71
SPL-72
36
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
common
Door Sensor Interface Weight Sensor Interface Keypad Interface Heating Element Interface Display Interface Microwave Oven Control Oven Timer Oven Data Display Prompts Lamp Interface Microwave Oven Control Turntable Interface Microwave Oven Control Beeper Interface Microwave Oven Control Keypad Interface Microwave Oven Control Oven Timer One-line Display Interface Multi-line Display Interface English Display Prompts French Display Prompts Spanish Display Prompts German Display Prompts Italian Display Prompts
kernel kernel-abstract-vp kernel-param-vp kernel-abstract-vp kernel-abstract-vp kernel-param-vp kernel-param-vp kernel-param-vp kernel-abstract-vp optional kernel-param-vp optional kernel-param-vp optional kernel-param-vp kernel-param-vp kernel-param-vp kernel-param-vp default variant default variant variant variant variant
light : Boolean turntable : Boolean beeper : Boolean minuteplus : Boolean minuteplus : Boolean minuteplus : Boolean
Italian
SPL-73
SPL-74
37
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-75
SPL-76
38
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-77
Connector Joins required port of one component to provided port of another component Microwave Control can be connected to either version of Microwave Display Less variability
Copyright 2005 H. Gomaa
SPL-78
39
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
SPL-79
SPL-80
40
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Layered patterns very important in SPLs Layers of Abstraction Kernel Client/Server patterns Basic Client/Server Client/Broker/Server Client/Agent/Server Control Patterns very important in RT Design Centralized Control Distributed Control Hierarchical Control
Copyright 2005 H. Gomaa
SPL-81
SPL-82
41
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Layer 7
Application Layer
Layer 6 Layer 5
Layer 4
Transport Layer
SPL-83
Centralized Control Pattern One control component Executes statechart Receives sensor input from input components Controls external environment via output components
SPL-84
42
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Architectural Communication Patterns for Software Product Lines Peer-to-Peer Communication Patterns Asynchronous communication Bi-directional asynchronous communication Client/Server Communication Patterns Synchronous communication with reply Synchronous communication with Callback Very important for evolutionary design: Broker Communication Patterns Broker forwarding Broker handle Discovery Group Communication Patterns Broadcast Subscription/notification (Multicast)
Copyright 2005 H. Gomaa
SPL-85
SPL-86
43
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Product Line Requirements and Analysis Models, Product Line Architecture, Reusable Components
Application Requirements
Application Engineering
Application
SPL-87
SPL-88
44
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
requires
requires
SPL-89
SPL-90
45
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Feature Name
Feature Category
Variation Point
Microwave Oven Kernel Light Beeper Multi-line Display French Boolean Weight One-level Heating TOD Clock 12/24 Hour Clock
Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Cook Food Set Time of Day Display Time of Day Set Time of Day Display Time of Day
kernel vp vp vp vp vp vp optional optional optional 12/24 Hour Clock Light Beeper Display Unit Display Language Weight Sensor Heating Element
SPL-91
Outputs To
SPL-92
46
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
common
Door Sensor Interface Weight Sensor Interface Keypad Interface Heating Element Interface Display Interface Microwave Oven Control Oven Timer Oven Data Display Prompts Lamp Interface Microwave Oven Control Beeper Interface Microwave Oven Control Multi-line Display Interface French Display Prompts Boolean Weight Sensor Interface One-level Heating Element Interface TOD Timer Keypad Interface Microwave Oven Control Oven Data Oven Data
kernel kernel-abstract-vp kernel-param-vp kernel-abstract-vp kernel-abstract-vp kernel-param-vp kernel-param-vp kernel-param-vp kernel-abstract-vp optional kernel-param-vp optional kernel-param-vp variant variant default default optional kernel-param-vp kernel-param-vp kernel-param-vp kernel-param-vp
Light Beeper Multi-line Display French Boolean Weight One-level Heating TOD Clock
Parameterized
SPL-93
SPL-94
47
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
Figure 12.14 Software architecture for Microwave Oven Application - message communication
kernel external timer : Clock Timer Event product line system : MicrowaveOvenSystem kernel input component : DoorComponent default input component : BooleanWeightComponent sendControlRequest (weightEvent) kernel-param-vp input component : KeypadComponent kernel external input device : DoorSensor variant external input device : BooleanWeightSensor kernel external input device : Keypad
Door Input
Weight Input
Keypad Input
sendControlRequest (doorEvent)
sendControlRequest (keypadEvent) kernel control component : MicrowaveControl displayPrompt (promptId) displayTime (time) displayTOD (TOD)
beep ()
SPL-95
SPL-96
48
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.
DoorComponent {1 node}
BooleanWeightComponent {1 node}
KeypadComponent {1 node}
MicrowaveControl {1 node}
One-levelHeatingElementComponent {1 node}
LampComponent {1 node}
BeeperComponent {1 node}
Multi-lineMicrowaveDisplay {1 node}
SPL-97
Review
Software Product Line Family of products / systems Some common components, some optional, some variant Designing Software Product Lines Object Oriented Analysis and Design of Software Product Lines Emphasis on modeling commonality and variability in software product lines Unified Modeling Language (UML) Standardized notation for object-oriented development UML notation extended to model software product lines H. Gomaa, Designing Software Product Lines with UML: From Use Cases to Pattern-based Software Architectures, Addison Wesley Object Technology Series, July 2004
SPL-98
49
Authorized licensed use limited to: IEEE Xplore. Downloaded on April 26, 2009 at 19:41 from IEEE Xplore. Restrictions apply.