Tải bản đầy đủ (.ppt) (60 trang)

Chương 8: Modeling System Objectives with Goal Diagrams ppsx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (1.09 MB, 60 trang )

www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons
Building System Models for RE
Building System Models for RE
Chapter 8
Modeling System Objectives
with Goal Diagrams
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 2
Intentional view of the modeled system
Chap.8: Goals
Chap.8: Goals
Chap.9: Risks
Chap.10: Conceptual objects
Chap.11: Agents
on what?
why
why


?
?
who ?
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 3
Goals as seen in Chapter 7

Prescriptive statements of intent the system should satisfy
through cooperation of its agents

formulated in terms of problem world phenomena

at various levels of abstraction/granularity


Can be negotiated, weakened, prioritized (unlike domain props)

The finer-grained a goal, the fewer agents required for its
satisfaction

requirements, expectations: single-agent goals

Behavioral (Achieve/Maintain) goals, soft goals

Functional, quality, development goals
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 4
A goal model shows contribution links
and leafgoal assignments
AND-refinement
OR-
refinement
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 5
Goal modeling: outline

Goal features as model annotations

Goal refinement

Capturing conflicts among goals

Connecting the goal model with other system views

Capturing alternative options

Goal diagrams as AND/OR graphs


Documenting goal refinements & assignments with
annotations

Building goal models: heuristic rules & reusable patterns
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 6
Goal features are specified in model annotations
Goal Maintain [DoorsClosedWhileMoving]
Def All train doors shall be kept closed at any time
when the train is moving
[ FormalSpec in temporal logic for analysis,
not
not in this chapter ]
[ Category Safety ]
[ Priority Highest ]
[ Source From interview with railway engineer X ]
DoorsClosedWhileMoving
precise definition
goal
features
annotation
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 7
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 8
Goal refinement

An
AND-refinement
AND-refinement of goal
G
into subgoals

G
1
, , G
n
states
that
G
can be satisfied by satisfying
G
1
, , G
n
The set {
G
1
, , G
n
} is called
refinement
refinement of
G
Subgoal
G
i

is said to
contribute positively
contribute positively to
G
Achieve [BookRequestSatisfied]

Achieve
[ CopyBorrowed
If Available]
Achieve [CopyDueSoon
If Not Available]
Def In case a requested book has no copy available for check out,
a copy of that book shall be made available within 2 weeks
for check out by the requesting patron.
goal
AND-refinement
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 9
AND-refinements should be complete

{
G
1
, , G
n
} is a
complete AND-refinement
complete AND-refinement of
G
iff satisfying
G
1
, , G
n
is
sufficient
for satisfying

G
in view of known domain
properties
{
G
1
, , G
n
,
Dom} |=
G
Achieve [BookRequestSatisfied]
Achieve
[ CopyBorrowed
If Available]
Achieve [CopyDueSoon
If Not Available]
complete AND-refinement
(claim)
Achieve[ CopyReserved]
Maintain[AvailabilityEnforced]
Achieve[AvailabilityNotified]
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 10
Complete AND-refinements

Getting complete refinements of behavioral goals is essential
for
requirements completeness
requirements completeness


Domain properties
are often used for arguing about complete
refinements
– classified as

domain invariants
domain invariants: known to hold in every state
"train doors are either open or closed"

domain hypotheses
domain hypotheses: assumed to hold in specific states
"railway tracks are in good conditions "

attached to conceptual objects in the object model
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 11
Domain properties in AND-refinements
DoorsClosedWhileMoving
Moving Iff
NonZeroSpeed
DoorsClosedWhileNonZeroSpeed
domain
invariant
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 12
AND-refinements should also be
consistent and minimal

Consistent
Consistent: subgoals
G
1

, , G
n
and domain properties in
Dom
may
not contradict each other:
{
G
1
, , G
n
,
Dom} |≠ false
(any behavior would be permitted from false)

