Documente Academic
Documente Profesional
Documente Cultură
avl@info.ucl.ac.be
May 2003
© A. van Lamsweerde
1
Goal-Oriented Requirements Engineering May 2003
– success: 16 %
– failure: 33 %
– so so: 51 %
(partial functionalities,
excessive costs, big delays)
www.standishgroup.com/chaos.html
© A. van Lamsweerde
2
Goal-Oriented Requirements Engineering May 2003
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
6
© A. van Lamsweerde
3
Goal-Oriented Requirements Engineering May 2003
WHY? goals
domain
knowledge
operationalization
requirements,
WHAT? assumptions
© A. van Lamsweerde
4
Goal-Oriented Requirements Engineering May 2003
WHY?
goals
domain
knowledge
operationalization
requirements,
WHAT? assumptions
responsibility
assignment
WHO?
9
u Broad scope
– 2 systems: current, to-be
– system-to-be = software + environment
– hybrid environments:
human organizations, policies
devices, physical laws
u Multiple concerns
– functional, quality, development → conflicts
u Multiple abstraction levels
– high-level goals, operational details
u Multiple expression means
– informal, graphical, formal
10
© A. van Lamsweerde
5
Goal-Oriented Requirements Engineering May 2003
u Multiple products
– report on current system: domain concepts, current
procedures, problems & deficiencies, opportunities
– alternative proposals for system-to-be
– development contract
– requirements on software-to-be in vocabulary of the
domain/clients
– software specifications in vocabulary of developers
u Multiple parties involved, different background
– organization stakeholders, domain experts, clients,
subcontractors, analysts, developers, ...
→ conflicting viewpoints
11
© A. van Lamsweerde
6
Goal-Oriented Requirements Engineering May 2003
TrainMoving measuredSpeed ≠0
DoorsClosed
E ∩S
TrainAtStation
E S2B doorsState = 'closed'
13
© A. van Lamsweerde
7
Goal-Oriented Requirements Engineering May 2003
TrainMoving measuredSpeed
M: monitored variables I: input data
Environment SoftwareToBe
DoorsClosed doorsState
C: controlled variables O: output results
Output Devices (e.g. actuators)
Req ⊆ M × C
Spec = Translation (Req) such that
Spec ⊆ I × O
{Spec, Dom} |= Req
15
© A. van Lamsweerde
8
Goal-Oriented Requirements Engineering May 2003
© A. van Lamsweerde
9
Goal-Oriented Requirements Engineering May 2003
requirements document =
main interface between multiple parties
19
© A. van Lamsweerde
10
Goal-Oriented Requirements Engineering May 2003
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
21
Goal orientation...
u addressed by IEEE-Std-830
22
© A. van Lamsweerde
11
Goal-Oriented Requirements Engineering May 2003
23
– "system":
software + environment
current system, system-to-be
24
© A. van Lamsweerde
12
Goal-Oriented Requirements Engineering May 2003
– high-level goals
strategic, coarse-grained, organization-wide
"more passengers served" (train control)
"effective access to state of the art" (library system)
– low-level goals
technical, fine-grained, design-specific
"acceleration command sent every 3 secs"
"reminder issued by end of loan period if no return"
25
© A. van Lamsweerde
13
Goal-Oriented Requirements Engineering May 2003
© A. van Lamsweerde
14
Goal-Oriented Requirements Engineering May 2003
29
(Yue'87)
30
© A. van Lamsweerde
15
Goal-Oriented Requirements Engineering May 2003
31
no trains on
same block
AND-refinement
32
© A. van Lamsweerde
16
Goal-Oriented Requirements Engineering May 2003
OR-refinement
33
34
© A. van Lamsweerde
17
Goal-Oriented Requirements Engineering May 2003
u Goal OR refinement ⇒
identification, validation, negotiation of
alternative requirements
(Dardenne'91, Mylopoulos'92, Chung'00)
u Goal OR assignment ⇒
35
no trains on
same block 36
© A. van Lamsweerde
18
Goal-Oriented Requirements Engineering May 2003
no train collision
In short:
goals provide the right abstractions
for RE processes of ...
– domain analysis
– elicitation, elaboration
– negotiation
– specification
– analysis
– documentation
– evolution
38
© A. van Lamsweerde
19
Goal-Oriented Requirements Engineering May 2003
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
39
Model-based RE
© A. van Lamsweerde
20
Goal-Oriented Requirements Engineering May 2003
Modeling goals
42
© A. van Lamsweerde
21
Goal-Oriented Requirements Engineering May 2003
SafeTransportation Soft
Maintain
BlockSpeedLimit ...
Avoid TrainsOnSameBlock DoorsClosedWhileMoving
44
© A. van Lamsweerde
22
Goal-Oriented Requirements Engineering May 2003
goals
functional non-functional
usability
satisfaction information ... security accuracy performance
... ...
45
© A. van Lamsweerde
23
Goal-Oriented Requirements Engineering May 2003
47
© A. van Lamsweerde
24
Goal-Oriented Requirements Engineering May 2003
© A. van Lamsweerde
25
Goal-Oriented Requirements Engineering May 2003
MorePassengers
goal EffectivePassengersTransportation Served
AND-refinement
sofGoal ...
RapidTransportation SafeTransportation MoreTrains
Running
Achieve
DoorsClosed BlockSpeed
TrainProgress Delay TrainCollision WhileMoving Limited
complete current S2B
AND-ref
OR
refinement
ProgressWhen SignalSet
GoSignal ToGo TrainsOn WorstCaseStopping
SameBlock DistanceMaintained
51
EffectiveAccessToStateOfTheArt
EffectiveLoanSystem EffectiveBiblioSearchSystem
...
Extensive Accurate
BookRequestSatisfied Coverage Classification
physLib E-Lib
CopyBorrowed CopyDueSoon E-bookAccess
Effective
WhenAvailable WhenNotAvailable BookSupply
LimitedLoan LimitedLoan
Amount Periods
52
© A. van Lamsweerde
26
Goal-Oriented Requirements Engineering May 2003
53
– by refinement (top-down):
asking HOW? questions about goals available
– by abstraction (bottom-up):
asking WHY? questions about...
lower-level goals
scenario episodes (cf. scenario modeling)
other operational material available
goal-oriented ≠ top-down !!
– by resolution of obstacles, conflicts (cf. below)
(van Lamsweerde'95, '98, '00) 54
© A. van Lamsweerde
27
Goal-Oriented Requirements Engineering May 2003
EffectivePassengersTransportation
HOW?
RapidTransportation SafeTransportation
DoorsClosed BlockSpeed
TrainProgress Delay TrainCollision WhileMoving Limited
current S2B
MoreTrains
Running
WHY?
ProgressWhen SignalSet
GoSignal ToGo TrainsOn WorstCaseStopping
SameBlock DistanceMaintained
55
SignalSet
– goal ... CopyBorrowed
WhenAvailable ToGo
© A. van Lamsweerde
28
Goal-Oriented Requirements Engineering May 2003
CopyBorrowed CopyDueSoon
WhenAvailable WhenNotAvailable
cf. case analysis:
(Case1 or Case2) ⇒ X equiv (Case1 ⇒ X) and (Case2 ⇒ X)
– OR-refinement introduces alternative systems to reach
parent goal
– AND -refinement by case introduces complementary,
conjoined subgoals within same system 57
e.g. DoorsClosedWhileMoving …
58
© A. van Lamsweerde
29
Goal-Oriented Requirements Engineering May 2003
BookRequestSatisfied
Def A book without any
copy available for loan
CopyDueSoon
WhenNotAvailable shall have a copy available
within 15 days for the
requesting borrower
59
(Darimont'96, Letier'02)
60
© A. van Lamsweerde
30
Goal-Oriented Requirements Engineering May 2003
u Refinement by case
– applicable when goal achievement space can be
partitioned into cases
GoalToBeEnsured
case-driven refinement
GoalToBeEnsured GoalToBeEnsured
WhenCase1 WhenCase2
– example of use
BookRequestSatisfied
case-driven refinement
CopyBorrowed CopyDueSoon
WhenAvailable WhenNotAvailable
61
u Refinement by milestone
– applicable when milestone states can be identified
on the way to the goal's target condition
TargetStateReached
milestone-driven refinement
MilestoneState TargetStateReached
Reached FromMilestone
– example of use
WorstCaseStoppingDistanceMaintained
ReceivedCommand
ExecutedByTrain
SafeAcceleration AccelerationSent SentCommand
Computed InTimeToTrain ReceivedByTrain
62
© A. van Lamsweerde
31
Goal-Oriented Requirements Engineering May 2003
UnrealizableGoalOnUnMonitorableCondition
resolve lack of monitorability
GoalOnMonitorable UnMonitorableCondition
Condition IffMonitorableCondition
UnrealizableGoalOnUnControllableCondition
resolve lack of controllability
GoalOnControllable UnControllableCondition
Condition IffControllableCondition
Example of use
DoorsClosedWhileMoving
resolve lack of monitorability
DoorsClosedWhileNonZeroSpeed MovingIff
NonZeroSpeed
requirement domain invariant
NurseInterventionWhenCriticalPuseRate
resolve lack of controllability
NurseIntervention AlarmIff
WhenAlarm CriticalPulseRate
expectation requirement
64
© A. van Lamsweerde
32
Goal-Oriented Requirements Engineering May 2003
65
© A. van Lamsweerde
33
Goal-Oriented Requirements Engineering May 2003
= goal-anchored ...
hazard analysis for safetyGoals
threat analysis for securityGoals
...
© A. van Lamsweerde
34
Goal-Oriented Requirements Engineering May 2003
MotorReversedIffMovingOnRunway
not (X1 and X2)
equiv
MovingOnRunway not X1 or not X2
MotorReversed
IffWheelsTurning IffWheelsTurning
obstruction
NOT NOT
MovingOnRunway MotorReversed
IffWheelsTurning IffWheelsTurning
OR-refinement
(complete)
MovingOnRunway WheelsTurning MotorReversed WheelsTurning
AndNot AndNot AndNot AndNot
WheelsTurning MovingOnRunway WheelsTurning MotorReversed
Warsaw obstacle
WheelsNotOut WheelsBroken Aquaplaning ...
69
WorstCaseStoppingDistanceMaintained
ReceivedCommand
ExecutedByTrain
SafeAcceleration AccelerationSent SentCommand
Computed InTimeToTrain ReceivedByTrain
...
ReceivedLate
70
© A. van Lamsweerde
35
Goal-Oriented Requirements Engineering May 2003
71
– goal weakening:
MovingOnRunwayIffWheelsTurning
→ MovingOnRunwayIff(WheelsTurning or ...)
72
© A. van Lamsweerde
36
Goal-Oriented Requirements Engineering May 2003
74
© A. van Lamsweerde
37
Goal-Oriented Requirements Engineering May 2003
u Example
G1: DoorsClosedBetweenStations
G2: DoorsOpenWhenAlarm
B: AlarmRaisedBetweenStations
(van Lamsweerde'98)
75
u Systematic detection:
– cf. formal technique below
u Resolution:
– cf. obstacle resolution tactics
but applied to boundary condition
u Particular case:
– binary conflict, with B = true:
{G1, Dom} |= ¬ G2
76
© A. van Lamsweerde
38
Goal-Oriented Requirements Engineering May 2003
EffectivePassengersTransportation
RapidTransportation SafeTransportation
DoorsClosed BlockSpeed
TrainProgress Delay TrainCollision WhileMoving Limited
current S2B
binary
conflict
77
EffectiveAccessToStateOfTheArt
EffectiveLoanSystem EffectiveBiblioSearchSystem
...
Extensive Accurate
BookRequestSatisfied Coverage Classification
physLib E-Lib
CopyBorrowed CopyDueSoon E-bookAccess
Effective
WhenAvailable WhenNotAvailable BookSupply
...
LimitedLoan LimitedLoan
Amount Periods
78
© A. van Lamsweerde
39
Goal-Oriented Requirements Engineering May 2003
⇓
goal-based model derivation
traceability
79
u Object reference:
G concerns Ob iff G's Def refers to Ob
(generally to its attributes)
DoorsClosed
WhileMoving
© A. van Lamsweerde
40
Goal-Oriented Requirements Engineering May 2003
u Goal responsibility:
G is assignable to Ag iff G can be realized by Ag
Train
OR-Assignment
Controller
DoorsClosed Train
WhileMoving Driver
Passenger
(Dardenne'93, Letier'02)
81
u Goal operationalization:
G is correctly operationalized by Op1, ..., Opn iff the specs
of Op1, ..., Opn are necessary & sufficient for ensuring G
{Spec(Op1), ..., Spec(Opn)} |= G completeness
DoorsClosed
WhileMoving
Operationalization
(complete)
© A. van Lamsweerde
41
Goal-Oriented Requirements Engineering May 2003
Covers doors
(Fickas'92, opening
Dardenne'93, entrance
Potts'95, doors
closing
Leite'97,
Sutcliffe'98, move
Haumer'98,
Rolland'98, arrival
van Lamsweerde'98 doors
Kaindl'00, opening
Anton'01)
83
u 2-button specification:
84
© A. van Lamsweerde
42
Goal-Oriented Requirements Engineering May 2003
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
86
© A. van Lamsweerde
43
Goal-Oriented Requirements Engineering May 2003
© A. van Lamsweerde
44
Goal-Oriented Requirements Engineering May 2003
u Association Ass
– instance = tuple of object instances linked,
each playing corresponding role
– Ass [O 1, ..., O n].Alive noted by predicate Ass (O1, ..., O n)
– multiplicities:
for source instance, min/max number of target instances
BUT ...
– mix prescriptive & descriptive assertions
– most assertions are not expressible by multiplicities
⇒ need for ...
domain invariants
"Non-zero train acceleration implies non-zero speed"
goals/requirements
"Acceleration commands shall be sent every 3 secs to the train"
90
© A. van Lamsweerde
45
Goal-Oriented Requirements Engineering May 2003
u Built-in associations
– specialization (IsA sub-classing with multiple inheritance)
– aggregation/composition (PartOf tupling)
91
Command
* CommandedSpeed: Speed
CommandedAccel : Acceleration
Driving
a block may hold
1 0 or 1 train
In 0..1 On 0..1 Block
Car Train
isOn holdsTrain
CurrentSpeed: Speed SpeedLimit: Speed
1..2 CurrentLoc: Location At
*
Door DoorsState: {open,...}
Station
0..1
...
© A. van Lamsweerde
46
Goal-Oriented Requirements Engineering May 2003
attribute of
Loan association
derived
attribute DateBorrowed: Date
TimeLimit: NumberWeeks
/ DueReturnDate: Date
Specifying objects
u Textual template
Entity Train
Def Any train circulating under control of the system-to-be.
The current location of a train is determined by the position of
its first car. ... etc ...
Has DoorsState: {open, closed}
Speed: SpeedRange
Accel: AccelerationRange
CurrentLoc: PositionRange
Capacity [0..1]: # Natural % optional & rigid attribute %
DomInvar Non-zero train acceleration implies non-zero speed. ...
[ FormalSpec ... ]
DomInit A train appearing in the S2B has doors closed, zero speed
and position XX.
[ FormalSpec ... ]
94
© A. van Lamsweerde
47
Goal-Oriented Requirements Engineering May 2003
96
© A. van Lamsweerde
48
Goal-Oriented Requirements Engineering May 2003
Assoc
X?
Loan
DateBorrowed
98
© A. van Lamsweerde
49
Goal-Oriented Requirements Engineering May 2003
99
Borrower BookCopy
Loan
Loan BookCopy
Borrower
100
© A. van Lamsweerde
50
Goal-Oriented Requirements Engineering May 2003
Generates
BorrowerRequest Loan
Activates
GoSignal Train
101
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
102
© A. van Lamsweerde
51
Goal-Oriented Requirements Engineering May 2003
u Agent (recall) :
– software (existing, S2B), device, human
– active object responsible for goal achievement (role)
S2B agent → goal = requirement
environment agent → goal = requirement
– alternative agent assignments
⇒ alternative system boundaries/proposals
© A. van Lamsweerde
52
Goal-Oriented Requirements Engineering May 2003
environment agent
CurrentSpeed
CurrentLoc
AccurateEstimate Tracking Train
OfSpeed&Position System
MeasuredSpeed
MeasuredLoc
Dependency
Monitoring
MeasuredSpeed
SafeCommand Speed&Accel MeasuredLoc
Message Controller Control
CommandedSpeed Command
CommandSent CommandedAccel
InTime
Performance
Responsibility Send
Command
105
Specifying agents
u Textual template
Agent Speed&AccelController
Def A S2B component that controls the speed and acceleration
of all trains in the system...
Has ...
DomInvar ...
106
© A. van Lamsweerde
53
Goal-Oriented Requirements Engineering May 2003
u Example:
Train/CurrentSpeed, Train
Train/CurrentLoc Train/ActuatedAcceleration
Tracking OnBoard
System Controller
Train/MeasuredSpeed, Command/
Speed&Accel
Train/MeasuredLoc CommandedAcceleration
Controller
108
© A. van Lamsweerde
54
Goal-Oriented Requirements Engineering May 2003
G: CurrentCondition (monitoredVariables)
⇒ eventually/always TargetCondition (controlledVariables)
109
DoorsClosedWhile
NonZeroSpeed
Tracking Train
System
OnBoard Train/DoorsState
Train/MeasuredSpeed
Controller
CopyBorrowed
WhenAvailable
Requesting[borrower,book]
Library Loan
Staff Loan[borrower,bookCopy] Manager
110
© A. van Lamsweerde
55
Goal-Oriented Requirements Engineering May 2003
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
111
u Operation Op:
– relation Op ⊆ InputState × OutputState
– Op applications define state transitions
– Op operationalizes ...
goal(s) assigned to S2B agent → software operation
goal(s) assigned to environment agent → manual/device operation
112
© A. van Lamsweerde
56
Goal-Oriented Requirements Engineering May 2003
u Goal operationalization:
G is correctly operationalized by Op1, ..., Opn iff the specs
of Op1, ..., Opn are necessary & sufficient for ensuring G
{Spec(Op1), ..., Spec(Opn)} |= G completeness
DoorsClosed
WhileMoving
Operationalization
(complete)
© A. van Lamsweerde
57
Goal-Oriented Requirements Engineering May 2003
115
DoorsClosedWhile Performance
NonZeroSpeed
Operationalization OnBoard
Controller
StopSignal TimeOut
Open Close
Doors Doors
116
© A. van Lamsweerde
58
Goal-Oriented Requirements Engineering May 2003
Specifying operations
u Textual template
Operation OpenDoors
Def The operation to control the opening of all train doors at once
Input Train, Output Train/ DoorsState
DomPre The train doors are closed
DomPost The train doors are open
ReqPre For DoorsClosedWhileNonzeroSpeed
The train speed is 0
ReqPre For SafeEntry&Exit
The train is at some station
ReqTrig For NoDelayToPassengers
The train has just stopped
[CausedBy StopSignal]
PerformedBy OnBoardController
117
© A. van Lamsweerde
59
Goal-Oriented Requirements Engineering May 2003
ReserveBookCopy precondition
<<extend>>
NotAvailable
<<extend>>
TooManyCopies
BorrowBookCopy RefuseLoan
<<include>>
ExtendLoan CheckForReservation
<<include>>
Borrower
ReturnBookCopy AddBookCopy
RemoveBookCopy
interaction Staff
UpdateCatalog
Browser
WhichBooksOnTopic? WhoBorrowedWhat?
boundary
LibrarySoftware
119
OpenDoors
...
...
Train CloseDoors
SendAccelerationCommand
Speed&Accel
Controller
OnBoardController
120
© A. van Lamsweerde
60
Goal-Oriented Requirements Engineering May 2003
121
u Scenario Sc =
– historical sequence of interaction events among agent
instances
– to illustrate some way of achieving some goal G: Sc is
a sub-history in the set of behaviors prescribed by G
– possibly composed of episodes (sub-scenarios)
– interaction corresponds to application of operation
by source agent, notified to target agent
u Specializations:
– Positive scenario: desired behavior
– Negative scenario: undesired behavior
122
© A. van Lamsweerde
61
Goal-Oriented Requirements Engineering May 2003
environment
: OnBoardTrain agent instance
Controller : Train : Passenger
software Arrival
agent instance
DoorsOpening
Entrance
interaction
time DoorsClosing
Start
Arrival
DoorsOpening
Exit
event
123
: LoanManager : CopyManager
: Borrower
BookRequest
(BorId, BookId)
LoanQtyOK ?
event (BorId)
attributes self-interaction
CpyAvailable ?
(BookId)
Reserved ?
(BookId)
OK-Available
(CopyId)
OK-Book Borrowed
(CopyId) (CopyId)
124
© A. van Lamsweerde
62
Goal-Oriented Requirements Engineering May 2003
© A. van Lamsweerde
63
Goal-Oriented Requirements Engineering May 2003
ev [guard]
St1 St2
DoorsOpening
[ AtStation
and Speed = 0 ]
doorsClosed doorsOpen
DoorsClosing
127
AccelerComnd
Moving
[ Acceler > 0]
AccelerComnd
[ Acceler > 0]
Stopped Accelerating
[ Speed = 0]
AccelerComnd AccelerComnd
[ Acceler ≤ 0] [ Acceler > 0]
Decelerating
AccelerComnd
[ Acceler ≤ 0]
128
© A. van Lamsweerde
64
Goal-Oriented Requirements Engineering May 2003
129
TrainState
SpeedState
AccelerComnd
Moving [ Acceler > 0]
AccelerComnd
[ Acceler > 0]
Stopped Accelerating
[ Speed = 0]
AccelerComnd AccelerComnd
[ Acceler ≤ 0] [ Acceler > 0]
synchronization:
train must be in Decelerating
Stopped state for
getting into
doorsOpen state AccelerComnd
[ Acceler ≤ 0]
Doors DoorsOpening
[ AtStation
and Speed = 0 ]
doorsClosed doorsOpen
DoorsClosing
130
© A. van Lamsweerde
65
Goal-Oriented Requirements Engineering May 2003
Goal model
FSMs class
Compilation
Object
model
Structuring
KAOS/SMs mapping
for goal-oriented animation
FSMs instance 131
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
132
© A. van Lamsweerde
66
Goal-Oriented Requirements Engineering May 2003
NoTrainSameBlock
133
NoTrainSameBlock
2. Domain analysis:
derive/structure
objects
On
Train Block
0:1
134
© A. van Lamsweerde
67
Goal-Oriented Requirements Engineering May 2003
NoTrainSameBlock SafeComd
2. Domain analysis:
derive/structure
objects
On
Train Block
0:1
135
NoTrainSameBlock SafeComd
2. Domain analysis:
derive/structure
objects
On 4. S2B analysis:
Train Block
0:1 enriched objects
Driving Command from new goals
136
© A. van Lamsweerde
68
Goal-Oriented Requirements Engineering May 2003
NoTrainSameBlock SafeComd
2. Domain analysis:
derive/structure
objects
On 4. S2B analysis: SafeAcceler
Train Block
0:1 enriched objects
Driving Command from new goals
5. Responsibility analysis:
agent OR-assignment
137
NoTrainSameBlock SafeComd
2. Domain analysis: 1-5. Obstacle & conflict
derive/structure analysis
objects
On 4. S2B analysis: SafeAcceler
Train Block
0:1 enriched objects
Driving Command from new goals
5. Responsibility analysis:
agent OR-assignment
138
© A. van Lamsweerde
69
Goal-Oriented Requirements Engineering May 2003
NoTrainSameBlock SafeComd
2. Domain analysis: 1-5. Obstacle & conflict
derive/structure analysis
objects
On 4. S2B analysis: SafeAcceler
Train Block
0:1 enriched objects
Driving Command from new goals
5. Responsibility analysis:
agent OR-assignment
Send :OBC
Command
6. Operationalization
& behavior analysis
OnBoardController
139
SafeTransportation
NoTrainSameBlock SafeComd
On SafeAcceler
Train Block
0:1
Driving Command
Send :OBC
At any time:
Command abstraction
(e.g. from scenarios)
OnBoardController
140
© A. van Lamsweerde
70
Goal-Oriented Requirements Engineering May 2003
PumpOnWhenHighWater PumpOffWhenLowWater
EvacuationWhenPumpFailure EvacuationWhenCriticalGasLevel
AlarmWhenCriticalGasLevel
Explosion
OperationsLogged
PumpOffWhenCriticalMethane
142
© A. van Lamsweerde
71
Goal-Oriented Requirements Engineering May 2003
Sump Pump
WaterLevel: Depth HasPump Motor: {on, off}
Sump Pump
WaterLevel: Depth HasPump Motor: {on, off}
Failure: Bool
Inside
Miner Mine Contains
... ...
143
MethaneAlarm
GasAlarm
AirflowAlarm ...
COAlarm Raising
Operator
Informed
144
© A. van Lamsweerde
72
Goal-Oriented Requirements Engineering May 2003
StartUp Operating
NotOperating
Stop NotPumping
Failure pumpProblem
Pumping
145
PumpFailure
WHY ?
PumpOnWhenNoWater
PumpOffWhenLowWater
OverflowedMine
PumpOnWhenHighWater WaterPumpedWhenPumpOn
146
© A. van Lamsweerde
73
Goal-Oriented Requirements Engineering May 2003
PumpOnWhenHighWater
HOW ?
milestone-driven refinement
HighWaterDetected PumpOnWhenHighWaterDetected
PumpSwitchOn PumpOnWhenSwitchOn
WhenHighWaterDetected
147
PumpOnWhenHighWater
HighWaterDetected PumpOnWhenHighWaterDetected
Pump Pump
Controller
Actuator
© A. van Lamsweerde
74
Goal-Oriented Requirements Engineering May 2003
Pump
Controller
HighWater ...
Sensor
SwitchPumpOff
LowWater
Sensor PumpController
149
150
© A. van Lamsweerde
75
Goal-Oriented Requirements Engineering May 2003
: WaterLevel : PumpController
Sensor : PumpActuator
WaterTooHigh
PumpOn
OK-On
WaterOK
pumpOff
OK-Off
151
PumpControllerState
CtrlPumpState
WaterTooHigh
PumpIs [LowGas] PumpIs
Off WaterOK On
GasTooHigh
CtrlGasAlarmState
Gas GasTooHigh Gas
Alarm Alarm
Off GasAlrmReset On
CtrlFloodAlarmState
PumpFailure
Flood [HighWater] Flood
Alarm Alarm
Off FloodAlrmReset On
(Whittle
2000) 152
© A. van Lamsweerde
76
Goal-Oriented Requirements Engineering May 2003
Outline
u Requirements engineering
u Goal-oriented requirements engineering
u Building rich system models for RE
– Modeling & specification techniques
The goal model
The object model
The agent model
The operation model
– A goal-oriented RE method in action
u From requirements to software specs
u Conclusion
153
Environment SoftwareToBe
DoorsClosed doorsState
C: controlled variables O: output results
Output Devices (e.g. actuators)
© A. van Lamsweerde
77
Goal-Oriented Requirements Engineering May 2003
155
u Example:
– Req:
MotorReversed ⇔ MovingOnRunway
– TargetSpec:
Reverse = ‘enabled’ ⇔ WheelPulses = ‘on’
– accuracyGoals:
MovingOnRunway ⇔ WheelPulses = ‘on’
expectation on wheelSensor
156
© A. van Lamsweerde
78
Goal-Oriented Requirements Engineering May 2003
Conclusion
157
Conclusion (2)
158
© A. van Lamsweerde
79
Goal-Oriented Requirements Engineering May 2003
Conclusion (3)
159
Other developments
160
© A. van Lamsweerde
80
Goal-Oriented Requirements Engineering May 2003
© A. van Lamsweerde
81