• No results found

Software Requirements

N/A
N/A
Protected

Academic year: 2021

Share "Software Requirements"

Copied!
11
0
0

Loading.... (view fulltext now)

Full text

(1)

Stan Kurkovsky

Software Engineering Software Engineering

Software Software Requirements Requirements

Based on Software Engineering, 7

th

Edition by Ian Sommerville

Objectives Objectives

• • To introduce the concepts of user and system requirements To introduce the concepts of user and system requirements

• To describe functional and non To describe functional and non- -functional requirements functional requirements

• • To explain how software requirements may be organised in a To explain how software requirements may be organised in a requirements document

requirements document

(2)

Stan Kurkovsky

Requirements engineering Requirements engineering

• The process of establishing the services The process of establishing the services that the customer requires from that the customer requires from a system

a system and the constraints and the constraints under which it operates and is developed. under which it operates and is developed.

• • The requirements themselves are the descriptions of the system s The requirements themselves are the descriptions of the system services ervices and constraints that are generated during the requirements engin

and constraints that are generated during the requirements engineering eering process.

process.

• Requirements may range from a high Requirements may range from a high- -level abstract statement of a level abstract statement of a service or of a system constraint to a detailed mathematical fun service or of a system constraint to a detailed mathematical functional ctional specification.

specification.

• This is inevitable as requirements may serve a dual function This is inevitable as requirements may serve a dual function

• May be the basis for a bid for a contract - May be the basis for a bid for a contract - therefore must be open to therefore must be open to interpretation;

interpretation;

• May be the basis for the contract itself - May be the basis for the contract itself - therefore must be defined in detail; therefore must be defined in detail;

• • Both these statements may be called requirements. Both these statements may be called requirements.

Types of requirements Types of requirements

• • User requirements User requirements

• Statements in natural language plus diagrams of the services the Statements in natural language plus diagrams of the services the system system provides and its operational constraints. Written for customers.

provides and its operational constraints. Written for customers.

• System requirements System requirements

• A structured document setting out detailed descriptions of the system A structured document setting out detailed descriptions of the s ystem’ ’s s

functions, services and operational constraints. Defines what sh

functions, services and operational constraints. Defines what should be ould be

implemented so may be part of a contract between client and cont

implemented so may be part of a contract between client and contractor. ractor.

(3)

Stan Kurkovsky

Functional and non

Functional and non- -functional requirements functional requirements

• Functional requirements Functional requirements

• • Statements of services the system should provide, how the system Statements of services the system should provide, how the system should should react to particular inputs and how the system should behave in p

react to particular inputs and how the system should behave in particular articular situations.

situations.

• • Non Non- -functional requirements functional requirements

• Constraints on the services or functions offered by the system such as timing Constraints on the services or functions offered by the system s uch as timing constraints, constraints on the development process, standards,

constraints, constraints on the development process, standards, etc. etc.

• Domain requirements Domain requirements

• Requirements that come from the application domain of the system Requirements that come from the application domain of the system and that and that reflect characteristics of that domain.

reflect characteristics of that domain.

Functional requirements Functional requirements

• • Describe functionality or system services. Describe functionality or system services.

• Depend on the type of software, expected users and the type of s Depend on the type of software, expected users and the type of system ystem where the software is used.

where the software is used.

• • Functional user requirements may be high Functional user requirements may be high- -level statements of what the level statements of what the system should do but functional system requirements should descr system should do but functional system requirements should describe the ibe the system services in detail.

system services in detail.

• Examples Examples

• • The user shall be able to search either all of the initial set of databases or The user shall be able to search either all of the initial set o f databases or select a subset from it.

select a subset from it.

• • The system shall provide appropriate viewers for the user to read documents The system shall provide appropriate viewers for the user to rea d documents in the document store.

in the document store.

• • Every order shall be allocated a unique identifier (ORDER_ID) which the user Every order shall be allocated a unique identifier (ORDER_ID) wh ich the user shall be able to copy to the account

