Professional Documents
Culture Documents
Requirements Evaluation: Outline
Requirements Evaluation: Outline
Inconsistency management
– Types of inconsistency
– Handling inconsistencies
– Managing conflicts: a systematic process
Risk analysis
– Types of risk
– Risk management
– Risk documentation
– DDP: quantitative risk management for RE
Evaluating alternative options for decision making
Requirements prioritization
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 1
DDP: quantitative risk management for RE
Three steps:
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 2
Step 1: Elaborate the Impact matrix
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 3
Impact matrix:
example for library system
Risks
Objectives Late returns Stolen copies Lost copies Long loan by staff Loss
(likelihood: 0.7) (likelihood: 0.3) (likelihood: 0.1) (likelihood: 0.5) obj.
Regular availability of 0.30 0.60 0.60 0.20 0.22
book copies (weight: 0.4)
Comprehensive library 0 0.20 0.20 0 0.02
coverage (weight: 0.3)
Staff load reduced 0.30 0.50 0.40 0.10 0.04
(weight: 0.1)
Operational costs 0.10 0.30 0.30 0.10 0.05
decreased (weight: 0.2)
Risk criticality 0.12 0.12 0.04 0.06
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 4
Step 2: Elaborate the Effectiveness matrix
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 5
Effectiveness matrix:
example for library system
Weighted risks
Late returns Stolen copies Lost copies Long loan by staff Overall effect of
Countermeasures (likelihood: 0.7) (likelihood: 0.3) (likelihood: 0.1) (likelihood: 0.5) countermeasure
Email reminder sent 0.70 0 0.10 0.60 0.12
Fine subtracted from 0.80 0 0.60 0 0.12
registration deposit
Borrower unregistration 0.90 0.20 0.80 0 0.16
+ insertion on black list
Anti-theft device 0 1 0 0 0.12
Combined risk
0.99 1 0.93 0.60
reduction
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 6
Step 3: Determine optimal balance
risk reduction vs. countermeasure cost
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 7
Requirements evaluation: outline
Inconsistency management
– Types of inconsistency
– Handling inconsistencies
– Managing conflicts: a systematic process
Risk analysis
– Types of risk
– Risk management
– Risk documentation
– DDP: quantitative risk management for RE
Evaluating alternative options for decision making
Requirements prioritization
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 8
Evaluating alternative options
for decision making
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 9
Qualitative reasoning for evaluating options
Goal:
Goal determine qualitative contribution of each option to important non-
functional requirements (NFRs):
very positively (++), positively (+), negatively (-), very negatively (--)
Example: meeting scheduling
Non-functional requirements
Fast response Reliable Minimal
Options response inconvenience
Get constraints by email - + -
Get constraints from e-agenda ++ -- ++
Qualitative labels “+”, “-” on higher-level NFRs are obtained by bottom-
up propagation from lower-level reqs in goal-subgoal refinement/conflict
graph ([Chung et al 2000], see chap. 16)
Given “+”, “-” contributions of each option to lowest-level reqs, option
with best contribution to critical high-level NFRs is taken
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 10
Quantitative reasoning for evaluating options
Build a weighted matrix for ...
– estimating score of each option on each evaluation criterion (weighted
by relative importance)
– selecting option with highest overall score on all criteria
For each option opt, criterion crit:
Score (opt, crit) = estimated score percentage of opt on crit
0 --> 1, Y/100 means “crit satisfied in Y% of cases”
Last line, for each option opt:
totalScore (opt) = crit (Score (opt, crit) Weight (crit))
Evaluation criteria Significance Option scores
(NFRs) weighting Get constraints Get constraints
by email from e-agenda
Fast response 0.30 0.50 0.90
Reliable response 0.60 0.90 0.30
Minimal inconvenience 0.10 0.50 1.00
TOTAL 1.00 0.74 0.55
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 11
Requirements evaluation: outline
Inconsistency management
– Types of inconsistency
– Handling inconsistencies
– Managing conflicts: a systematic process
Risk analysis
– Types of risk
– Risk management
– Risk documentation
– DDP: quantitative risk management for RE
Evaluating alternative options for decision making
Requirements prioritization
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 12
Requirements prioritization
Elicited & evaluated reqs must be assigned priorities ...
– conflict resolution
– resource limitations (budget, personnel, schedules)
– incremental development
– replanning due to unexpected problems
Some principles for effective req prioritization ...
(1) by ordered levels of equal priority, in small number
(2) qualitative & relative levels (“higher than”, ...)
(3) comparable reqs: same granularity, same abstraction level
(4) reqs not mutually dependent (one can be kept, another dropped)
(5) agreed by key players
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 13
Value-cost prioritization
Systematic technique, meets principles (1) - (3)
Three steps:
1. Estimate relative contribution of each req to project’s value
2. Estimate relative contribution of each req to project’s cost
3. Plot contributions on value-cost diagram:
diagram shows what req fits what
priority level according to value-cost tradeoff
50 POD
Value High
percentage 40 priority
Medium
30 HPL
priority
20
PCR Low
priority
10
MA
MLC
10 20 30 40 50
Cost percentage
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 14
Estimating relative contributions
of requirements to project value & cost
AHP technique from Decision Theory
(“Analytic Hierarchy Process”, [Saati, 1980])
Two steps:
1. Build comparison matrix:
matrix
estimates how Ri’s contribution to Crit compares to Rj’s
2. Determine how Crit distributes among all Ri
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 15
AHP, Step 1: Compare requirements pairwise
Scale for comparing Ri’s contribution to Crit to Rj’s:
1: contributes equally 7 : contributes very strongly more
3: contributes slightly more 9 : contributes extremely more
5 : contributes strongly more
In comparison matrix, Rji = 1 / Rij (1 i, j N)
Produce Handle preferred Parameterize conflict Multi-lingual Meeting
Crit: value optimal date locations resolution strategy communication assistant
Produce 1 3 5 9 7
optimal date
Handle preferred 1/3 1 3 7 7
locations
Parameterize conflict
resolution strategy 1/5 1/3 1 5 3
Multi-lingual
communication 1/9 1/7 1/5 1 1/3
Meeting assistant 1/7 1/7 1/3 3 1
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 16
AHP, Step 2: Evaluate how the criterion distributes among
all requirements
Criterion distribution = eigenvalues of comparison matrix
2.a Normalize columns: R’ij := Rij / i Rij
2.b Average accross lines: Contrib (Ri , Crit) = j R’ij / N
Produce Handle preferred Param. conflict Multi-lingual Meeting Relative
optim. date locations resolution strategy communication assistant value
Produce
optimal date 0.56 0.65 0.52 0.36 0.38 0.49
Handle preferred
locations 0.19 0.22 0.31 0.28 0.38 0.28
Parameterize conflict
resolution strategy 0.11 0.07 0.10 0.20 0.16 0.13
Multi-lingual 0.06 0.03 0.02 0.04 0.02 0.03
communication
Meeting assistant 0.08 0.03 0.03 0.12 0.05 0.07
20
PCR Low
priority
10
MA
MLC
10 20 30 40 50
Cost percentage
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 18
Requirements evaluation: summary
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 19
Requirements evaluation: summary (2)
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 20
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 21
Requirements Engineering
From System Goals
to UML Models
to Software Specifications
Chapter 4
Requirements Specification
& Documentation
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 23
Chap.1: RE products and processes
alternative options
Chap. 2: Chap. 3:
Elicitation Evaluation
techniques techniques
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 24
Specification & documentation:
as introduced in Chapter 1 ...
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 25
Requirements specification & documentation: outline
Free documentation in unrestricted natural language
Disciplined documentation in structured natural language
– Local rules on writing statements
– Global rules on organizing the Requirements Document
Use of diagrammatic notations
– System scope: context, problem, frame diagrams
– Conceptual structures: entity-relationship diagrams
– Activities and data: SADT diagrams
– Information flows: dataflow diagrams
– System operations: use case diagrams
– Interaction scenarios: event trace diagrams
– System behaviors: state machine diagrams
– Stimuli and responses: R-net diagrams
– Integrating multiple system views, multi-view spec in UML
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 26
Requirements specification & documentation: outline
(2)
Formal specification
– History-based specification
– State-based specification
– Event-based specification
– Algebraic specification
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 27
Free documentation
in unrestricted natural language
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 29
Disciplined documentation in structured NL:
local rules on writing statements (2)
Use decision tables for complex combinations of conditions
binary filling with truth values
input if-conditions
if
Train receives outdated acceleration command T T T T F F F F
Train enters station block at speed X mph T T F F T T F F
Preceding train is closer than Y yards T F T F T F T F
Full braking activated X X X
Alarm generated to station computer X X X X
output then-conditions
then
one case = AND-combination
Systematic, simple, additional benefits ...
– Completeness check: 2N columns required for full table
– Table reduction: drop impossible cases in view of dom props;
merge 2 columns differing only by single “T”, “F” => “-”
– Test cases for free (cause-effect coverage)
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 30
Disciplined documentation in structured NL:
local rules on writing statements (3)
Use standardized statement templates
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 31
Fit criteria make statements measurable
Grouping rules: Put in same section all items related to common factor
...
– system objective
– system component
– task
– conceptual object
– software feature
– ...
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 33
IEEE Std-830 template for organizing the RD
domain, scope,
purpose
1. Introduction of system-to-be
1.1 RD purpose
1.2 Product scope glossary of terms
1.3 Definitions, acronyms, abbreviations
1.4 References elicitation sources
1.5 Overview sw-environment boundary:
2. General Description interfaces with users,
devices, other sw
2.1 Product perspective
2.2 Product functions functionalities of software-to-be
2.3 User characteristics assumptions about users
2.4 General constraints development constraints
(hw limitations, implem platform, ...)
2.5 Assumptions & Dependencies
2.6 Apportioning of requirements environment assumptions
(subject to change)
3. Specific Requirements optional, deferable reqs
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 34
IEEE Std-830 template for organizing the RD (2)
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 36
Requirements specification & documentation: outline
Free documentation in unrestricted natural language
Disciplined documentation in structured natural language
– Local rules on writing statements
– Global rules on organizing the Requirements Document
Use of diagrammatic notations
– System scope: context, problem, frame diagrams
– Conceptual structures: entity-relationship diagrams
– Activities and data: SADT diagrams
– Information flows: dataflow diagrams
– System operations: use case diagrams
– Interaction scenarios: event trace diagrams
– System behaviors: state machine diagrams
– Stimuli and responses: R-net diagrams
– Integrating multiple system views, multi-view spec in UML
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 37
System scope: context diagrams
handbrake.Sw
Handbrake Car
Controller motor.Regime
button pedal
Pressed Pushed
Driver
system connection through
component shared phenomenon
(data, event)
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 38
System scope: problem diagrams
More detailed form of context diagram: highlights...
– the Machine among system components
– for shared phenomenon: who controls it, who monitors it
– requirements,
requirements components affected by them
Handbrake HC ! handbrake.Sw
Car
Controller C ! motor.Regime
constrains
DR ! {pedalPushed,
Machine
buttonPressed} {BrakeActivation,
{pedalPushed, BrakeRelease}
Driver buttonPressed
}
controlling Handbrake shall be ...
component refers to activated if the brake button is pressed,
released if the acceleration pedal is pushed
requirement
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 39
System scope: frame diagrams
Capture frequent problem patterns
– typed phenomena (C: causal, E: event, Y: symbolic)
– typed components (C: causal, B: biddable, X: lexical)
E.g. Simple Workpieces, Information Display, Commanded Behavior
(see book)
CM ! C1 Commanded
Control World
Machine CWC ! C2 Component C
OP! E4 causal
C3
event
Operator E4
B
Command-based
biddable
control rules
Commanded Behavior frame
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 40
Reusing problem frames
Candidate system-specific problem diagram can be obtained by
instantiation, in matching situations (cf. Chap. 2)
– under typing constraints
– mutiple frames reusable for same problem world
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 42
Entity-relationship diagram: example
role binary relationship entity
specialization
invitedTo Invitation Invites Meeting
Participant attribute
1..* 0..* Date
Name Location
Address constraintsFor constraintsFrom
1..*
Email Requesting
Constraints
excludedDates dateRange
Important preferredDates withWhom
Normal
Participant 1..1
Participant attributes of
Preferences Initiator
Email … relationship
Entity specialization:
specialization subclass of concept instances, further characterized by
specific features (attributes, relationships)
– by default, inherits attributes & relationships from superclass
– rich structuring mechanism for factoring out structural commonalities in superclasses
e.g. ImportantParticipant, with specific attribute Preferences
Inherits relationships Invitation, Constraints, attribute Address
(Email of ImportantParticipant inhibits default inheritance)
Diagram annotations:
annotations to define elements precisely
– essential for avoiding spec errors & flaws
e.g. annotation for Participant:
“Person expected to attend the meeting, at least partially, under some specific
role. Appears in the system when the meeting is initiated and disappears
when the meeting is no longer relevant to the system”
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 44
Requirements specification & documentation: outline
Free documentation in unrestricted natural language
Disciplined documentation in structured natural language
– Local rules on writing statements
– Global rules on organizing the Requirements Document
Use of diagrammatic notations
– System scope: context, problem, frame diagrams
– Conceptual structures: entity-relationship diagrams
– Activities and data: SADT diagrams
– Information flows: dataflow diagrams
– System operations: use case diagrams
– Interaction scenarios: event trace diagrams
– System behaviors: state machine diagrams
– Stimuli and responses: R-net diagrams
– Integrating multiple system views, multi-view spec in UML
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 45
Activities and data: SADT diagrams
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 46
SADT diagrams: actigram example
activity
meeting dateRange
meeting
Request Constraints
Handling Constraints
refinement
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 47
SADT diagrams: datagram example
controlling activity
consuming activity
Check
Validity
Merge Plan
Constraints meeting Meeting
Constraints
producing activity constraints
Repository data
resource
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 48
Information flows: dataflow diagrams
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 49
Dataflow diagram: example
input data
flow output data
copyOf flow
Initiator constraints Participant
meeting Request
invalid
Request Request
Ask meeting
Check validRequest
operation Notification
Constraints
Request
meeting
constraintRequest Collect Merge Constraints Determine
Constraints Constraints Schedule
Participant individual
Constraints participantConstraints
data repository
system component
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 50
System operations: use case diagrams
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 51
Use case diagram: example
environment
component operation interaction
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 54
Event trace diagram: example
interaction event attribute component instance
scheduleDetermination
notification (date, location) notification (date, location)
controls monitors
timeline interaction interaction
self-interaction
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 55
System behaviors: state machine diagrams
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 56
Example of state machine diagram:
meeting controlled by a meeting scheduler
initial state final state
[Unauthorized] RequestDenied
meeting
Request Gathering [Authorized] Validating
Meeting Meeting
Data KO-request Data
state OK-request
transition [All available]
Constraints Planning
Requested
event
[Conflicts] [No schedule
weakening conflicts] Determination
Request
state Resolving MeetingScheduled
notification
guard
MeetingNotified
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 57
State machine diagrams:
transitions and guards
Event occurrence is a sufficient condition for transition firing
– Event can be external stimulus (e.g. meetingRequest) or application of
internal operation (e.g. determineSchedule)
Guard = necessary condition for transition firing
– Item gets to target state ...
if item is in source state and event ev occurs
and only if guard condition is true
– Guarded transition with no event label:
fires as soon as guard gets true (= trigger condition)
Non-deterministic behavior: multiple outgoing transitions with same event
and no or overlapping guards
– often to be avoided for safety, security reasons
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 58
Scenarios and state machines
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 59
Concurrent behaviors and statecharts
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 60
Statechart example
closing
parallel variable
composition opening doorsState
doorsClosed doorsOpen
[speed = 0]
[speed = 0]
variable
trainSpeed
trainStart
trainStopped trainMoving
[doorsState
= ‘closed’]
Trace example:
< (doorsClosed, trainStopped); (doorsClosed, trainMoving);
(doorsClosed, trainStopped); (doorsOpen, trainStopped) >
Model-checking tools can generate counterexample traces leading to violation of
desired property (cf. chap. 5)
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 61
Stimuli and responses: R-net diagrams
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 62
R-net diagram: example
begin
input stimulus
meetingRequest
precedence
response operation
Check that initiator is authorized
Authorized Unauthorized
OK KO end
decision point
end end
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 63
Integrating multiple system views
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 65
Multi-view specification in UML
Class diagrams:
diagrams ER diagrams for structural view
Sequence diagrams:
diagrams ET diagrams for scenarios
State diagrams:
diagrams SM diagrams for behavioral view
History-based specification
State-based specification
Event-based specification
Algebraic specification
www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons 69