03 - Ch3 - 4 Requirements Engineering - 2021
03 - Ch3 - 4 Requirements Engineering - 2021
ENGINEERING
CO3001
Requirements definition
A statement in natural language plus diagrams of the
services the system provides and its operational
constraints. Written for customers
Requirements specification
A structured document setting out detailed descriptions
of the system services. Written as a contract between
client and contractor
Software specification
A detailed software description which can serve as a
basis for a design or implementation. Written for
Sep 2019
developers CHAPTER 4. REQUIREMENTS ENGINEERING 10
MENTCARE SYSTEM
Domain requirements
Constraints on the system from the domain of operation
Sep 2019 CHAPTER 4. REQUIREMENTS ENGINEERING 20
FUNCTIONAL REQUIREMENTS
Product requirements
Requirements which specify that the delivered product must
behave in a particular way e.g. execution speed, reliability,
etc.
Organisational requirements
Requirements which are a consequence of organisational
policies and procedures e.g. process standards used,
implementation requirements, etc.
External requirements
Requirements which arise from factors which are external to
the system and its development process e.g. interoperability
requirements, legislative requirements, etc.
Sep 2019 CHAPTER 4. REQUIREMENTS ENGINEERING 25
EXAMPLES OF NONFUNCTIONAL
REQUIREMENTS IN THE MENTCARE SYSTEM
Product requirement
The Mentcare system shall be available to all clinics during normal
working hours (Mon–Fri, 0830–17.30). Downtime within normal
working hours shall not exceed five seconds in any one day.
Organizational requirement
Users of the Mentcare system shall authenticate themselves using
their health authority identity card.
External requirement
The system shall implement patient privacy provisions as set out
in HStan-03-2006-priv.
Sep 2019 CHAPTER 4. REQUIREMENTS ENGINEERING 26
EXERCISE: 15 MINS (+ 10 MINS BREAK)
Precise/ Unambiguous
Complete
Consistent
Correct
Testable
Ranked for importance and/or stability
REQUIREMENTS IMPRECISION
Complete
They should include descriptions of all facilities
required.
All possible situations must be covered
Consistent
There should be no conflicts or contradictions in the
Sep 2019
descriptions of the system facilities.
CHAPTER 4. REQUIREMENTS ENGINEERING 30
TESTABLE REQUIREMENT
If a method cannot
be devised to
determine whether
the software meets a
particular
requirement, then
that requirement is
not testable.
EXAMPLE OF NIGHTMARE REQUIREMENTS
Goal
A general intention of the user such as ease of use.
Goal:
The system should be easy to use by
medical staff.
Non-functional requirement:
Medical staff shall be able to use all the system
functions after four hours of training.
Groups related
requirements
and organises
Prioritising
them into
requirements and
coherent
resolving conflicts
clusters
Main concerns:
Stakeholders
Discovery techniques/approaches/…
Observational technique
used to understand operational processes and help
derive support requirements for these processes
How
A social scientist spends a considerable time observing
and analysing how people actually work.
People do not have to explain or articulate their work.
Social and organisational factors of importance may be
observed.
Notes:
User requirements have to be understandable by end-
users and customers who do not have a technical
background.
System requirements are more detailed requirements
and may include more technical information.
The requirements may be part of a contract for the
Sep 2019
system development CHAPTER 4. REQUIREMENTS ENGINEERING 51
WAYS OF WRITING A SYSTEM
REQUIREMENTS SPECIFICATION
Notation Description
Natural language Sentences in natural language. Each sentence should
express one requirement.
Structured natural Natural language statements on a standard form or
language template
Design Uses a language like a programming language, but with
description more abstract features
languages
Graphical Graphical models, supplemented by text annotations
notations (best for functional requirements); UML use case and
sequence diagrams are commonly used.
Mathematical Based on mathematical concepts such as finite-state
specifications machines or sets; Can reduce the ambiguity but hard to
understand (and hard to check manually)
Problems
Lack of clarity: Precision is difficult without making the
document difficult to read.
Requirements confusion: Functional and non-functional
requirements tend to be mixed-up.
Requirements amalgamation: Several different requirements
may be expressed together.
Sep 2019 CHAPTER 4. REQUIREMENTS ENGINEERING 53
EXAMPLE REQUIREMENTS FOR THE INSULIN
PUMP SOFTWARE SYSTEM
Req 3.2. The system shall measure the blood
sugar and deliver insulin, if required, every 10
minutes.
Condition Action
Sugar level falling (r2 < r1) CompDose = 0
Sugar level stable (r2 = r1) CompDose = 0
Sugar level increasing and rate of CompDose = 0
increase decreasing ((r2 – r1) < (r1 – r0))
Sugar level increasing and rate of CompDose = round ((r2 – r1)/4)
increase stable or increasing ((r2 – r1) ≥ If rounded result = 0 then
(r1 – r0)) CompDose =
MinimumDose
CHAPTER 4. REQUIREMENTS ENGINEERING 57
USE CASES
• Actors
• Use cases
• Association
• System
boundary
boxes
Complex logics
STATE-TRANSITION DIAGRAM
A set of complex
state changes in
natural
language
creates a high
probability of
overlooking a
permitted state
change or
including a
disallowed
change.
THE SOFTWARE REQUIREMENTS DOCUMENT
Validity.
Does the system provide the functions which best support the
customer’s needs?
Consistency.
Are there any requirements conflicts?
Completeness.
Are all functions required by the customer included?
Realism.
Can the requirements be implemented given available budget and
technology
Verifiability.
Can the requirements be checked?
Sep 2019 CHAPTER 4. REQUIREMENTS ENGINEERING 68
REQUIREMENTS VALIDATION TECHNIQUES
Requirements reviews
Systematic manual analysis of the requirements.
Prototyping
Using an executable model of the system to check
requirements.
Test-case generation
Developing tests for requirements to check testability.