Minimal
Minimal: if one subgoal
G
j
is missing, the parent goal is no longer
necessarily satisfied:
{
G
1
, , G
j-1
, G
j+1
, , G
n

,
Dom} |≠
G

(to avoid unnecessarily restrictive requirements or expectations)
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 13
Refinement trees

Goals are recursively refinable

Leaf nodes = goals assignable to single system agents
Maintain [DoorsClosedWhileMoving]
Moving Iff NonZeroSpeed
Maintain [DoorsClosedWhileNonZeroSpeed]
Maintain [DoorsStateClosed
If NonZeroMeasuredSpeed]
MeasuredSpeed
= PhysicalSpeed
TrainController
software
agent
environment
agent
responsibility assignment
DoorsActuator
requirement
SpeedSensor
DoorsClosed Iff
DoorsStateClosed
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 14

Refinement trees visualize satisfaction arguments
Avoid [TrainCollisions]
SafeTransportation
EffectivePassengersTransportation
RapidTransportation
FastJourney
DoorsClosed
WhileMoving
FastRunToNextBlock
If GoSignal
SignalPromptly
SetToGo
SpeedBelow
BlockLimit
Avoid [TrainsOn
SameBlock]
HighFrequency
OfTrains

SignalSafely
KeptToStop

TransportationCapacity
Increased


TrainStoppedAtBlockEntry
If StopSignal
FastEntry&Exit
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 15

Chaining satisfaction arguments into
argumentation trees
To show how requirements ensure higher-level concerns, and
recursively
MotorRaising →
HandBrakeReleased
motor.Regime = ‘up’ →
handBrakeCtrl = ‘off’
motor.Regime = ‘up’
↔ MotorRaising
handBrakeCtrl = ‘off’
↔HandBrakeReleased
req
req
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 16
Chaining satisfaction arguments into
argumentation trees
To show how requirements ensure higher-level concerns, and
recursively
HandBrakeReleased
↔ MotorRaising
HandBrakeReleased
→ MotorRaising
MotorRaising →
HandBrakeReleased
motor.Regime = ‘up’ →
handBrakeCtrl = ‘off’
motor.Regime = ‘up’
↔ MotorRaising
handBrakeCtrl = ‘off’

↔HandBrakeReleased
req
req
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 17
Chaining satisfaction arguments into
argumentation trees
To show how requirements ensure higher-level concerns, and
recursively
HandBrakeReleased ↔ DriverWantsToStart
HandBrakeReleased
↔ MotorRaising
MotorRaising ↔
AccelerPedalPressed
AccelerPedalPressed
↔ DriverWantsToStart
HandBrakeReleased
→ MotorRaising
MotorRaising →
HandBrakeReleased
motor.Regime = ‘up’ →
handBrakeCtrl = ‘off’
motor.Regime = ‘up’
↔ MotorRaising
handBrakeCtrl = ‘off’
↔HandBrakeReleased
req
req
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 18
Capturing potential conflicts among goals


Goals
G
1
, , G
n
are
divergent
divergent in
Dom
if boundary condition
B
can
be found making them unsatisfiable together:
{
B
B
,
G
1
, , G
n
,
Dom} |= false

Can be captured for later analysis (cf. Chap. 3, 16, 18)
Avoid [TrainCollisions]
SafeTransportation
FastJourney
DoorsClosed
BetweenStations

SignalPromptly
SetToGo
SpeedBelow
BlockLimit
Avoid [TrainsOn
SameBlock]
SignalSafely
KeptToStop



Evacuation
WhenAlarm
DoorsOpenWhen
Alarm&Stopped
RapidTransportation

potential conflict
FastRunToNextBlock
If GoSignal
TrainStoppedAtBlockEntry
If StopSignal
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 19
Connecting the goal model with
other system views
Interface links
Interface links relate goals to other sub-models ⇒
traceability

Responsibility

