Professional Documents
Culture Documents
Objectives
◇To discuss
▪ Functional and non-functional requirements
Requirements Engineering ▪ The software requirements document
▪ Requirements specification
▪ Requirements engineering processes
▪ Requirements elicitation and analysis
▪ Requirements validation
▪ Requirements management
1
2/8/2023
◇User requirements
“If a company wishes to let a contract for a large software ▪ Statements in natural language plus diagrams of the
development project, it must define its needs in a sufficiently services the system provides and its operational
abstract way that a solution is not pre-defined. The constraints.
requirements must be written so that several contractors ▪ Written for customers.
can bid for the contract, offering, perhaps, different ways of
meeting the client organisation’s needs. Once a contract ◇System requirements
has been awarded, the contractor must write a system ▪ A structured document setting out detailed
definition for the client in more detail so that the client descriptions of the system’s functions, services and
understands and can validate what the software will do. operational constraints.
Both of these documents may be called the requirements ▪ Defines what should be implemented so may be part
document for the system.” of a contract between client and contractor.
[A.M. Davis “Software Requirements: Objects, Functions and States”, Englewood Cliffs, 1993]
Software Engineering, 9th ed. Chapter 4
257 © Sommerville, I. 258
Requirements Engineering (extract)
Example
The MHC-PMS (Mental Health Care-Patient
The Mental Health Care Patient Management System
(MHC-PMS) Case Study
Management System)
◇ An information system that is intended for use in clinics.
◇ A system used to maintain records of people receiving
◇ It makes use of a centralised database of patient information
care for mental health problems.
but has also been designed to run on a PC, so that it may be
▪ A patient information system to support mental health care
accessed and used from sites that do not have secure network
• A medical information system that maintains information about
patients suffering from mental health problems and the treatments connectivity.
that they have received. ◇ When the local systems have secure network access, they use
◇ Most mental health patients do not require dedicated patient information in the database but they can download and
hospital treatment but need to attend specialist clinics use local copies of patient records when they are disconnected.
regularly where they can meet a doctor who has detailed MHC-PMS Goals
knowledge of their problems. ◇ To generate management information that allows health
◇ To make it easier for patients to attend, these clinics are service managers to assess performance against local and
not just run in hospitals. government targets.
▪ They may also be held in local medical practices or community ◇ To provide medical staff with timely information to support the
centres. Chapter 1 Introduction 259
treatment of patients.Software Engineering, 9 ed. Chapter 4
th
260
Requirements Engineering (extract)
2
2/8/2023
◇Privacy
▪ It is essential that patient information is confidential
and is never disclosed to anyone apart from
authorised medical staff and the patient themselves.
◇Safety
▪ Some mental illnesses cause patients to become
suicidal or a danger to other people. Wherever
possible, the system should warn medical staff about
potentially suicidal or dangerous patients.
▪ The system must be available when needed otherwise
safety may be compromised and it may be impossible
to prescribe the correct medication to patients.
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
263 © Sommerville, I. 264
Requirements Engineering (extract) Requirements Engineering (extract)
3
2/8/2023
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 265 © Sommerville, I. 266
Requirements Engineering (extract) Requirements Engineering (extract)
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 267 © Sommerville, I. 268
Requirements Engineering (extract) Requirements Engineering (extract)
4
2/8/2023
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 271 © Sommerville, I. 272
Requirements Engineering (extract) Requirements Engineering (extract)
5
2/8/2023
Requirements Imprecision
Non-functional requirements
The Purpose of Analysis
◇ The optical illusion we just saw represents a picture that ◇These define system properties and constraints
▪ e.g. reliability, response time and storage requirements.
is ambiguous. ▪ Constraints include e.g. I/O device capability e.g.:
◇ The models we create to describe our system must have ▪ the visual display has
▪ high resolution
zero ambiguity. ▪ 3D capabilities,
◇ This is precisely why we must carry out analysis: to ▪ touch-sensitivity using pens or fingers
▪ the system has voice recognition capabilities
create the analysis model of the system that is correct, ◇Process requirements may also be specified mandating a particular
complete, consistent and verifiable. ◇IDE,
◇ We carry out a requirements elicitation, then the ◇programming language or
requirements specification (describing the functional ◇development method.
and non-functional requirements) then start the analysis. ◇Non-functional requirements may be more critical than functional
requirements.
▪ If these are not met, the system may be useless.
273
Software Engineering, 9th ed. Chapter 4
SQA © Sommerville, I. 274
Requirements Engineering (extract)
6
2/8/2023
Product requirement
◇ Product requirements
The MHC-PMS shall be available to all clinics during normal
▪ Requirements which specify that the delivered product must
behave in a particular way working hours (Mon–Fri, 0830–17.30). Downtime within
• e.g. execution speed, reliability, etc. normal working hours shall not exceed five seconds in any one
◇ Organisational requirements day.
▪ Requirements which are a consequence of organisational policies
and procedures Organisational requirement
• e.g. process standards used, implementation requirements, etc. Users of the MHC-PMS system shall authenticate themselves
◇ External requirements using their health authority identity card.
▪ Requirements which arise from factors which are external to the
system and its development process External requirement
• e.g. interoperability requirements, legislative requirements, etc. The system shall implement patient privacy provisions as set
out in HStan-03-2006-priv.
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 279 © Sommerville, I. 280
Requirements Engineering (extract) Requirements Engineering (extract)
7
2/8/2023
◇Non-functional requirements may be very difficult ◇The system should be easy to use by medical
to state precisely. staff and should be organised in such a way
◇Imprecise requirements may be difficult to verify. that user errors are minimised. (Goal)
◇Goal
▪ A general intention of the user such as ease of use. ◇Medical staff shall be able to use all the system
◇Verifiable non-functional requirement functions after four hours of training. After
▪ A statement using some measure that can be this training, the average number of errors
objectively tested. made by experienced users shall not exceed
◇Goals are helpful to developers as they convey two per hour of system use. (Testable non-
the intentions of the system users … functional requirement)
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 281 © Sommerville, I. 282
Requirements Engineering (extract) Requirements Engineering (extract)
8
2/8/2023
◇T h e s y s t e m ’ s o p e r a t i o n a l d o m a i n i m p o s e s ◇T h i s i s a d o m a i n r e q u i r e m e n t f o r a t r a i n
requirements on the system. protection system:
▪ For example, a train control system has to take into account ◇The deceleration of the train shall be computed as:
the braking characteristics in different weather conditions.
▪ Dtrain = Dcontrol + Dgradient
◇Domain requirements can be ▪ where D gradient is 9.81ms 2 * compensated gradient
◇new functional requirements, /alpha
◇constraints on existing requirements or where the values of 9.81ms 2 / alpha are known for
◇defined specific computations. different types of train.
◇If domain requirements are not satisfied, the system ◇It is difficult for a non-specialist to understand the
may be unworkable. implications of this and how it interacts with other
requirements.
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 285 © Sommerville, I. 286
Requirements Engineering (extract) Requirements Engineering (extract)
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 287 © Sommerville, I. 288
Requirements Engineering (extract) Requirements Engineering (extract)
9
2/8/2023
◇The software requirements document is the ◇ Many agile methods argue that producing a requirements document
is a waste of time as requirements change so quickly.
official statement of what is required of the
◇ The document is therefore always out of date.
system developers.
◇ Methods such as XP use incremental requirements engineering
◇Should include both ▪ they express requirements as ‘user stories’ or scenarios.
▪ a definition of user requirements and ▪ These are written on cards and the development team break them down
into implementation tasks. These tasks are the basis of schedule and
▪ a specification of the system requirements. cost estimates. (See next 2 slides)
▪ The customer chooses the stories for inclusion in the next release based
◇It is NOT a design document. on their priorities and the schedule estimates.
▪ As far as possible, it should set out WHAT the system ◇ This is practical for business systems but problematic for systems
should do rather than HOW it should do it. that require a lot of pre-delivery analysis (e.g. critical systems) or
systems developed by several teams.
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 289 © Sommerville, I. 290
Requirements Engineering (extract) Requirements Engineering (extract)
291 292
10
2/8/2023
Software Engineering, 9th ed. Chapter 4 Software Engineering, 9th ed. Chapter 4
© Sommerville, I. 293 © Sommerville, I. 294
Requirements Engineering (extract) Requirements Engineering (extract)
11