shall be able to copy to the account’ ’s permanent storage area. s permanent storage area.

(4)

Stan Kurkovsky

Requirements imprecision, completeness and consistency Requirements imprecision, completeness and consistency

• Problems arise when requirements are not precisely stated. Problems arise when requirements are not precisely stated.

• • Ambiguous requirements Ambiguous requirements may be interpreted in different ways by may be interpreted in different ways by developers and users.

developers and users.

• Consider the term Consider the term ‘ ‘appropriate viewers appropriate viewers’ ’

• • User intention - User intention - special purpose viewer for each different document type; special purpose viewer for each different document type;

• Developer interpretation - Developer interpretation - provide a text viewer that shows the contents of provide a text viewer that shows the contents of the document.

the document.

• • In principle, In principle, requirements should be both complete and consistent requirements should be both complete and consistent. .

• Complete Complete

• • They should include descriptions of all facilities required. They should include descriptions of all facilities required.

• • Consistent Consistent

• There should be no conflicts or contradictions in the descriptions of There should be no conflicts or contradictions in the descriptio ns of the system facilities.

the system facilities.

• • In practice, it is impossible to produce a complete and consiste In practice, it is impossible to produce a complete and consistent nt requirements document.

requirements document.

Non- Non -functional requirements functional requirements

• • Define system properties and constraints Define system properties and constraints e.g. reliability, response time e.g. reliability, response time and storage requirements. Constraints are I/O device capability,

and storage requirements. Constraints are I/O device capability, system system representations, etc.

representations, etc.

• Process requirements may also be specified mandating a particula Process requirements may also be specified mandating a particular CASE r CASE system, programming language or development method.

system, programming language or development method.

• • Non Non- -functional requirements may be more critical than functional functional requirements may be more critical than functional requirements. If these are not met, the system is useless.

requirements. If these are not met, the system is useless.

• Examples Examples

• Product requirement Product requirement

8.1 The user interface for LIBSYS shall be implemented as simple

8.1 The user interface for LIBSYS shall be implemented as simple HTML without HTML without frames or Java applets.

frames or Java applets.

• • Organisational requirement Organisational requirement

9.3.2 The system development process and deliverable documents

9.3.2 The system development process and deliverable documents shall conform to shall conform to the process and deliverables defined in XYZCo

the process and deliverables defined in XYZCo- -SP SP- -STAN STAN- -95. 95.

• • External requirement External requirement

7.6.5 The system shall not disclose any personal information ab

7.6.5 The system shall not disclose any personal information about customers apart out customers apart from their name and reference number to the operators of the sys

from their name and reference number to the operators of the system. tem.

(5)

Stan Kurkovsky

Non- Non -functional requirement types functional requirement types

• • Product requirements Product requirements

• • Requirements which specify that the delivered product must behave in a Requirements which specify that the delivered product must behav e in a particular way e.g. execution speed, reliability, etc.

particular way e.g. execution speed, reliability, etc.

• Organisational requirements Organisational requirements

• • Requirements which are a consequence of organisational policies and Requirements which are a consequence of organisational policies and procedures e.g. process standards used, implementation requireme procedures e.g. process standards used, implementation requirements, etc. nts, etc.

• • External requirements External requirements

• Requirements which arise from factors Requirements which arise from factors which are external to the system and its which are external to the system and its development process e.g.

development process e.g.

interoperability requirements, interoperability requirements, legislative requirements, etc.

legislative requirements, etc.

Goals and requirements Goals and requirements

• • Non Non- -functional requirements may be very difficult to state precisely functional requirements may be very difficult to state precisely and and imprecise requirements may be difficult to verify.

imprecise requirements may be difficult to verify.

• Goal Goal

• • A general intention of the user such as ease of use. A general intention of the user such as ease of use.

• Verifiable non Verifiable non- -functional requirement functional requirement

