27
www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Fundamentals of RE Chapter 7 Goal Orientation in RE

Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

Embed Size (px)

DESCRIPTION

3 lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons Goal orientation in RE: outline  What are goals?  The granularity of goals and their relationship to requirements and assumptions  Goal types and categories – Types of goals: behavioral goals vs. soft goals – Goal categories: functional goals vs. non-functional goals  The central role of goals in the RE process

Citation preview

Page 1: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1

Fundamentals of REFundamentals of RE

Chapter 7Goal Orientation in RE

Page 2: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

2www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

System objectives are pervasive in RE

As seen before ...– the WHY dimension of RE (Chap. 1)– understanding objectives in system-as-is, eliciting objectives of

system-to-be (Chap. 2)– analyzing conflicting objectives, analyzing risks of not meeting

critical objectives, evaluating options against objectives (Chap. 3)

– specifying the rationale for specific requirements (Chap. 4)– checking that system objectives are satisfied by operational

requirements (Chap. 5)– documenting satisfaction arguments & backward traceability to

system objectives (Chap. 6)

GoalsGoals as key abstraction for driving the RE process

Page 3: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

3www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal orientation in RE: outline

What are goals?

The granularity of goals and their relationship to requirements and assumptions

Goal types and categories

– Types of goals: behavioral goals vs. soft goals

– Goal categories: functional goals vs. non-functional goals

The central role of goals in the RE process

Page 4: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

4www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

What are goals?

GoalGoal = prescriptive statement of intent the system should satisfy through cooperation of its agents

– "prescriptive statement": in operative mood “shall”, “should”, “must”, ...

e.g. “Train doors shall be closed while the train is moving”

“Loan periods shall be limited to 2 weeks”

– formulated in terms of problem world phenomena

– "system": system-as-isas-is, system-to-beto-be software + environment

– "agent": active system component responsible for goal satisfaction

Page 5: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

5www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal satisfaction requires agent cooperation

 Maintain [SafeTransportation] on-board train controller ++ tracking system + + station computer

++ passenger + + train driver ++ ...

Achieve [BookCopyReturnedToShelves] patron ++ staff + + library software

Agent = role, rather than individual– must restrict its behavior to meet its assigned goals– must be able to monitor/control phenomena involved in

assigned goals

Agent types– software (software-to-be, legacy software, foreign software)– device (sensor, actuator, ...)– human

Page 6: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

6www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goals vs. domain properties

Domain property Domain property = descriptive statement about environment

– indicative mood: “is", “are", etc --not prescriptive

– e.g. “If train doors are open, they are not closed” “A borrowed book is not available for other patrons”

The distinction between goals & domain properties is essential for RE ...– goals can be negotiated, weakened, prioritized

– domain properties cannot

– both required in requirements documentation

Page 7: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

7www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

The granularity of goals

Goals can be stated at different levels of abstraction

– Higher-levelHigher-level goals: strategic, coarse-grained

"50% increase of transportation capacity"

”Effective access to state of the art"

– Lower-levelLower-level goals: technical, fine-grained

”Acceleration command sent every 3 secs"

”Reminder issued by end of loan period if no return"

The finerfiner-grained a goal, the fewerfewer agents required for its satisfaction

Page 8: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

8www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goals, requirements & expectations

RequirementRequirement = goal assigned to single agent in software-to-be

"doorState = ‘closed’ while measuredSpeed0" TrainController

”Acceleration command sent every 3 secs” StationComputer

ExpectationExpectation = goal assigned to single agent in environment

– prescriptive assumption on environment

– cannot be enforced by software-to-be (unlike requirements)

  ”Train left when doors open at destination” Passenger

Page 9: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

9www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Statement typology revisited in the presence of goals

Cf. general terminology introduced in Chap. 1 ...– software requirement requirement – system requirement goal involving multiple agents incl. software-to-be– (prescriptive) assumption expectation – (descriptive) assumption hypothesis

Statement

Prescriptive Descriptive

Multi-agent goal

