67
1 www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons Requirements Engineering From System Goals to UML Models to Software Specifications Axel Van Lamsweerde

1 lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons Requirements Engineering From System Goals

Embed Size (px)

Citation preview

Page 1: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

1www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Requirements EngineeringFrom System Goals

to UML Models to Software Specifications

Axel Van Lamsweerde

Page 2: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

2www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Fundamentals of REFundamentals of RE

Chapter 1

Setting the Scene

[Continued]

Page 3: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

3www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Setting the Scene

What is Requirements Engineering?

– The problem world & the machine solution

– The scope of RE: the WHY, WHAT and WHO dimensions

– Types of statements involved: descriptive vs. prescriptive

– Categories of requirements: functional vs. non-functional

– The requirements lifecycle: actors, processes, products

– Target qualities and defects to avoidTarget qualities and defects to avoid

– Types of software projects

– Requirements in the software lifecycle

– Relationship to other disciplines

Page 4: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

4www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Target Qualities for RE Process CompletenessCompleteness of objectives, requirements, assumptions

ConsistencyConsistency of RD items

AdequacyAdequacy of requirements, assumptions, domain props

UnambiguityUnambiguity of RD items

MeasurabilityMeasurability of requirements, assumptions

PertinencePertinence of requirements, assumptions

FeasibilityFeasibility of requirements

ComprehensibilityComprehensibility of RD items

Good structuringGood structuring of the RD

ModifiabilityModifiability of RD items

TraceabilityTraceability of RD items

Page 5: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

5www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Types of RE Errors & Flaws: A Wide Palette

Omission (critical error!)

Contradiction (critical error!)

Inadequacy (critical error!)

Ambiguity (critical error!)

Unmeasurability

Noise, overspecification

Unfeasibility (wishful thinking)

Unintelligibility

Poor structuring, forward reference, remorse

Opacity

Page 6: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

6www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Errors in a Requirements Document (RD)

OmissionOmission: problem world feature not stated by any RD item e.g. no req about state of train doors in case of emergency stop

ContradictionContradiction: RD items stating a problem world feature in an incompatible way

“Doors must always be kept closed between platforms” and “Doors must be opened in case of emergency stop”

InadequacyInadequacy: RD item not adequately stating a problem world feature

“Panels inside trains shall display all flights served at next stop”

AmbiguityAmbiguity: RD item allowing a problem world feature to be interpreted in different ways

“Doors shall be open as soon as the train is stopped at platform”

UnmeasurabilityUnmeasurability: RD item stating a problem world feature in a way precluding option comparison or solution testing

“Panels inside trains shall be user-friendly”

Page 7: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

7www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Flaws in a Requirements Document (RD)

NoiseNoise: RD item yielding no information on any problem world feature (Variant: uncontrolled redundancy)

“Non-smoking signs shall be posted on train windows”

OverspecificationOverspecification: RD item stating a feature not in the problem world, but in the machine solution

“The setAlarm method shall be invoked on receipt of an Alarm message”

UnfeasibilityUnfeasibility: RD item not implementable within budget/schedule

“In-train panels shall display all delayed flights at next stop”

UnintelligibilityUnintelligibility: RD item incomprehensible to those needing to use it

A requirement statement containing 5 acronyms

Poor structuringPoor structuring: RD item not organized according to any sensible & visible structuring rule

Intertwining of acceleration control and train tracking issues

Page 8: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

8www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Flaws in a Requirements Document (2)

Forward referenceForward reference: RD item making use of problem world features not defined yet

Multiple uses of the concept of worst-case stopping distance before its definition appears several pages after in the RD

RemorseRemorse: RD item stating a problem world feature lately or

incidentally After multiple uses of the undefined concept of worst-case stopping

distance, the last one directly followed by an incidental definition between parentheses

Poor modifiabilityPoor modifiability: RD items whose changes must be propagated throughout the RD

Use of fixed numerical values for quantities subject to change

OpacityOpacity: RD item whose rationale, authoring or dependencies are invisible

“The commanded train speed must always be at least 7 mph above physical speed” without any explanation of rationale for this

