Professional Documents
Culture Documents
Requirements Engineering From System Goals To UML Models To Software - Chapter 4
Requirements Engineering From System Goals To UML Models To Software - Chapter 4
Requirements Engineering
From System Goals
to UML Models
to Software Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 1
Fundamentals of RE
Chapter 4
Requirements Specification
& Documentation
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 2
© A. van Lamsweerde 1
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
alternative options
Chap. 2: Chap. 3:
Elicitation Evaluation
techniques techniques
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 3
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 4
© A. van Lamsweerde 2
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 5
Formal specification
– History-based specification
– State-based specification
– Event-based specification
– Algebraic specification
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 6
© A. van Lamsweerde 3
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
Free documentation
in unrestricted natural language
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 8
© A. van Lamsweerde 4
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 10
© A. van Lamsweerde 5
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
Fit criteria make statements measurable
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 11
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 12
© A. van Lamsweerde 6
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 14
© A. van Lamsweerde 7
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 15
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 16
© A. van Lamsweerde 8
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
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.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 17
Handbrake HC ! handbrake.Sw
Car
Controller C ! motor.Regime
constrains
Machine DR ! {pedalPushed,
buttonPressed} {BrakeActivation,
{pedalPushed, BrakeRelease}
Driver buttonPressed}
© A. van Lamsweerde 9
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
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.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 19
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 20
© A. van Lamsweerde 10
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 22
© A. van Lamsweerde 11
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 24
© A. van Lamsweerde 12
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 26
© A. van Lamsweerde 13
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
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.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 27
© A. van Lamsweerde 14
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
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.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 29
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 30
© A. van Lamsweerde 15
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 31
© A. van Lamsweerde 16
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 33
scheduleDetermination
notification (date, location) notification (date, location)
controls monitors
timeline interaction interaction
self-interaction
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 34
© A. van Lamsweerde 17
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
notification
guard
MeetingNotified
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 36
© A. van Lamsweerde 18
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 38
© A. van Lamsweerde 19
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
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.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 40
© A. van Lamsweerde 20
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 41
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.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 42
© A. van Lamsweerde 21
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 44
© A. van Lamsweerde 22
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
Diagrammatic notations:
pros & cons
Formal declaration of different system facets
+ informal annotations of properties for higher precision
Graphical declaration =>
overview & structuring of important aspects
easy to understand, communicate
surface-level analysis, supported by tools (e.g. query engines)
Semi-formal specification =>
language semantics may be vague (different interpretations)
only surface-level aspects formalized, not item properties
limited forms of analysis
functional and structural aspects only
=> formal specification needed for mission-critical aspects
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 46
© A. van Lamsweerde 23
Axel van Lamsweerde
Requirements Engineering: From System Goals to UML Models to Software
Specifications
History-based specification
State-based specification
Event-based specification
Algebraic specification
www.wileyeurope .com/college/van lamsweerde Chap.4: Requirements Specification & Documentation © 2009 John Wiley and Sons 48
© A. van Lamsweerde 24