Subtype

Single-agent goal

Requirement Expectation Goal

Domain property Domain hypothesis

Page 10: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

10www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal types

Goal

Behavioral goal Soft goal

Maintain/AvoidAchieve

Subtype

BehavioralBehavioral goals: prescribe behaviorsvs.

SoftSoft goals: state preferences among alternative behaviors

Page 11: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

11www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal types: behavioral goals

Prescribe intended system behaviors declaratively

– implicitly define maximal sets of admissible agent behaviors

Can be satisfied in a clear-cut sense: YES or NO– goal satisfaction, formal analysis

Used for building operation models to meet them

”Worst-case stopping distance maintained”

“Reminder sent if book not returned on time”

Page 12: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

12www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Behavior goals prescribe sets of desired behaviors

DoorsClosedWhileMoving

movingclosed

stoppedclosed

movingclosed

stoppedclosed

stoppedopen

Page 13: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

13www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Behavioral goals: subtypes and specification patterns

AchieveAchieve [TargetCondition]:[ifif CurrentCondition thenthen] sooner-or-latersooner-or-later TargetCondition

AchieveAchieve [BookRequestSatisfied]: ifif a book is requested then sooner-or-later then sooner-or-later a copy of the book is borrowed by the requesting patron

AchieveAchieve [FastJourney]: ifif train is at some platform then within 5 minutesthen within 5 minutes it is at next platform

CurrentCondition

TargetCondition

time

…… …

Achieve

Page 14: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

14www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Behavioral goals: subtypes and specification patterns (2)

MaintainMaintain [GoodCondition]: [ifif CurrentCondition thenthen] alwaysalways GoodCondition

alwaysalways (ifif CurrentCondition thenthen GoodCondition)

MaintainMaintain [DoorsClosedWhileMoving]:alwaysalways (ifif a train is moving thenthen its doors are closed)

MaintainMaintain [WorstCaseStoppingDistance]:alwaysalways (ifif a train follows another thenthen its distance is sufficient to allow the other to stop suddenly)

time

CurrentCondition

GoodCondition…

GoodCondition

GoodCondition

Maintain

Page 15: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

15www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Behavioral goals: subtypes and specification patterns (3)

Accuracy goals are usually of type MaintainMaintainMaintain [AccurateBookClassification]:

ifif a book is registered in the library directory thenthen alwaysalways its keyword-based classification reflects its covered topics

AvoidAvoid [BadCondition]: dual of Maintain ...[ifif CurrentCondition thenthen] nevernever BadCondition

Avoid Avoid [BorrowerLoansDisclosed]: nevernever patron loans disclosed to other patrons

Many security goals are Avoid goals

Page 16: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

16www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal types: soft goals

Capture preferences among alternative behaviors

Cannot be satisfied in clear-cut sense: moremore satisfied in one option, lessless satisfied in another– goal satisficing, qualitative analysis

Used for comparing options to select preferred

Often take the form MaximizeMaximize / MinimizeMinimize, IncresaseIncresase / ReduceReduce, ImproveImprove, ...

“Stress conditions of air traffic controllers shall be reduced” “The workload of library staff shall be reduced”

“The bibliographical search engine shall be usable by non-CS students”

Page 17: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

17www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal categories

Classification into functionalfunctional, qualityquality, developmentdevelopment goals

Categories may overlap; boundary not always clear – unlike goal types

Functional goalsFunctional goals– prescribe intended services to be provided by the system

– used for building operational models of such services

use cases, state machines (see later)

e.g. “Passengers transported to their destination” “Train acceleration computed”

”Book request satisfied"

Page 18: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

18www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal categories: non-functional goals QualityQuality goals (not to be confused with soft goals, cf. book p. 271)

– about quality of service ...• security "info about other patrons kept confidential"

• safety "worst-case stopping distance maintained"

• accuracy ”measured speed = physical speed” ”book displayed as available iffiff there is a copy in shelves"

• performance ”acceleration command sent every 3 seconds”

• usability