Responsibility: instances of
Agent
are the only ones to restrict
behaviors to satisfy
Goal

Obstruction
Obstruction: satisfaction of
Obstacle
inhibits satisfaction of
Goal

Concern
Concern: specification of
Goal
refers to
Object

0perationalization
0perationalization: spec of
Operations
ensures satisfaction of
Goal

Coverage
Coverage: behaviors prescribed by Goal cover
Scenario
Goal
Agent
Goal

Obstacle
Goal
Object
Goal
Oper1
Oper2
Goal
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 20
Goal modeling: outline

Goal features as model annotations

Goal refinement

Capturing conflicts among goals

Connecting the goal model with other system views

Capturing alternative options

Goal diagrams as AND/OR graphs

Documenting goal refinements & assignments with
annotations

Building goal models: heuristic rules & reusable patterns
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 21
Capturing options: alternative refinements

An

OR-refinement
OR-refinement

of goal
G
into refinements
R
1
, , R
m
states
that
G
can be satisfied by satisfying all subgoals from any of
the alternative refinements
R
i

Alternative goal refinements yield different system proposals
(variants)

Pros/cons to be evaluated against soft goals for selection of
best option

Avoid [TrainCollisions]
Avoid [TrainsOn
SameBlock]
Maintain [WorstCase
StoppingDistance]


Maintain [ComprehensiveLibraryCoverage]
Maintain [Effective
BookSupply]
Maintain [AccessTo
ForeignDigitalLibrary
]

alternative
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 22
Capturing options: alternative assignments

An
OR-assignment
OR-assignment

of goal
G
to agents
A
1
, , A
m
states that
G
can be
satisfied by behavioral restrictions of any of the alternative agents
A
i

Alternative assignments yield different system proposals

(e.g. different degrees of automation)

Pros/cons to be evaluated against soft goals for selection of best
option
FastJourney
FastRunToNextBlock
If GoSignal
SignalPromptly
SetToGo
TrainController
TrainDriver
EffectiveBiblioSearch
AccurateBook
ClassificationByTopic
Comprehensive
LibraryCoverage
AutoClassifier
LibraryStaff

alternative assignments
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 23
Goal diagrams as AND/OR graphs

AND/OR graph shows how goal nodes
contribute
contribute to each other

roots
roots = high-level system goals
• functional or non-functional


behavioral or soft

leaves
leaves = requirements or expectations
• assignable to single agents

an
AND-refinement
AND-refinement links a parent goal to set of conjoined subgoals

an
OR-refinement
OR-refinement links a parent goal to a set of alternative AND-
refinements => alternative system options

soft goals in the graph are used to select preferred options

Generally a directed acyclic graph, not a tree

multiple roots (e.g. functional, non-functional goals)

a goal may contribute to multiple parent goals
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 24
Goal diagrams as AND/OR graphs (2)
NoTrainCollision
SafeTransportation
EffectivePassengersTransportation
RapidTransportation
FastJourney

DoorsClosed
WhileMoving
FastRunWhen
GoSignal
SignalSetTo
GoPromptly
BlockSpeed
Limited
system-as-is
to-be
WorstCaseStopping
DistanceMaintained
NoTrainsOn
SameBlock
HighFrequency
AND-refinement
OR-refinement
www.wileyeurope .com/college/van lamsweerde Chap.8: Modeling System Objectives © 2009 John Wiley and Sons 25
EffectiveBiblioSearchSystem
EffectiveAccessToStateOfTheArt
EffectiveLoanSystem
BookRequestSatisfied
Extensive
Coverage
Effective
BookSupply
E-bookAccess
CopyBorrowed
WhenAvailable
Copy

Reserved
Accurate
Classification
physLib
E-Lib

CopyDueSoon
WhenNotAvailable
Availability
Enforced
Availability
Notified
LimitedLoan
Amount
LimitedLoan
Periods
Goal diagrams as AND/OR graphs (3)

×