Page 9: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

9www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

The RE Process May Vary According to Project Type:

GreenfieldGreenfield vs. brownfieldbrownfield projects

Customer-drivenCustomer-driven vs. market-drivenmarket-driven projects

In-houseIn-house vs. outsourcedoutsourced projects

Single-productSingle-product vs. product-lineproduct-line projects

Variation factors ...– Respective weights of elicitation, evaluation, documentation,

consolidation, evolution– Intertwining RE/design– Respective weights of functional vs. non-functional reqs– Types of stakeholder & developer involved– Specific uses of the RD– Use of specific techniques

Page 10: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

10www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Requirements in the Software Lifecycle

RequirementsDocument

Project estimations(size, cost, schedules)

Project workplan

Software prototype,mockup

Follow-up directives

Software architecture

Call for tenders,proposal evaluation

Quality Assurancechecklists

Project contract

Software evolutiondirectives

Software documentation

Acceptance test data

Implementationdirectives

User manual

RE, system design & software architecture design are inevitably intertwined

The RD impacts on many software artifacts

Page 11: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

11www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

RE has Multiple Connections with Other Disciplines:

Primarily with Software Engineering (SE) Other connections:

– Domain understanding & requirements elicitationDomain understanding & requirements elicitation: system engineering, control theory, management science, organization theory, behavioral psychology, anthropology, AI knowledge acquisition

– Requirements evaluation & agreementRequirements evaluation & agreement: multicriteria analysis, risk management, conflict management, negotiation theory

– Requirements specification, documentation & consolidationRequirements specification, documentation & consolidation: software specification, formal methods in SE

– Requirements evolutionRequirements evolution: change management, configuration management in SE

– System modelingSystem modeling: conceptual models in DB & MIS; task models in HCI; knowledge representation in AI

Page 12: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

12www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Setting the Scene

Why engineer requirements?Why engineer requirements?

– The requirements problem: facts, data, citationsThe requirements problem: facts, data, citations

– Role and stakes of Requirements EngineeringRole and stakes of Requirements Engineering

Obstacles to good RE practice

Agile development and RE

Page 13: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

13www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

The Requirements Problem: Facts, Data, Citations

Poor requirements are ubiquitous ...

     “Requirements need to be engineered and have continuing review and revision”

Prohibitive cost of late correction ... “Up to 200 x cost of early correction”

RE is hard & critical ... “Hardest, most important function of SE is the iterative extraction & refinement of requirements”

Bell&Thayer ’76

Boehm ’81

Brooks ’87

Page 14: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

14www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

The Requirements Problem: Standish Report, 1995

Survey of 350 US companies, 8000 projects8000 projects

(partial success = partial functionalities, excessive costs, big delays)

Major source of failure: poor requirements engineering 50% responses

Page 15: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

15www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Major source of failure: poor requirements engineering 50% responses:

The Requirements Problem: Standish Report, 1995

www.standishgroup.com/chaos.html

Page 16: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

16www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

The Requirements Problem: European Survey, 1996

Coverage: 3800 EUR organizations, 17 countries

Main software problems perceived to be in...

– requirements specification

> 50% responses

– requirements evolution management

50% responses

[European Software Institute, 1996]

Page 17: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

17www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

The Requirements Problem is Perceived to Persist in Spite of Progress in Software

Technology…

[J. Maresco, IBM developersWork, 2007]

Failure %

1994 2000 2003

100

50

other causes

requirements-related

0

Page 18: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

18www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Requirements-related errors are ...

the most numerousnumerous

– 40% of software errors

the most persistentpersistent

– found very late, often after software delivery

the most expensiveexpensive

– cost ... 5x more if fixed during design

10x more if fixed during implementation

20x more if fixed during integration testing

200x more if fixed after delivery

– account for 66% of software error costs

[Boehm, Jones, Lutz, Hooks & Farry, ...]

Page 19: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

19www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Requirements-related errors can be dangerous…

US Aegis/Vincennes (1988): shooting of IranAir airbus

– Missing timing between 2 threat events in requirements on alarm software

Patriot anti-missile system (1st Gulf war)