• interoperability, ...

DevelopmentDevelopment goals– about quality of development ...

cost, deadline, variability, maintainability, reusability, etc.

Page 19: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

19www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Goal categories (2)

goal

functionalfunctional

satisfaction information security

qualityquality

accuracy

confidentiality

... performance

integrity

usability

time space... ...

... ...

availability

developmentdevelopment

safety

...

• See book, Fig. 7.5 p. 269• Helpful for elicitingeliciting overlooked application-specific instances through taxonomy browsing

Page 20: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

20www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Using goal types & categories

Lightweight specification patterns

Heuristic rules for elicitation, validation, reuse, conflict management, ...

"Is there any conflict between Information goals and Confidentiality goals?"

"Confidentiality goals are Avoid goals on sensitive info"

"Safety goals have highest priority in conflict resolution"

More specific types & categories more specific heuristics

Page 21: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

21www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

The central role of goals in the RE process

Goal refinement/abstraction as structuring mechanism– shows contribution links among goals– drives elaboration of reqs (subgoals)

– provides rationale for reqs (parent goals)

– rich traceability: strategic objectives technical requirements– can be used to structure reqs document (cf. chap. 16)

Maintain [SafeTransportation]

Avoid [TrainCollision] Maintain [DoorsClosedWhileMoving]

Avoid [TrainsOnSameBlock]

AND

Maintain [SpeedBelowBlockLimit]

Maintain [DoorsStateClosedWhileNonZeroSpeed]

Contribution

Page 22: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

22www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

The central role of goals in the RE process (2)

Goals support chains of satisfaction arguments (cf. Chap. 1)

ReqReq, Exp, Dom G G , SubG SubG, Exp, Dom GG

“in view of domain properties in Dom, the reqs/subgoals in Req/SubG ensure that goal G is satisfied under expectations in Exp”

R: doorsState = ‘closed’ ifif measuredSpeed 0 E: Doors are closed iffiff doorsState = ‘closed’ ( door actuators)

measuredSpeed = physicalSpeed ( speedometer)

D: Train is moving iff physicalSpeed 0

G: Doors are closed if if train is moving

Page 23: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

23www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

The central role of goals in the RE process (3)

Goals provide a criterion for reqs completenesscompleteness

set REQ of requirements is complete if for all goals G :

{REQ, Exp, Dom} G

Goals provide a criterion for reqs relevancerelevancer in REQ is pertinent if for some G :

r is used in argument {REQ, Exp, Dom} G

Page 24: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

24www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

The central role of goals in the RE process (4)

Goal OROR-refinement capture of alternative options

Maintain [Sa fe Tra nspo rtation]

A void [ Train Collis io n] …

A void [ TrainsO nSameBlock]

A N D

Contrib ution

OR

Maintain [W ors tC aseStop ping Dis tance]

Page 25: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

25www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

The central role of goals in the RE process (5)

Support for evolution management higher-level goals more stable concerns

multiple system versions within single model ...

• common parent goals

• different OR-branches

Roots for conflict detection & resolution (cf. Chap. 16)

Anchors for risk management (cf. Chap. 9)

Page 26: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

26www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

Avoid frequent misconceptions

Goal-oriented top-down– bottom-up elaboration as well (goal abstraction)

Goal-oriented agent-oriented, scenario-oriented

the magic RE triangle:

goalgoalss

scenariscenariosos agents agents

interaction

responsibilitycoverage

Page 27: Www.wileyeurope.com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons 1 Fundamentals of RE Chapter 7 Goal Orientation in

27www.wileyeurope .com/college/van lamsweerde Chap.7: Goal Orientation in RE © 2009 John Wiley and Sons

:Passenger:Train:Controller

entrance

doorsopening

doorsclosing

move

arrival

doorsopening

arrival

Scenarios as concrete vehicles for goal elicitation/validation

G coverscovers Sc: Sc is subhistory in set of behaviors prescribed by G

DoorsClosedWhileMoving

easy to get from or validate with stakeholders