• • A statement using some measure that can be objectively tested. A statement using some measure that can be objectively tested.

• Goals are helpful to developers as they convey the intentions of Goals are helpful to developers as they convey the intentions of the the system users.

system users.

• • Examples Examples

• • A system goal A system goal

• • The system should be easy to use by experienced controllers and The system should be easy to use by experienced controllers and should be should be organised in such a way that user errors are minimised.

organised in such a way that user errors are minimised.

• • A verifiable non- A verifiable non -functional requirement functional requirement

• Experienced controllers shall be able to use all the system func Experienced controllers shall be able to use all the system functions after a total of tions after a total of two hours training. After this training, the average number of e

two hours training. After this training, the average number of errors made by rrors made by experienced users shall not exceed two per day.

experienced users shall not exceed two per day.

(6)

Stan Kurkovsky

Requirements measures Requirements measures

Property Measure

Speed Processed transactions/second User/Event response time Screen refresh time Size M Bytes

Number of ROM chips Ease of use Training time

Number of help frames Reliability Mean time to failure

Probability of unavailability Rate of failure occurrence Availability

Robustness Time to restart after failure

Percentage of events causing failure Probability of data corruption on failure Portability Percentage of target dependent statements

Number of target systems

Requirements interaction Requirements interaction

• • Conflicts Conflicts between different non- between different non -functional requirements are common in functional requirements are common in complex systems.

complex systems.

• Spacecraft system Spacecraft system

• • To minimise weight, the number of separate chips in the system should be To minimise weight, the number of separate chips in the system s hould be minimised.

minimised.

• To minimise power consumption, lower power chips should be used. To minimise power consumption, lower power chips should be used.

• • However, using low power chips may mean that more chips have to be used. However, using low power chips may mean that more chips have to be used.

Which is the most critical requirement?

Which is the most critical requirement?

(7)

Stan Kurkovsky

Domain requirements Domain requirements

• Derived from the application domain and describe system characte Derived from the application domain and describe system characteristics ristics and features that reflect the domain.

and features that reflect the domain.

• • Domain requirements may be new functional requirements, constrai Domain requirements may be new functional requirements, constraints nts on existing requirements or define specific computations.

on existing requirements or define specific computations.

• If domain requirements are not satisfied, the system may be unwo If domain requirements are not satisfied, the system may be unworkable. rkable.

• • Problems: Problems:

• • Understandability Understandability

• Requirements are expressed in the language of the application do Requirements are expressed in the language of the application domain; main;

• This is often not understood by software engineers developing th This is often not understood by software engineers developing the system. e system.

• Implicitness Implicitness

• Domain specialists understand the area so well that they do not Domain specialists understand the area so well that they do not think of making think of making the domain requirements explicit.

the domain requirements explicit.

User requirements User requirements

• • Should describe functional and non Should describe functional and non- -functional requirements in such a way functional requirements in such a way that they are

that they are understandable by system users understandable by system users who don who don’ ’t have detailed t have detailed technical knowledge.

technical knowledge.

• User requirements are defined using User requirements are defined using natural language, tables and natural language, tables and diagrams

diagrams as these can be understood by all users. as these can be understood by all users.

• • Problems with natural language Problems with natural language

• Lack of clarity Lack of clarity

• Precision is difficult without making the document difficult to Precision is difficult without making the document difficult to read. read.

• • Requirements confusion Requirements confusion

• Functional and non Functional and non- -functional requirements tend to be mixed functional requirements tend to be mixed- -up. up.

• • Requirements amalgamation Requirements amalgamation

• Several different requirements may be expressed together. Several different requirements may be expressed together.

• • Writing guidelines Writing guidelines

• Invent a standard format and use it for all requirements. Invent a standard format and use it for all requirements.

• • Use language in a consistent way. Use shall for mandatory requirements, Use language in a consistent way. Use shall for mandatory requir ements, should for desirable requirements.