– Hidden assumption on maximum usage time

London Ambulance System (1993): fatal delays– Wrong assumptions on crew behavior, ambulance

localization system, radio communication, ...

Boeing 757 crash, Cali (1995)

– Autopilot ’s wrong timing/localization assumption on flap extension point

Cf. ACM RISKS Digest Forum website

Page 20: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

20www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Example: Inadequate Domain Property in A320 Braking Logic

SofReq: reverse = ‘on’ iffiff WheelPulses = ‘on’

ASM: reverse = ‘on’ iffiff ReverseThrustEnabled

WheelPulses = ‘on’ iff iff WheelsTurning

Dom: MovingOnRunway iffiff WheelsTurning

---------------------------------------------------------------------------

SysReq: ReverseThrustEnabled iffiffMovingOnRunway

Warsaw crash: plane moving on waterlogged runway with no wheels turning (aquaplaning)

Page 21: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

21www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Role and Stakes of RE

TechnicalTechnical impact– on many software-related artifacts (as seen before)

ManagerialManagerial impact– basis for communication among parties and for project

management

LegalLegal impact – contractual commitment client-provider-subcontractors

Impact on certificationcertification

– Mastered RE process required by many quality standards & certification authorities

Page 22: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

22www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Role and Stakes of RE (2)

Impact on economyeconomy, security, and safety

– CostCost and consequencesconsequences of errors in requirements on the software-to-be, assumptions about its environment

SocialSocial impact– from user satisfaction

to degradation of working conditions

to system rejection

Page 23: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

23www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Obstacles to Good RE Practice

RE efforts often spent without guarantee of project contract being concluded

Pressure on tight schedules, short-term costs, catching up on technology

Too little work available on RE economics– Lack of quantitative data on RE benefits & cost savings– Progress in RE process is harder to measure than in

design, implementation

RDs are sometimes felt to be...– big, complex, to be quickly outdated– too far away from the executable product customers

are paying for

Page 24: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

24www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Agile Development and RE

More agile development may overcome some obstacles

– early & continuous provision of functionality of value to customer

– by reducing the req-to-code distance

Short RE cycles in spiral RE process, each directly followed by short implementation cycle

– Useful functional increment is elicited directly from the user

– Evaluation/spec/consolidation phases often shortcut (e.g. spec = test case on the implementation)

– Increment is implemented/tested by small team at same location, close to the user for instant feedback, using strict rules

Page 25: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

25www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Strong Assumptions for Agility to be Successful

All stakeholder roles are reducible to one single role Project sufficiently small to be assignable to single, small, single-location

team (programmers/testers/maintainers) “User” can interact promptly & effectively Functionality can be provided quickly, consistently, incrementally from

essential to less important (no prioritization required) Non-functional aspects, environment assumptions, objectives, alternative

options, risks may receive little attention Little documentation required for work coordination & product

maintenance; requirements precision not required; verification before coding is less important than early release

Requirements changes are not likely to require major code refactoring

More/lessMore/less agility is achievable by less/moreless/more weight in elicitation, evaluation, documentation, consolidation phases of RE cycles

Page 26: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

26www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Setting the Scene: Summary

What is Requirements Engineering?– RE is concerned with the problem world only

– Scope: WHY, WHAT, WHO issues– Statement types: descriptive vs. prescriptive; requirements,

assumptions, domain properties, defs; satisfaction arguments

– Categories of requirements: functional, non-functional– RE is a spiral process; elicit-evaluate-specify-consolidate cycles driven

by corrections & evolving needs

– Multiple target qualities, defects to avoid --some are critical !

– Weight on each RE phase may depend on project type– Requirements impact on many software artifacts

Why engineer requirements?– Requirements-related errors are the most numerous, persistent,

expensive, dangerous– Technical, managerial, legal, economical, social impact of RE

Obstacles to good RE practice; agility in spiral RE

Page 27: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

27www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Page 28: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

28www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Requirements EngineeringFrom System Goals

to UML Models

to Software Specifications

Axel Van Lamsweerde

Page 29: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

29www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Fundamentals of REFundamentals of RE

Chapter 2

