Software Requirements
Software Requirements
CONTENTS:
4.1 Functional and non-functional requirements
4.2 User requirements
4.3 System requirements
4.4 Interface specification
4.5 The software requirements document
4.6 Summary
4.7 Exercises
Introduction
The requirements for a system are “the descriptions of the services provided by the
system and it’s operational constraints”. These requirements reflect the needs of customers for a
system that helps to solve some problems such as controlling a device, placing an order or
finding information. The process of “finding out, analysing, documenting and checking these
services and constraints” is called Requirements engineering.
The term requirement is not used in the software industry in a consistent way. In some
cases, a requirement is simply a high-level abstract statement of a service that the system should
provide or a constraint on them. At the other extreme, “it is a detailed, formal definition of a
system function”.
If a company wishes to let a contract for a large software project, it must define it’s needs
in a sufficiently abstract way that a solution is not predefined. 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 details 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.
Some of the problems that arise during the requirements engineering process are a result
of failing to make a clear separation between these different levels of description. We can
distinguish between them by using the term user requirements to mean the high-level abstract
requirements and system requirements to mean the detailed description of what the system
should do.
i) User requirements: These are the statements in a natural language plus diagrams, of what
services the system is expected to provide and the constraints under which it must operate.
ii) System requirements: system requirements specify the system’s functions, services and
operational constraints in detail. The system requirements document (i.e. Functional
specification) should be precise. It should define exactly what is to be implemented.
UNIT II SOFTWARE REQUIREMENTS
Different levels of system specification are useful because they communicate information
about the system to different types of readers. Figure 4.1 illustrates the distinction between user
and system requirements. This example from a library system shows how a user requirement
may be expanded into several system requirements. You can see from Figure 4.1 that the user
requirement is more abstract, and the system requirements add detail, explaining the services and
functions that should be provided by the system to be developed.
Fig 6.1 User and System Requirements
User requirement definition
1. LIBSYS shall keep track of all data required by copyright licensing agencies in the UK and
elsewhere.
1.1 On making a request for a document from LIBSYS, the requestor shall be presented with
a form that records details of the user and the request made.
1.2 LIBSYS request forms shall be stored on the system for five years from the date of
the request.
1.3 All LIBSYS request forms must be indexed by user, by the name of the material
requested and by the supplier of the request.
1.4 LlBSYS shall maintain a log of all requests that have been made to the system.
1.5 For material where authors' lending rights apply, loan details shall be sent monthly
to copyright licensing agencies that have registered with LIBSYS.
You need to write requirements at different levels of details because different types of
readers use them in different ways. Figure 4.2 shows the different types of readers for the user
and system requirements. The readers of the user requirements are not usually concerned with
how the system will be implemented. The readers of system requirements need to know more
precisely what the system will do because they are concerned with how it will support the
business process or because they are involved in the system implementation.
UNIT II SOFTWARE REQUIREMENTS
ii) Non-functional requirements: These are the constraints on the services or functions offered
by the systems. They include timing constraints, constraints on the development process and
standards. Non–functional requirements often apply to the system as a whole. They do not
apply to the individual system features or services.
iii)Domain requirements: These are requirements that come from the application domain of the
system and that reflect characteristics and constraints on that domain. They may be
functional or non-functional.
UNIT II SOFTWARE REQUIREMENTS
Functional requirements for a system describe what the system should do. These
requirements depend on the type of software being developed, the expected users of the software
and the general approach taken by the organization when writing requirements. When expressed
as user requirements, the requirements are usually described in a fairly abstract way. However,
the functional system requirements describe the system functions in detail, it’s inputs and
outputs, exceptions and so on. Functional requirements for a software system may be expressed
in number of ways.
Example: Functional requirements for a university library system called LIBSYS, used
by students and faculty to order books and documents from other libraries.
1) The user shall be able to search either all of the initial set of databases or select a
subset from it.
2) The system shall provide appropriate viewers for the user to read documents in the
document store.
3) Every order shall be allocated a unique identifier (ORDER_ID), which the user shall
be able to copy to the accounts permanent storage area.
These functional user requirements define specific facilities to be provided by the system.
These have been taken from the user requirements document, and they illustrate that functional
requirements may be written at different levels of detail.
Imprecision in the requirements specification is the cause of many software engineering
problems. It is natural for a system developer to interpret an ambiguous requirement to simplify
it’s implementation. New requirements have to be established and changes made to the system.
Of course, this delays system delivery and increases costs.
UNIT II SOFTWARE REQUIREMENTS
Consider the second example requirement for the library system that refers to
'appropriate viewers' provided by the system. The library system can deliver documents in a
range of formats; the intention of this requirement is that viewers for all of these formats should
be available. However, the requirement is worded ambiguously; it does not make clear that
viewers for each document format should be provided. A developer under schedule pressure
might simply provide a text viewer and claim that the requirement had been met.
In principle, the functional requirements specification of a system should be both
complete and consistent.
Completeness means that all services required by the user should be defined.
Consistency means that requirements should not have contradictory definitions.
Note: In practice, for large, complex systems, it is practically impossible to achieve
requirements consistency and completeness.
Non-functional requirements, as the name suggests, are the requirements that are not
directly concerned with the specific functions delivered by the system. They may relate to
emergent properties such as reliability, response time and store occupancy etc.
Non-functional requirements are rarely associated with individual system features.
Rather, they may specify system performance, security and other emerging properties. This
means that they are often more critical than individual functional requirements.
However, failing to meet a non-functional requirement can mean that the whole
system is unusable.
Examples:
i) If an aircraft system does not meet it’s reliability requirements, it will not
be certified as safe for operation;
ii) If a real-time control system fails to meet it’s performance requirements,
the control function will not operate correctly.
Non-functional requirements are not just concerned with the software system to be
developed. Some nonfunctional requirements may constrain the process that should be used to
develop the system. Examples of process requirements include a specification of the quality
standards that should be used in the process.
UNIT II SOFTWARE REQUIREMENTS
1) Product requirements:
These requirements specify product behavior. Examples include
i) Performance requirements on how fast the system must execute and how much
memory it requires;
ii) Reliability requirements that set out the acceptable failure rate;
iii) Portability requirements;
iv) Usability requirements.
2) Organizational requirements:
These requirements are derived from policies and procedures in the customer’s
and developer’s organization.
Examples include-
i) Process standards that must be used;
ii)Implementation requirements such as the programming language or design
method used;
iii)Delivery requirements that specify when the product and it’s documentation are
to be delivered.
3) External requirements:
This road category covers all requirements that are derived from factors external
to the system and it’ development process. These may include the following:
i) Interoperability requirements that define how the system interacts with the systems
in other organizations;
ii) Legislative requirements that must be fallowed to ensure that the system operates
with in the law.
iii) Ethical requirements are requirements placed on a system to ensure that it will be
acceptable to it’s users and the general public.
UNIT II SOFTWARE REQUIREMENTS
Figure 4.4 shows examples of product, organizational and external requirements taken
from the library system LIBSYS whose user requirements were discussed in Section 4.1.1.
The product requirement restricts the freedom of the LIBSYS designers in the
implementation of the system user interface. The organizational requirement specifies that the
system must be developed according to a company standard process defined as XYZCo-SP-
STAN-95. The external requirement is derived from the need for the system to conform to
privacy legislation. It specifies that library staff should not be allowed access to data, such as the
addresses of system users, which they do not need to do their job.
A common problem with non-functional requirements is that they can be difficult to
verify. Users or customers often state these requirements as general goals such as ease of use, the
ability of the system to recover from failure or rapid user response. These goals cause problems
for system developers as they leave scope for interpretation and subsequent dispute once the
system is delivered.
Non-functional requirements often conflict and interact with other functional or non-
functional requirements. For example, it may be a requirement that the maximum memory used
by a system should be no more than 4 Mbytes. Memory constraints are common for embedded
systems where space or weight is limited and the number of ROM chips storing the system
software must be minimized. Another requirement might be that the system should be written
using Ada, a programming language for critical, real-time software development. However, it
may not be possible to compile an Ada program with the required functionality into less that 4
Mbytes. There has to be a trade-off between these requirements: an alternative development
language or increased memory added to the system.
Non-functional requirements such as safety and security requirements are particularly
important for critical systems.
UNIT II SOFTWARE REQUIREMENTS
LIBSYS shall provide a financial accounting system that maintains records of all accounting
system payments made by users of the system. System managers may configure this system.
So that regular users may receive discounted rates.
This requirement includes both conceptual and detailed information. It expresses the
concept that there should be an accounting system as an inherent part of LIBSYS. However, it
also includes the detail that the accounting system should support discounts for regular LIBSYS
users.
1) Invent a standard format and ensure that all requirements definitions should be in
that format. Standardizing the format makes omissions less likely and requirements
easier to check.
2) Use language consistently. You should always distinguish between mandatory and
desirable requirements.
i) Mandatory requirements are requirements that the system must support and
are usually written using “shall”.
ii) Desirable requirements are not essential and are written using “should”.
3) Use text highlighting (i.e., bold, italic, color etc.) to pick out key parts of the
requirement.
4) Avoid, as far as possible, the use of Computer jargon.
Note:
Jargon € Words or Expressions that are used by a particular profession (or)
group of people, and are difficult for others to understand.
2. In most cases, systems must interoperate with other existing systems. These constrain the
design, and these constraints impose requirements on the new system.
3. The use of a specific architecture to satisfy non-functional requirements may be necessary. An
external regulator who needs to certify that the system is safe may specify that an
architectural design that has already been certified be used.
Natural language is often used to write system requirements specification as well as user
requirements. However, system requirements are more detailed than user requirements, natural
language specifications can be confusing and hard to understand:
1) Natural language understanding relies on the specification readers and writers using
the same words for the same concept. This leads to misunderstandings because of the
ambiguity of natural language.
2) A natural language requirements specifications is over flexible. You can say the same
thing in completely different ways.
3) There is no way to modularize natural language requirements. It may be difficult to find all
related requirements. To discover the consequence of the change, you may have to look at
every requirement rather than at just a group of related requirements.
Because of these problems, requirements specifications written in natural language are
prone to misunderstandings. It is essential to write the user requirements in a language that, even
a non-specialist can understand. However, you can write system requirements in more
sophisticated notations as shown below. These include stylished, structured natural language, and
graphical models of the requirements such as use-cases to formal mathematical specifications.
Notation Description
i) Structured natural This approach depends on defining
Language standard forms or templates to express
the requirements specification.
To use these, you must define one or more standard forms or templates to express the
requirements. The specifications may be structured around the objects manipulated by the
system, the functions performed by the system or events processed by the system. An example of
such a form-based specification is shown in Figure 4.6.
When a standard form is used for specifying functional requirements, the fallowing
information should be included:
Description of the function or entity being specified.
Description of inputs and from where these inputs are coming.
Description of it’s outputs and where these to go.
Indication of what other entities are used (the requires part).
UNIT II SOFTWARE REQUIREMENTS
If a functional approach is used, a pre-condition setting out on what must be true before
the function is called and a post condition specifying what is true after the function
called.
Description of the side effects (if any) of the operation.
Using the formatted specifications removes some of the problems of natural language
specification. Variability in the specification is reduced and requirements are organized in more
effectively.
However, it is difficult to write requirements in an unambiguous way, particularly when
complex computations are required. You can see this in the description shown in Figure 4.6.
where it isn't made clear what happens if the pre-condition is not satisfied.
To address this problem, you can add extra information to natural language requirements
using tables or graphical models of the system. These can show how computations proceed, how
the system state changes, how users interact with the system and how sequences of actions are
performed.
Graphical models are most useful when you need to show how state changes or where
you need to describe a sequence of actions. Figure 4.7 illustrates the sequence of actions when a
user wishes to withdraw cash from an automated teller machine (ATM).
You should read a sequence diagram from top to bottom to see the order of the actions
that take place. In Figure 4.7, there are three basic sub-sequences:
1. Validate card: The user's card is validated by checking the card number and user's PIN.
2. Handle request: The user's request is handled by the system. For a withdrawal, the database
must be queried to check the user's balance and to debit the amount withdrawn. Notice the
exception here if the requestor does not have enough money in their account.
3. Complete transaction: The user's card is returned and, when it is removed, the cash and
receipt are delivered.
UNIT II SOFTWARE REQUIREMENTS
The diversity of possible users means that the requirements document has to be a
compromise between communicating the requirements to customers, defining the requirements
in precise detail for developers and testers, and including information about possible system
evolution.
The level of detail that you should include in a requirements document depends on the
type of system that is being developed and the development process used. When the system will
be developed by an external contractor, critical system specifications need to be precise and very
detailed. When there is more flexibility in the requirements and where an in-house, iterative
development process is used, the requirements document can be much less detailed and any
ambiguities resolved during development of the system.
A number of large organizations, such as the US Department of Defense and the IEEE,
have defined standards for requirements documents. Davis discusses some of these standards and
compares their contents. The most widely known standard is IEEE/ANSI 830- 1998. This IEEE
standard suggests the following structure for requirements documents:
1. Introduction
1.1 Purpose of the requirements document
1.2 Scope of the product
1.3 Definitions, acronyms and abbreviations 1.4 References
1.5 Overview of the remainder of the document
Note: Abbreviations =>form a word or phrase that is shorter than it’s full form.
Acronym => formation of word or phrase with first letter. BSE is an acronym for
Bombay Stock Exchange.
2. General description
2.1 Product perspective
2.2 Product functions
2.3 User characteristics
2.4 General constraints
2.5 Assumptions and dependencies
UNIT II SOFTWARE REQUIREMENTS
4. Appendices
5. Index
Although the IEEE standard is not ideal, it contains a great deal of good advice on how to
write requirements and how to avoid problems. It is a general framework that can be tailored and
adapted to define a standard geared to the needs of a particular organization.
The information that is included in a requirements document must depend on the type of
software being developed and the approach to development that is used. If an evolutionary
approach is adopted for a software product (say), the requirements document will leave out many
of detailed chapters suggested above. The focus will be on defining the user requirements and
high-level, non-functional system requirements. In this case, the designers and programmers use
their judgment to decide how to meet the outline user requirements for the system.
By contrast, when the software is part of a large system engineering project that includes
interacting hardware and software systems, it is often essential to define the requirements to a
fine level of detail. This means that the requirements documents are likely to be very long and
should include most if not all of the chapters shown in Figure 4.9. For long documents, it is
particularly important to include a comprehensive table of contents and document index so that
readers can find the information that they need.
Figure 4.9 illustrates a possible organization for a requirements document that is based on
the IEEE standard.
Fig 4.9 The structure of a requirements document
UNIT II SOFTWARE REQUIREMENTS
4.6 Summary
Requirements for a software system set out what the system should do and define
constraints on its operation and implementation.
Functional requirements are statements of the services that the system must provide or
are descriptions of how some computations must be carried out. Domain requirements are
functional requirements that are derived from characteristics of the application domain.
Non-functional requirements constrain the system being developed and the development
process that should be used. They may be product requirements, organizational
requirements or external requirements. They often relate to the emergent properties of the
system and therefore apply to the system as a whole.
User requirements are intended for use by people involved in using and procuring the
system. They should be written using in natural language, with tables and diagrams
that are easily understood.
System requirements are intended to communicate, in a precise way, the functions that
the system must provide. To reduce ambiguity, they may be written in a structured form
of natural language supplemented by tables and system models.
The software requirements document is the agreed statement of the system requirements.
It should be organized so that both system customers and software developers can use it.
The IEEE standard for requirements documents is a useful starting point for more
specific requirements specification standards.
UNIT II SOFTWARE REQUIREMENTS
Exercises
2. Describe four types of non-functional requirements that may be placed on a system. Give
examples of each of these types of requirement.
3. Write a set of non-functional requirements for the ticket-issuing system, setting out its
expected reliability and its response time.
4. You have taken a job with a software user who has contracted your previous employer to
develop a system for them. You discover that your company's interpretation of the
requirements is different from the interpretation taken by your previous employer. Discuss
what you should do in such a situation. You know that the costs to your current employer
will increase if the ambiguities are not resolved. You have also a responsibility of
confidentiality to your previous employer.