+ All Categories
Home > Documents > ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software...

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software...

Date post: 22-Dec-2015
Category:
Upload: vincent-long
View: 223 times
Download: 3 times
Share this document with a friend
Popular Tags:
46
ommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements
Transcript
Page 1: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1

Chapter 5

Software Requirements

Page 2: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 2

Software Requirements

Descriptions and specifications of a system

Page 3: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 3

Objectives To introduce the concepts of user and system

requirements To describe functional and non-functional

requirements To explain two techniques for describing system

requirements To explain how software requirements may be

organized in a requirements document

Page 4: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 4

What is a requirement? Range from a high-level abstract statement of a

service or of a system constraint to a detailed mathematical functional specification

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

Page 5: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 5

Requirements engineering The requirements are the descriptions of the system

services and constraints

The requirements engineering is the process of establishing the customer services and addressing system constraints

Page 6: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 6

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

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 developers

Page 7: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 7

Requirements readersClient managersSystem end-usersClient engineersContractor managersSystem architects

System end-usersClient engineersSystem architectsSoftware developers

Client engineers (perhaps)System architectsSoftware developers

User requirements

System requirements

Software designspecification

Page 8: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 8

Topics covered

Functional and non-functional requirements

User requirements

System requirements

The software requirements document

Page 9: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 9

Functional and non-functional requirements

Functional requirements• Statements of services the system should provide, how the system

should react and behave in a certain condition.

Non-functional requirements• Emergent properties such as reliability, response time, availability,

not concerned with any specific functions delivered by the system.

Domain requirements• Requirements that come from the application domain of the system

and that reflect characteristics of that domain

Page 10: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 10

Functional requirements Describe functionality or system services

Functional user requirements are high-level statements

Functional system requirements describe system services in detail

Page 11: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 11

Examples of functional requirements

The user shall be able to search either all databases or specify a subset.

The system shall provide appropriate viewers for the user to read documents.

Every order shall be allocated a unique identifier (ORDER_ID).

Page 12: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 12

Requirements imprecision Problems arise when requirements are not precisely

stated Ambiguous requirements may be interpreted in

different ways by developers and users Consider the term ‘appropriate viewers’

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

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

Page 13: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 13

Requirements completeness and consistency

Typically, requirements should be both complete and consistent but may have difficulty in practice

Complete• The requirements should include descriptions of all facilities

required

Consistent• There should be no conflicts or contradictions in the

descriptions of the system facilities

Page 14: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 14

Non-functional requirements Define system properties and constraints e.g. reliability,

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

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

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

Page 15: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 15

Non-functional classifications Product requirements

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

Organizational requirements• Requirements which are a consequence of organizational 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.

Page 16: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 16

Non-functional requirement types

Performancerequirements

Spacerequirements

Usabilityrequirements

Efficiencyrequirements

Reliabilityrequirements

Portabilityrequirements

Interoperabilityrequirements

Ethicalrequirements

Legislativerequirements

Implementationrequirements

Standardsrequirements

Deliveryrequirements

Safetyrequirements

Privacyrequirements

Productrequirements

Organizationalrequirements

Externalrequirements

Non-functionalrequirements

Page 17: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 17

Non-functional requirements examples Product requirement

• Performance requirements on how fast the system must execute

Organizational requirement• Process standards which must be used in the organization

External requirement• Legislative requirements which must be followed

Page 18: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 18

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

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

Page 19: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 19

Examples A system goal

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

A verifiable non-functional requirement• Experienced controllers shall be able to use all the system

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

Page 20: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 20

Requirements measuresProperty MeasureSpeed Processed transactions/second

User/Event response timeScreen refresh time

Size K BytesNumber of RAM chips

Ease of use Training timeNumber of help frames

Reliability Mean time to failureProbability of unavailabilityRate of failure occurrenceAvailability

Robustness Time to restart after failurePercentage of events causing failureProbability of data corruption on failure

Portability Percentage of target dependent statementsNumber of target systems

Page 21: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 21

Requirements interaction Conflicts between different non-functional

requirements are common in complex systems

Spacecraft system – an example• To minimise weight with few chips

• To minimise power consumption with low power chips

• However, using low power chips need more chips

Which is the most critical requirement?

Page 22: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 22

Domain requirements Requirements and features are for a specific domain.

Domain requirements have specific functions, constraints or computations

The system may not work if domain requirements are not satisfied

Page 23: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 23

Train protection system

A specific computation function for train domain:

The deceleration of the train shall be computed as:

Dtrain = Dcontrol + Dgradient

where Dgradient is 9.81ms2 * compensated gradient/alpha and where the values of 9.81ms2 /alpha are known for different types of train.

Page 24: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 24

Domain requirements problems Understandability

• Requirements are expressed in the language of the application domain, resulting in understanding problems for software engineers

Implicitness• Domain specialists understand the area so well that they

do not think of making the domain requirements explicit

Page 25: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 25

Topics covered

Functional and non-functional requirements

User requirements

System requirements

The software requirements document

Page 26: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 26

User requirements

Describe functional and non-functional requirements for users who don’t have technical knowledge

Use natural language, tables and diagrams

Page 27: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 27

Problems with natural language Ambiguity

• Readers and writers may interpret the same words differently.

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

Requirements amalgamation• Several different requirements may be expressed together

Over-flexibility• The same thing may be described in different ways in the specification

Lack of modularization• NL structures are inadequate to structure system requirements

Page 28: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 28

Editor grid requirement