Domain Understanding & Requirements Elicitation

Page 30: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

30www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

start

Chap. 2:Chap. 2:ElicitationElicitationTechniqueTechniquess

alternative options

agreedrequirements

documented requirements

consolidatedrequirements

Chap.1: RE products and processes

Page 31: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

31www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

A great deal of knowledge acquisitionknowledge acquisition is involved: as introduced in Chapter 1 ...

Studying the system-as-isas-is– Business organization: structure, dependencies, strategic

objectives, policies, workflows, operational procedures, ...– Application domain: concepts, objectives, tasks, constraints,

regulations, ... – Analysis of problems with system-as-is: symptoms, causes,

consequences

Analyzing technology opportunities, new market conditions Identifying the system stakeholdersstakeholders

Identifying improvement objectivesobjectives; organizational & technical constraintsconstraints on system-to-be; alternative optionsalternative options for satisfying objectives, for assigning responsibilities; scenariosscenarios of hypothetical software-environment interaction; requirementsrequirements on software, assumptionsassumptions on environment

Page 32: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

32www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Domain analysis & requirements elicitation:outline

Identifying stakeholders & interacting with them

Artefact-drivenArtefact-driven elicitation techniques– Background study– Data collection, questionnaires– Repertory grids, card sorts for concept acquisition– Scenarios, storyboards for problem world exploration– Prototypes, mock-ups for early feedback – Knowledge reuse: domain-independent, domain-specific

Stakeholder-drivenStakeholder-driven elicitation techniques– Interviews– Observation and ethnographic studies– Group sessions

Page 33: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

33www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Stakeholder analysis

Stakeholder cooperation is essential for successful RE– Elicitation = cooperative learning

Representative sample must be selected to ensure adequate, comprehensive coverage of the problem world

– dynamic selection as new knowledge is acquired

Selection based on ...

– relevant position in the organization

– role in making decisions, reaching agreement

– type of contributed knowledge, level of domain expertise

– exposure to perceived problems

– personal interests, potential conflicts

– influence in system acceptance

Page 34: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

34www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Knowledge acquisition from stakeholders is difficult

Distributed sources, conflicting viewpoints

Difficult access to key people & data

Different background, terminology, culture

Tacit knowledge, hidden needs

Irrelevant details

Internal politics, competition, resistance to change, ...

Personnel turnover, changes in organization, in priorities, ...

NeededNeeded:– Communication skills: for talking to, listening from diverse

people– Trust relationship– Knowledge reformulation & restructuring (review meetings)

Page 35: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

35www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Background study

Collect, read, synthesize documents about...– the organizationorganization: organizational charts, business plans,

financial reports, meeting minutes, etc

– the domaindomain: books, surveys, articles, regulations, reports on similar systems in the same domain

– the system-as-issystem-as-is: documented workflows, procedures, business rules; exchanged documents; defect/complaint reports, change requests, etc.

Provides basics for getting prepared before meeting stakeholders =>=> prerequisite to other techniques

Data mining problem: huge documentation, irrelevant details, outdated info

Solution: use meta-knowledge to prune the doc space – know what you need to know & what you don’t need to know

Page 36: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

36www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Data collection

Gather undocumented facts & figures

– marketing data, usage statistics, performance figures, costs, ...

– by designed experiments or selection of representative data sets from available sources (use of statistical sampling techniques)

May complement background study

Helpful for eliciting non-functional reqs on performance, usability, cost etc.

Difficulties: – Getting reliable data may take time

– Data must be correctly interpreted

Page 37: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

37www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Questionnaires

Submit a list of questions to selected stakeholders, each with a list of possible answers (+ brief context if needed)

– Multiple choiceMultiple choice question: one answer to be selected from answer list

– WeightingWeighting question: list of statements to be weighted...

• qualitatively (‘high’, ‘low”, ...), or

• quantitatively (percentages)

to express perceived importance, preference, risk etc.

Effective for acquiring subjective info quickly, cheaply, remotely from many people

Helpful for preparing better focussed interviews (see next)

Page 38: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

38www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Questionnaires should be carefully prepared

Subject to ...