should for desirable requirements.

• Use text highlighting to identify key parts of the requirement. Use text highlighting to identify key parts of the requirement.

• • Avoid the use of computer jargon. Avoid the use of computer jargon.

(8)

Stan Kurkovsky

System requirements System requirements

• More More detailed specifications detailed specifications of system functions, services and constraints of system functions, services and constraints than user requirements.

than user requirements.

• • They are intended to be a basis for designing the system. They are intended to be a basis for designing the system.

• They may be incorporated into the system contract. They may be incorporated into the system contract.

• System requirements may be defined or illustrated using system m System requirements may be defined or illustrated using system models. odels.

• In principle, requirements should state what the system should d In principle, requirements should state what the system should do and o and the design should describe how it does this.

the design should describe how it does this.

• • In practice, requirements and design are inseparable In practice, requirements and design are inseparable

• • A system architecture may be designed to structure the requirements; A system architecture may be designed to structure the requireme nts;

• • The system may inter- The system may inter -operate with other systems that generate design operate with other systems that generate design requirements;

requirements;

• The use of a specific design may be a domain requirement. The use of a specific design may be a domain requirement.

Problems with natural language specification Problems with natural language specification

• Ambiguity Ambiguity

• • The readers and writers of the requirement must interpret the same words in The readers and writers of the requirement must interpret the sa me words in the same way. NL is naturally ambiguous so this is very difficul

the same way. NL is naturally ambiguous so this is very difficult. t.

• • Over Over- -flexibility flexibility

• The same thing may be said in a number of different ways in the The same thing may be said in a number of different ways in the specification.

specification.

• • Lack of modularisation Lack of modularisation

• • NL structures are inadequate to structure system requirements. NL structures are inadequate to structure system requirements.

Alternatives Alternatives

Notation Description Structured natural

language This approach depends on defining standard forms or templates to express the requirements specification.

Design description

languages This approach uses a language like a programming language but with more abstract features to specify the requirements by defining an operational model of the system. This approach is not now widely used although it can be useful for interface specifications.

Graphical notations A graphical language, supplemented by text annotations is used to define the functional requirements for the system. An early example of such a graphical language was SADT. Now, use-case descriptions and sequence diagrams are commonly used .

Mathematical

specifications These are notations based on mathematical concepts such as finite-state machines or sets. These

unambiguous specifications reduce the arguments between customer and contractor about system

functionality. However, most customers don’t understand formal specifications and are reluctant to

accept it as a system contract.

(9)

Stan Kurkovsky

Representing requirements Representing requirements

• • Structured language specifications Structured language specifications

• • Limited by a predefined template for requirements. Limited by a predefined template for requirements.

• All requirements are written in a standard way. All requirements are written in a standard way.

• The terminology used in the description may be limited. The terminology used in the description may be limited.

• The advantage is that the most of the expressiveness of natural language is The advantage is that the most of the expressiveness of natural language is maintained but a degree of uniformity is imposed on the specific

maintained but a degree of uniformity is imposed on the specification. ation.

• • Form Form- -based specifications based specifications

• • Definition of the function or entity. Definition of the function or entity.

• Description of inputs and where they come from. Description of inputs and where they come from.

• Description of outputs and where they go to. Description of outputs and where they go to.

• Indication of other entities required. Indication of other entities required.

• Pre and post conditions (if appropriate). Pre and post conditions (if appropriate).

• The side effects (if any) of the function. The side effects (if any) of the function.

• Tabular specification Tabular specification

• • Used to supplement natural language. Used to supplement natural language.

• • Particularly useful when you have to define a number of possible Particularly useful when you have to define a number of possible alternative alternative courses of action.

courses of action.

• Graphical models Graphical models

• • Graphical models are most useful when you need to show how state Graphical models are most useful when you need to show how state changes changes or where you need to describe a sequence of actions.