2.6 Grid facilities To assist in the positioning of entities on a diagram, the user may turn on a grid in either centimetres or inches, via an option on the control panel. Initially, the grid is off. The grid may be turned on and off at any time during an editing session and can be toggled between inches and centimetres at any time. A grid option will be provided on the reduce-to-fit view but the number of grid lines shown will be reduced to avoid filling the smaller diagram with grid lines.

Page 29: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 29

Guidelines for user requirements Invent a standard format and use it for all

requirements

Use language in a consistent way.

Use text highlighting to identify key parts of the requirement

Avoid the use of computer jargon

Page 30: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 30

Structured presentation

2.6 Grid facilities2.6.1 The editor shall provide a grid facility where a matrix of

horizontal and vertical lines provide a background to the editor window. This grid shall be a passive grid where the alignment of entities is the user's responsibility.

Rationale: A grid helps the user to create a tidy diagram with well-spaced entities. Although an active grid, where entities 'snap-to' grid lines can be useful, the positioning is imprecise. The user is the best person to decide where entities should be positioned.

Specification: ECLIPSE/WS/Tools/DE/FS Section 5.6

Page 31: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 31

Topics covered

Functional and non-functional requirements

User requirements

System requirements

The software requirements document

Page 32: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 32

System requirements

More detailed specifications of user requirements

Serve as a basis for designing the system

May be used as part of the system contract

System requirements may be expressed using system models (data-flow model, object model, etc.)

Page 33: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 33

Requirements and design

Requirements care about “what the system should do”

Design cares about “how to fulfill the requirements”

Page 34: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 34

Two Alternatives to NL specification

Structured natural language specifications

PDL-based definitions

Page 35: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 35

Structured NL specifications A limited form of natural language may be used to

express requirements

This removes the problems of ambiguity and flexibility and supports uniformity

Page 36: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 36

Structured NL -- Form-basedECLIPSE/Workstation/Tools/DE/FS/3.5.1

Function Add node

Description Adds a node to an existing design. The user selects the type of node, and its position.When added to the design, the node becomes the current selection. The user chooses the node position bymoving the cursor to the area where the node is added.

Inputs Node type, Node position, Design identifier.

Source Node type and Node position are input by the user, Design identifier from the database.

Outputs Design identifier.

Destination The design database. The design is committed to the database on completion of theoperation.

Requires Design graph rooted at input design identifier.

Pre-condition The design is open and displayed on the user's screen.

Post-condition The design is unchanged apart from the addition of a node of the specified typeat the given position.

Side-effects None

Definition: ECLIPSE/Workstation/Tools/DE/RD/3.5.1

Page 37: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 37

PDL-based requirements definition A programming language like description but with more

flexibility of expression

Appropriate in two situations• Where an operation is specified as a sequence of actions and

the order is important

• When interfaces have to be specified

Page 38: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 38

Part of an ATM specificationclass ATM {

// declarations herepublic static void main (String args[]) throws InvalidCard {

try {thisCard.read () ; // may throw InvalidCard exceptionpin = KeyPad.readPin () ; attempts = 1 ;while ( !thisCard.pin.equals (pin) & attempts < 4 )

{ pin = KeyPad.readPin () ; attempts = attempts + 1 ;}if (!thisCard.pin.equals (pin))

throw new InvalidCard ("Bad PIN");thisBalance = thisCard.getBalance () ;do { Screen.prompt (" Please select a service ") ;

service = Screen.touchKey () ;switch (service) {

case Services.withdrawalWithReceipt:receiptRequired = true ;

Page 39: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 39

PDL disadvantages PDL may not be sufficiently expressive to express the

system functionality in an understandable way

Notation is only understandable to people with programming language knowledge

The requirement may be taken as a design specification rather than a model to help understand the system

Page 40: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 40

Topics covered

Functional and non-functional requirements

User requirements

System requirements

The software requirements document

Page 41: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 41

IEEE requirements standard Introduction General description Specific requirements Appendices Index This is a generic structure that must be instantiated for

specific systems

Page 42: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 42

Requirements document structure Introduction Glossary User requirements definition System architecture System requirements specification System models System evolution Appendices Index

Page 43: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 43

Requirements Specification – Volere Template

Table of Contents Project Drivers

1. The Purpose of the Product2. Client, Customer and Stakeholders3. Users of the Product

Project Constraints1. Mandated Constraints2. Naming Conventions and Definitions3. Relevant Facts and Assumptions

Functional Requirements1. The Scope of the Work2. The Scope of the Product3. Functional and Data Requirements

Page 44: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 44

Requirements Specification – Volere Template

Non-Functional Requirements1. Look and Feel Requirements

2. Usability Requirements

3. Performance Requirements

4. Operational Requirements

5. Maintainability and Portability Requirements

6. Security Requirements

7. Cultural and Political Requirements

8. Legal Requirements

Project Constraints1. Open Issues

2. Off-the-Shelf Solutions

3. New Problems

4. Tasks

5. Cutover

6. Risks

7. Costs

8. User Documentation and Training

9. Waiting Room

10. Ideas for Solutions

Page 45: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 45

Key points Requirements set out what the system should do and

define constraints on its operation and implementation Functional requirements set out services the system

should provide Non-functional requirements constrain the system

being developed or the development process User requirements are high-level statements of what

the system should do

Page 46: ©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Chapter 5 Software Requirements.

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 46

Key points User requirements should be written in natural

language, tables and diagrams System requirements are intended to communicate the

functions that the system should provide System requirements may be written in structured

natural language, a PDL or in a formal language A software requirements document is an agreed

statement of the system requirements


Recommended