– multiple biasesbiases: recipients, respondents, questions, answers

– unreliable info: misinterpretation of questions, of answers, inconsistent answers, ....

=> Guidelines for questionnaire design/validation: – Select a representative, statistically significant sample of

people; provide motivation for responding– Check coverage of questions, of possible answers– Make sure questions, answers, formulations are unbiased &

unambiguous– Add implicitly redundant questions to detect inconsistent

answers– Have your questionnaire checked by a third party

Page 39: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

39www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Card sorts & repertory grids

GoalGoal: acquire further info about concepts already elicited

Card sortCard sort: ask stakeholders to partition a set of cards ...

– Each card captures a concept textually or graphically– Cards grouped into subsets based on stakeholder’s criteria

– For each subset, ask... ? implicit shared property used for grouping ?? descriptive, prescriptive ?

– Iterate with same cards for new groupings/properties

Example: meeting scheduling system

– Iteration 1: “Meeting”, “Participant” grouped together => “participants shall be invited to the meeting”

– Iteration 2: “Meeting”, “Participant” grouped together => “participant constraints for the meeting must be

known”

Page 40: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

40www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Card sorts & repertory grids (2)

Repertory gridRepertory grid: ask stakeholders to characterize target concept through attributes and value ranges=> concept-attribute grid

e.g. (Date, Mon-Fri), (Location, Europe)

for grid characterizing Meeting concept

Conceptual ladderingConceptual laddering: ask stakeholders to classify target concepts along class-subclass links

e.g. subclasses RegularMeeting, OccasionalMeeting of Meeting

Simple, cheap, easy-to-use techniques for prompt elicitation of missing info

Results may be subjective, irrelevant, inaccurate

Page 41: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

41www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Scenarios & storyboards

GoalGoal: acquire or validate info from concrete examples through narratives ...

– how things are running in the system-as-is

– how things should be running in the system-to-be

StoryboardStoryboard: tells a story by a sequence of snapshots

– Snapshot = sentence, sketch, slide, picture, etc.

– Possibly structured with annotations:

WHO are the players, WHAT happens to them, WHY this happens, WHAT IF this does / does not happen, etc

– PassivePassive mode (for validation): stakeholders are told the story

– ActiveActive mode (for joint exploration): stakeholders contribute

Page 42: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

42www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Scenarios

Illustrate typical sequences of interaction among system components to meet an implicit objective

Widely used for...

– explanationexplanation of system-as-is

– explorationexploration of system-to-be + elicitation of further info ...

e.g. WHY this interaction sequence ?

WHY among these components ?

– specification of acceptance test cases

Represented by text or diagram (see Chap. 4)

Page 43: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

43www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Scenario example: meeting scheduling1. The initiatorinitiator asks the schedulerscheduler for planning a meeting within

some date range. The request includes a list of desired participants.

2. The schedulerscheduler checks that the initiator is entitled to do so and that the request is valid. It confirms to the initiatorinitiator that the requested meeting is initiated.

3. The schedulerscheduler asks all participantparticipants in the submitted list to send their date and location constraints back within the prescribed date range.

4. When a participantparticipant returns her constraints, the schedulerscheduler validates them (e.g., with respect to the prescribed date range). ItIt confirms to the participantparticipant that the constraints have been safely received.

5. Once all valid constraints are received, the schedulerscheduler determines a meeting date and location that fit them.

6. The schedulerscheduler notifies the scheduled meeting date and location to the initiatorinitiator and to all invited participantparticipants

Page 44: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

44www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Types of scenario

PositivePositive scenario = one behavior the system should cover (example)

NegativeNegative scenario = one behavior the system should exclude (counter-example), e.g.

1. A participant returns a list of constraints covering all dates within the given date range

2. The scheduler forwards this message to all participants asking them for alternative constraints within extended date range

NormalNormal scenario: everything proceeds as expected AbnormalAbnormal scenario = a desired interaction sequence in

exception situation (still positive)

e.g. meeting initiator not authorized participant constraints not valid

Page 45: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

45www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Scenarios: pros & cons

Concrete examples/counter-examples