or where you need to describe a sequence of actions.

Sequence diagrams Sequence diagrams

• • These show the sequence of events that take place during some us These show the sequence of events that take place during some user er interaction with a system.

interaction with a system.

• You read them from top to bottom You read them from top to bottom to see the order of the actions to see the order of the actions that take place.

that take place.

• • Cash withdrawal from an ATM Cash withdrawal from an ATM

• Validate card; Validate card;

• • Handle request; Handle request;

• Complete transaction. Complete transaction.

(10)

Stan Kurkovsky

Interface specification Interface specification

• Most systems must operate with other systems and the operating Most systems must operate with other systems and the operating interfaces must be specified as part of the requirements.

interfaces must be specified as part of the requirements.

• • Three types of interface may have to be defined Three types of interface may have to be defined

• Procedural interfaces; Procedural interfaces;

• • Data structures that are exchanged; Data structures that are exchanged;

• Data representations. Data representations.

• • Formal notations are an effective technique for interface specif Formal notations are an effective technique for interface specification. ication.

The requirements document The requirements document

• • The requirements document is the official statement of what is r The requirements document is the official statement of what is required equired of the system developers.

of the system developers.

• Should include both a definition Should include both a definition of user requirements and a of user requirements and a specification of the system specification of the system requirements.

requirements.

• • It is NOT a design document. It is NOT a design document.

As far as possible, it should set As far as possible, it should set WHAT the system should do WHAT the system should do rather than HOW it should do it.

rather than HOW it should do it.

(11)

Stan Kurkovsky

Requirements document structure Requirements document structure

• Preface Preface

• • Introduction Introduction

• Glossary Glossary

• User requirements definition User requirements definition

• • System architecture System architecture

• System requirements specification System requirements specification

• • System models System models

• System evolution System evolution

• • Appendices Appendices

• Index Index

Summary Summary

• • Requirements set out what the system should do and define constr Requirements set out what the system should do and define constraints aints on its operation and implementation.

on its operation and implementation.

• Functional requirements set out services the system should provi Functional requirements set out services the system should provide. de.

• • Non Non- -functional requirements constrain the system being developed or functional requirements constrain the system being developed or the the development process.

development process.

• User requirements are high User requirements are high- -level statements of what the system should level statements of what the system should do. User requirements should be written using natural language, do. User requirements should be written using natural language, tables tables and diagrams.

and diagrams.

• System requirements are intended to communicate the functions th System requirements are intended to communicate the functions that the at the system should provide.

system should provide.

• • A software requirements document is an agreed statement of the s A software requirements document is an agreed statement of the system ystem requirements.

requirements.

• The IEEE standard is a useful starting point for defining more d The IEEE standard is a useful starting point for defining more detailed etailed specific requirements standards.

specific requirements standards.

References

Related documents

Therefore, it is suggested that Leaders of SMEs should be careful in their use of High-High leadership styles (High Consideration and High Initiating Structure) even though this

Those customers who take a risk-based approach to developing enterprise cybersecurity policy and related solutions can deploy their resources and implement controls in a way

The two fundamental approaches are feature-based quantification, relying on the summed-up mass spectrometric intensity of peptides, and spectral counting, which relies on the number

We piloted BCST in safe and unsafe older drivers and hypothesized that (a) safe drivers perform better in BCST than unsafe drivers; (b) BCST is better tolerated than driving

The required return on equity of a particular project (or fi rm) is among other things based on the chosen discount rate for the expected tax shields (r TS ) from interest bea-

In the second step the reduced form pro…ts, the policy functions for investment, R&D and exit are estimated as well as the transition functions for productivity and the

For Saudi Arabian consumers, perceived psychological, social, and privacy risks appeared to negatively influence consumers' intention to shop online for apparel products.. On the

Minors, mentally disabled persons, prodigals and – in some cases – women remained protected, but all other forms of protection were formalised under the in fl uence of the notion