Unit2 - Req Eng
Unit2 - Req Eng
CHAPTER 4:
REQUIREMENTS
ENGINEERING
2
TOPICS COVERED
Functional and non-functional requirements
Requirements engineering processes
Requirements elicitation
Requirements specification
Requirements validation
Requirements change / Management
3
4
REQUIREMENTS ENGINEERING
The process of establishing the services that a
customer requires from a system and the
constraints under which it operates and is
developed.
The system requirements are the descriptions of
the system services and constraints that are
generated during the requirements engineering
process.
5
WHAT IS A REQUIREMENT?
It may range from a high-level abstract
statement of a service or of a system constraint
to a detailed mathematical functional
specification.
This is inevitable as requirements may serve a
dual function
◦ May be the basis for a bid for a contract - therefore must
be open to interpretation;
◦ May be the basis for the contract itself - therefore must be
defined in detail;
◦ Both these statements may be called requirements.
6 REQUIREMENTS ABSTRACTION
(DAVIS)
“If a company wishes to let a contract for a large software development
project, it must define its needs in a sufficiently abstract way that a
solution is not pre-defined. The requirements must be written so that
several contractors can bid for the contract, offering, perhaps, different
ways of meeting the client organization’s needs. Once a contract has
been awarded, the contractor must write a system definition for the
client in more detail so that the client understands and can validate what
the software will do. Both of these documents may be called the
requirements document for the system.”
7
TYPES OF REQUIREMENT
User requirements
◦ Statements in natural language plus diagrams of the
services the system provides and its operational
constraints. Written for customers.
System requirements
◦ A structured document setting out detailed descriptions of
the system’s functions, services and operational
constraints. Defines what should be implemented so may
be part of a contract between client and contractor.
8
USER AND SYSTEM REQUIREMENTS
9
READERS OF DIFFERENT TYPES OF
REQUIREMENTS SPECIFICATION
10
Functional requirements
◦ Statements of services the system should provide, how the
system should react to particular inputs and how the system
should behave in particular situations.
◦ May state what the system should not do.
Non-functional requirements
◦ Constraints
on the services or functions offered by the
system such as timing constraints, constraints on the
development process, standards, etc.
◦ Often apply to the system as a whole rather than individual features or
services.
Domain requirements
◦ Constraints on the system from the domain of operation
12
FUNCTIONAL REQUIREMENTS
Describe functionality or system services.
Depend on the type of software, expected users
and the type of system where the software is
used.
Functional user requirements may be high-level
statements of what the system should do.
Functional system requirements should describe
the system services in detail.
13 MENTCARE SYSTEM:
FUNCTIONAL REQUIREMENTS
A user shall be able to search the appointments
lists for all clinics.
The system shall generate each day, for each
clinic, a list of patients who are expected to attend
appointments that day.
Each staff member using the system shall be
uniquely identified by his or her 8-digit employee
number.
14
REQUIREMENTS IMPRECISION
Problems arise when functional requirements are
not precisely stated.
Ambiguous requirements may be interpreted in
different ways by developers and users.
Consider the term ‘search’ in requirement 1
◦ User intention – search for a patient name across all
appointments in all clinics;
◦ Developer interpretation – search for a patient name in an
individual clinic. User chooses clinic then search.
15
REQUIREMENTS COMPLETENESS
AND CONSISTENCY
In principle, requirements should be both
complete and consistent.
Complete
◦ They should include descriptions of all facilities required.
Consistent
◦ There should be no conflicts or contradictions in the descriptions of
the system facilities.
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.
20 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.
21
GOALS AND REQUIREMENTS
Non-functional requirements may be very
difficult to state precisely and imprecise
requirements may be difficult to verify.
Goal
◦ A general intention of the user such as ease of use.
Verifiable non-functional requirement
◦ A statement using some measure that can be
objectively tested.
REQUIREMENTS SPECIFICATION
26 REQUIREMENTS
SPECIFICATION
The process of writing down the user and system
requirements in a requirements document.
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
system development
◦ It is therefore important that these are as complete as possible.
WAYS OF WRITING A SYSTEM REQUIREMENTS
SPECIFICATION
27
Notation Description
Natural language The requirements are written using numbered sentences in natural
language. Each sentence should express one requirement.
Structured natural The requirements are written in natural language on a standard form or
language template. Each field provides information about an aspect of the
requirement.
Design description This approach uses a language like a programming language, but with more
languages abstract features to specify the requirements by defining an operational
model of the system. This approach is now rarely used although it can be
useful for interface specifications.
Graphical notations Graphical models, supplemented by text annotations, are used to define the
functional requirements for the system; UML use case and sequence
diagrams are commonly used.
Mathematical These notations are based on mathematical concepts such as finite-state
specifications machines or sets. Although these unambiguous specifications can reduce
the ambiguity in a requirements document, most customers don’t
understand a formal specification. They cannot check that it represents what
they want and are reluctant to accept it as a system contract
28
REQUIREMENTS AND DESIGN
In principle, requirements should state what the
system should do and the design should describe
how it does this.
In practice, requirements and design are
inseparable
◦ A system architecture may be designed to structure the
requirements;
◦ The system may inter-operate with other systems that
generate design requirements;
◦ The use of a specific architecture to satisfy non-functional
requirements may be a domain requirement.
◦ This may be the consequence of a regulatory
requirement.
29 NATURAL LANGUAGE
SPECIFICATION
Requirements are written as natural language
sentences supplemented by diagrams and tables.
Used for writing requirements because it is
expressive, intuitive and universal. This means
that the requirements can be understood by
users and customers.
GUIDELINES FOR WRITING
30
REQUIREMENTS
Requirements confusion
◦ Functional and non-functional requirements tend to be
mixed-up.
Requirements amalgamation
◦ Several different requirements may be expressed together.
32
EXAMPLE REQUIREMENTS FOR THE
INSULIN PUMP SOFTWARE SYSTEM
3.2 The system shall measure the blood sugar and deliver
insulin, if required, every 10 minutes. (Changes in blood
sugar are relatively slow so more frequent measurement
is unnecessary; less frequent measurement could lead to
unnecessarily high sugar levels.)
REQUIREMENTS ENGINEERING
PROCESSES
46 REQUIREMENTS ENGINEERING
PROCESSES
The processes used for RE vary widely depending
on the application domain, the people involved and
the organisation developing the requirements.
However, there are a number of generic activities
common to all processes
1. Requirements elicitation;
2. Requirements analysis;
3. Requirements validation;
4. Requirements management.
1. REQUIREMENTS ELICITATION
49 2.REQUIREMENTS ELICITATION
AND ANALYSIS
Sometimes called requirements elicitation or
requirements discovery.
Involves technical staff working with customers
to find out about the application domain, the
services that the system should provide and
the system’s operational constraints.
May involve end-users, managers, engineers
involved in maintenance, domain experts,
trade unions, etc. These are called
stakeholders.
50
REQUIREMENTS ELICITATION
Software engineers work with a range of system
stakeholders to find out about the application
domain, the services that the system should
provide, the required system performance,
hardware constraints, other systems, etc.
Stages include:
◦ Requirements discovery,
◦ Requirements classification and organization,
◦ Requirements prioritization and negotiation,
◦ Requirements specification.
PROBLEMS OF REQUIREMENTS
51
ELICITATION
Requirements specification
◦ Requirements are documented and input into the next
round of the spiral.
54
REQUIREMENTS DISCOVERY
The process of gathering information about the
required and existing systems and distilling the
user and system requirements from this
information.
Interaction is with system stakeholders from
managers to external regulators.
Systems normally have a range of stakeholders.
55
INTERVIEWING
Formal or informal interviews with stakeholders
are part of most RE processes.
Types of interview
◦ Closed interviews based on pre-determined list of questions
◦ Open interviews where various issues are explored with
stakeholders.
Effective interviewing
◦ Be open-minded, avoid pre-conceived ideas about the
requirements and are willing to listen to stakeholders.
◦ Prompt the interviewee to get discussions going using a
springboard question, a requirements proposal, or by
working together on a prototype system.
56
INTERVIEWS IN PRACTICE
Normally a mix of closed and open-ended
interviewing.
Interviews are good for getting an overall
understanding of what stakeholders do and
how they might interact with the system.
Interviewers need to be open-minded without pre-
conceived ideas of what the system should do
You need to prompt the use to talk about the
system by suggesting requirements rather
than simply asking them what they want.
57
PROBLEMS WITH INTERVIEWS
Application specialists may use language to
describe their work that isn’t easy for the
requirements engineer to understand.
Interviews are not good for understanding domain
requirements
◦ Requirements engineers cannot understand specific domain
terminology;
◦ Some domain knowledge is so familiar that people find it
hard to articulate or think that it isn’t worth articulating.
58
ETHNOGRAPHY
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.
Ethnographic studies have shown that work
is usually richer and more complex than
suggested by simple system models.
59
SCOPE OF ETHNOGRAPHY
Requirements that are derived from the way that
people actually work rather than the way in which
process definitions suggest that they ought to
work.
Requirements that are derived from cooperation
and awareness of other people’s activities.
◦ Awareness of what other people are doing leads to changes
in the ways in which we do things.
3.REQUIREMENTS VALIDATION
68
REQUIREMENTS VALIDATION
Concerned with demonstrating that the
requirements define the system that the
customer really wants.
Requirements error costs are high so validation
is very important
◦ Fixing a requirements error after delivery may cost up to
100 times the cost of fixing an implementation error.
69
REQUIREMENTS CHECKING
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?
REQUIREMENTS VALIDATION
70
TECHNIQUES
Requirements reviews
◦ Systematic manual analysis of the requirements.
Prototyping
◦ Using an executable model of the system to check
requirements. Covered in Chapter 2.
Test-case generation
◦ Developing tests for requirements to check testability.
71
REQUIREMENTS REVIEWS
Regular reviews should be held while the
requirements definition is being formulated.
Both client and contractor staff should be
involved in reviews.
Reviews may be formal (with completed
documents) or informal. Good communications
between developers, customers and users can
resolve problems at an early stage.
72
REVIEW CHECKS
Verifiability
◦ Is the requirement realistically testable?
Comprehensibility
◦ Is the requirement properly understood?
Traceability
◦ Is the origin of the requirement clearly stated?
Adaptability
◦ Can the requirement be changed without a large impact
on other requirements?
73