Narrative style (appealing to stakeholders)

Yield animation sequences, acceptance test cases

Inherently partial (cf. test coverage problem)

Combinatorial explosion (cf. program traces)

Potential overspecification: unnecessary sequencing, premature software-environment boundary

May contain irrelevant details, incompatible granularities from different stakeholders

Keep requirements implicit cf. confidentiality req in negative scenario example

Concrete scenarios naturally jump in anyway... invaluable as initial elicitation vehicles

Page 46: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

46www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Prototypes & mock-ups

GoalGoal: check req adequacy from direct user feedback, by showing reduced sketch of software-to-be in action– focus on unclear, hard-to-formulate reqs to elicit further

PrototypePrototype = quick implementation of some aspects ...

– FunctionalFunctional proto: focus on specific functional reqs e.g. initiating meeting, gathering participant

constraints

– User interfaceUser interface proto: focus on usability by showing input-output forms, dialog patterns

e.g. static/dynamic interaction to get participant constraints

Quick implementation: by use of very high-level programming language, executable spec language, generic services, ...

Page 47: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

47www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Requirements prototyping

Mock-upMock-up: proto is thrown away (product = adequate reqs)

Evolutionary protoEvolutionary proto: transformed towards efficient code

Elaboraterequirements

Prototyperequirements

Demonstrate proto& get feedback

[ Proto_OK ][ Proto_OK ]

[[ notnot Proto_OK ] Proto_OK ]

Page 48: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

48www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Prototypes & mock-ups: pros & cons

Concrete flavor of what the software will look like => clarify reqs, elicit hidden ones, improve adequacy, understand implications, ...

Other uses: user training, stub for integration testing, ...

Does not cover all aspects– missing functionalities

– ignores important non-functional reqs (performance, cost, ...)

Can be misleading, set expectations too high

‘Quick-and-dirty’ code, hard to reuse for sw development

Potential inconsistencies between modified code and documented reqs

Page 49: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

49www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Knowledge reuse

GoalGoal: speed up elicitation by reuse of knowledge from experience with related systems– knowledge about similar organization, domain, problem world:

requirements, assumptions, dom props, ...

General reuse process:

1. RETRIEVERETRIEVE relevant knowledge from other systems

2. TRANSPOSETRANSPOSE it to the target system

3. VALIDATEVALIDATE the result, ADAPTADAPT it if necessary & INTEGRATEINTEGRATE it with the system knowledge already acquired

Transposition mechanisms:– instantiation instantiation (memberOf)

– specialization specialization (subClassOf) + feature inheritance – reformulationreformulation in vocabulary of target system

Page 50: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

50www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Reuse of domain-independent knowledge:

requirements taxonomies For each leaf node in available req taxonomies: “Is there any system-specific req instance from this class?” More specific taxonomy => more focussed search

ThroughputResponseTimeSecondaryStorage

MainStorage

Performance Requirement

TimeSpace

PeakThroughputOffPeakThroughput

PeakMeanThroughput PeakUniformThroughput

Reusable catalogue in(Chung et al 2000)

mean number of meetings to

be scheduled at peak times ?

response time for ...participant constraints

?meeting scheduling ?meeting notification ?

Page 51: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

51www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Reuse of domain-independent knowledge:

RD meta-model RD meta-modelRD meta-model = concepts & relationships in terms of

which RD items are captured

Elicitation by meta-model traversal

RD items are acquired as instantiationsinstantiations of meta-model items

GoalReference Responsibility Performance

Instantiation

Agent OperationObject

BookCopy BorrowedCopiesReturnedOnTime

Patron CheckOut

Meta level

System level

Page 52: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

52www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Reuse of domain-specific knowledge

Abstract domainAbstract domain = concepts, tasks, actors, objectives, reqs, dom props abstracting from a class of domains

RD items acquired as specializationsspecializations of abstract items to target system (feature inheritance + system-specific renaming)

LimitedUse

Specialization

User GetUnitResource

BookLimitedLoans

Patron BorrowCopy

Abstract domain

Concrete domain

“A useruser may not useuse more than X resourceresource unitsunits at a time”“A patronpatron may not borrow more than X book copiesbook copies at a

time”

Spec inheritance

Page 53: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

53www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Reuse of domain-specific knowledge (2)

Same abstract domain may have multiple specializations

e.g. resource management <-- library loan management, video store management, flight or concert seat allocation, ...

Same concrete domain may specialize multiple abstract domainse.g. library management: loan management --> resource management

book acquisition --> e-shopping patron registration --> group membership management

More adequate RD items elicited by reuse of more structured, more accurate abstract domainse.g. resource management: returnable vs. consumable resource

sharable vs. non-sharable resource

=> “A book copy can be borrowed by one patron at a time” (dom prop for non-sharable, returnable resource)

Page 54: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

54www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Knowledge reuse: pros & cons

Expert analysts naturally reuse from past experience

Significant guidance and reduction of elicitation efforts

Inheritance of structure & quality of abstract domain spec

Effective for completingcompleting RD with overlooked aspects

Effective only if abstract domain sufficiently “close”,

accurate

Defining abstract domains for significant reusability is hard

Validation & integration efforts

Near-matches may require tricky adaptations

Page 55: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

55www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Domain analysis & requirements elicitation:outline

Identifying stakeholders & interacting with them

Artifact-driven elicitation techniques– Background study– Data collection, questionnaires– Repertory grids, card sorts for concept acquisition– Scenarios, storyboards for problem world exploration– Prototypes, mock-ups for early feedback – Knowledge reuse: domain-independent, domain-

specific

Stakeholder-driven elicitation techniquesStakeholder-driven elicitation techniques– InterviewsInterviews– Observation and ethnographic studies– Group sessions

Page 56: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

56www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Interviews

Primary technique for knowledge elicitation

1. Select stakeholder specifically for info to be acquired (domain expert, manager, salesperson, end-user, consultant, ...)

2. Organize meeting with interviewee, ask questions, record answers

3. Write report from interview transcripts

4. Submit report to interviewee for validation & refinement

Single interview may involve multiple stakeholders

saves times

weaker contact; individuals less involved, speak less freely

Interview effectivenesseffectiveness: (utility x coverage of acquired info) / acquisition time

Page 57: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

57www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Types of interview

StructuredStructured interview: predetermined set of questions

– specific to purpose of interview

– some open-ended, others with pre-determined answer set

=> more focused discussion, no rambling among topics

UnstructuredUnstructured interview: no predetermined set of questions

– free discussion about system-as-is, perceived problems, proposed solutions

=> exploration of possibly overlooked issues

=>=> Effective interviews should mix both modes ...

– start with structured parts

– shift to unstructured parts as felt necessary

Page 58: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

58www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Interviews: strengths & difficulties

May reveal info not acquired through other techniques– how things are running really, personal complaints,

suggestions for improvement, ...

On-the-fly acquisition of info appearing relevant– new questions triggered from previous answers

Acquired info might be subjective (hard to assess)

Potential inconsistencies between different interviewees

Effectiveness critically relies on interviewer’s attitude, appropriateness of questions

=>=> Interviewing guidelines

Page 59: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

59www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Guidelines for effective interviews

Identify the right interviewee sample for full coverage of issues– different responsibilities, expertise, tasks, exposure to

problems

Come prepared, to focus on right issue at right time– background study first– pre-design a sequence of questions for thisthis interviewee

Centre the interview on the interviewee’s work & concerns

Keep control over the interview

Make the interviewee feel comfortable– Start: break ice, provide motivation, ask easy questions– Consider the person too, not only the role– Do always appear as a trustworthy partner

Page 60: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

60www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Guidelines for effective interviews (2)

Be focused, keep open-ended questions for the end

Be open-minded, flexible in case of unexpected answers

Ask why-questions without being offending

Avoid certain types of questions ...– opinionated or biased– affirmative– obvious or impossible answer for this interviewee

Edit & structure interview transcripts while still fresh in mind– including personal reactions, attitudes, etc

Keep interviewee in the loop– co-review interview transcript for validation & refinement

Model-driven interviews may help structure them(see Part 2 of the book)

Page 61: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

61www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Observation & ethnographic studies

Focus on tasktask elicitation in the system-as-is

Understanding a task is often easier by observing people performing it (rather than verbal or textual explanation)

– cf. tying shoelaces

PassivePassive observation: no interference with task performers

– Watch from outside, record (notes, video), edit transcripts, interpret

– Protocol analysisProtocol analysis: task performers concurrently explain it

– Ethnographic studiesEthnographic studies: over long periods of time, try to discover emergent properties of social group involved

about task performance + attitudes, reactions, gestures, ...

ActiveActive observation: you get involved in the task, even become a team member

Page 62: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

62www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Observation & ethnographic studies: pros & cons

May reveal ...

– tacit knowledgetacit knowledge that would not emerge otherwise

e.g. ethnographic study of air traffic control => implicit mental model of air traffic to be preserved in system-to-be

– hidden problems through tricky ways of doing things

– culture-specific aspects to be taken into account

Contextualization of acquired info

Slow & expensive: to be done over long periods of time, at different times, under different workload conditions Potentially inaccurate (people behave differently when

observed)

Data mining problem, interpretation problem

Focus on system-as-is

Some of the interviewing guidelines are relevant

Page 63: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

63www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Group sessions

More perception, judgment, invention from interactions within group of diverse people

Elicitation takes place in series of group workshops (a few days each) + follow-up actionsaudiovisuals, wall charts to foster discussion, record outcome

StructuredStructured group sessions: – Each participant has a clearly defined role (leader, moderator, manager, user, developer, ...)

– Contributes to req elaboration according to his/her role, towards reaching synergies

– Generally focused on high-level reqs

– Variants: focus groups, JAD, QFD, ...

Page 64: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

64www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Group sessions (2)

UnstructuredUnstructured group sessions (brainstorming):

– Participants have a less clearly defined role

– Two separate stages ...

1. Idea generationIdea generation to address a problem:

as many ideas as possible from each participant without censorship/criticism

2. Idea evaluationIdea evaluation:

by all participants together according to agreed criteria (e.g. value,

cost, feasibility)

to prioritize ideas

Page 65: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

65www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Group sessions: pros & cons Less formal interactions than interviews => may reveal hidden aspects of the system (as-is or to-be)

Potentially ...– wider exploration of issues & ideas

– more inventive ways of addressing problems

Synergies => agreed conflict resolutions

Group composition is critical ...– time consuming for key, busy people– heavily relying on leader expertise & skills– group dynamics, dominant persons => biases,

inadequacies

Risk of ...– missing focus & structure => rambling discussions, little

concrete outcome, waste of time – superficial coverage of more technical issues

Page 66: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

66www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Combining techniques

Elicitation techniques have complementary strengths & limitations

Strength-based combinations are more effective for full, adequate coverage

– artefact-driven + stakeholder-driven

Examples– Contextual InquiryContextual Inquiry: workplace observation + open-

ended interviews + prototyping

– RADRAD: JAD group sessions + evolutionary prototyping (with code generation tools)

Techniques from other RE phases support elicitation too– Resolution of conflicts, risks, omissions, etc.

Page 67: 1  lamsweerde Chap.1: Setting the Scene  © 2009 John Wiley and Sons Requirements Engineering From System Goals

67www.wileyeurope .com/college/van lamsweerde Chap.1: Setting the Scene © 2009 John Wiley and Sons

Domain analysis & requirements elicitation:summary

Identifying the right stakeholders, interacting the right way Artifact-driven elicitation techniques

– Background study as a prerequisite– Data collection, questionnaires for preparing interviews– Repertory grids, card sorts for concept characterization– Scenarios, storyboards for concrete exploration– Prototypes, mock-ups for early feedback & adequacy check – Knowledge reuse brings a lot: domain-independent, domain-specific

Stakeholder-driven elicitation techniques– Interviews are essential - structured, unstructured, cf. guidelines– Observation, ethnographic studies for hidden knowledge– Group sessions for broader, more inventive acquisition &

agreement

Model-driven elicitation provides focus & structure for what needs to be elicited (see Part 2 of the book)