Un it 2-se-mod-staff

51
UNIT-2 Software Requirements

description

dsda

Transcript of Un it 2-se-mod-staff

Page 1: Un it 2-se-mod-staff

UNIT-2 Software Requirements

Page 2: Un it 2-se-mod-staff

Requirements engineering

• The process of establishing the services that the customer requires from a system and the constraints under which it operates and is developed.

• The requirements themselves are the descriptions of the system services and constraints that are generated during the requirements engineering process.

Page 3: Un it 2-se-mod-staff

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 offer for a contract - therefore

must be open to interpretation(explanation);– May be the basis for the contract itself - therefore

must be defined in detail;– Both these statements may be called requirements.

Page 4: Un it 2-se-mod-staff

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.

Page 5: Un it 2-se-mod-staff

Definitions and specifications

System req specification: Extenal file+have a ass tool+it display spec icon for user +provide facility for icon it represent external file type

User req Definitions: representing and access EXT files created by other tools

Page 6: Un it 2-se-mod-staff

Requirements readersClient managersSystem end-usersClient engineersContractor managersSystem architects

System end-usersClient engineersSystem architectsSoftware developers

Client engineers (perhaps)System architectsSoftware developers

Userrequirements

Systemrequirements

Software designspecification

Page 7: Un it 2-se-mod-staff

Functional and non-functional requirements

• 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.

• Non-functional requirements– constraints on the services or functions offered by the

system such as timing constraints, constraints on the development process, standards, etc.

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

the system and that reflect characteristics of that domain.

Page 8: Un it 2-se-mod-staff

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 but functional system requirements should describe the system services in detail.

Page 9: Un it 2-se-mod-staff

The LIBSYS system

• A library system that provides a single interface to a number of databases of articles in different libraries.

• Users can search for, download and print these articles for personal study.

Page 10: Un it 2-se-mod-staff

Examples of functional requirements

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

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

• Every order shall be allocated a unique identifier (ORDER_ID) which the user shall be able to copy to the account’s permanent storage area.

Page 11: Un it 2-se-mod-staff

Requirements imprecision(problem)

• 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 12: Un it 2-se-mod-staff

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 contradiction in the descriptions of the system facilities.

.

Page 13: Un it 2-se-mod-staff

Non-functional requirements

• These 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 14: Un it 2-se-mod-staff

Non-functional classifications

• 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.

Page 15: Un it 2-se-mod-staff

Non-functional requirement types

Performancerequirements

Spacerequirements

Usabilityrequirements

Efficiencyrequirements

Reliabilityrequirements

Portabilityrequirements

Interoperabilityrequirements

Ethicalrequirements

Legislativerequirements

Implementationrequirements

Standardsrequirements

Deliveryrequirements

Safetyrequirements

Privacyrequirements

Productrequirements

Organisationalrequirements

Externalrequirements

Non-functionalrequirements

Page 16: Un it 2-se-mod-staff

Non-functional requirements examples• Product requirement

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

• Organisational requirementThe system development process and deliverable documents shall conform

to the process and deliverables.

• External requirement The system shall not disclose any personal information about customers

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

Page 17: Un it 2-se-mod-staff

The requirements document

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

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

• It is NOT a design document. As far as possible, it should set of WHAT the system should do rather than HOW it should do it

Page 18: Un it 2-se-mod-staff

Users of a requirements document

Use the requirements todevelop validation tests for

the system

Use the requirementsdocument to plan a bid forthe system and to plan the

system development process

Use the requirements tounderstand what system is to

be developed

System testengineers

Managers

Systemengineers

Specify the requirements andread them to check that they

meet their needs. Theyspecify changes to the

requirements

Systemcustomers

Use the requirements to helpunderstand the system and

the relationships between itsparts

Systemmaintenanceengineers

Page 19: Un it 2-se-mod-staff

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

Page 20: Un it 2-se-mod-staff

IEEE requirements standard

• Defines a generic structure for a requirements document that must be instantiated for each specific system. – Introduction.– General description.– Specific requirements.– Appendices.– Index.

Page 21: Un it 2-se-mod-staff

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– Feasibility studies– Requirements elicitation;– Requirements analysis;– Requirements validation;– Requirements management.

Page 22: Un it 2-se-mod-staff

The requirements engineering process

Feasibilitystudy

Requirementselicitation and

analysisRequirementsspecification

Requirementsvalidation

Feasibilityreport

Systemmodels

User and systemrequirements

Requirementsdocument

Page 23: Un it 2-se-mod-staff

Requirements engineering

Requirementsspecification

Requirementsvalidation

Requirementselicitation

System requirementsspecification and

modeling

Systemrequirements

elicitation

User requirementsspecification

Userrequirements

elicitation

Business requirementsspecification

Prototyping

Feasibilitystudy

Reviews

System requirementsdocument

Page 24: Un it 2-se-mod-staff

Feasibility studies[possible analysis]

• A feasibility study decides whether or not the proposed system is worthwhile.

• A short focused study that checks– If the system contributes to organisational

objectives;– If the system can be engineered using current

technology and within budget;– If the system can be integrated with other systems

that are used.

Page 25: Un it 2-se-mod-staff

Feasibility study implementation

• Based on information assessment (what is required), information collection and report writing.

• Questions for people in the organisation– What if the system wasn’t implemented?– What are current process problems?– How will the proposed system help?– What will be the integration problems?– Is new technology needed? What skills?– What facilities must be supported by the proposed

system?

Page 26: Un it 2-se-mod-staff

Software prototyping

• A prototype is an initial version of a system used to demonstrate concepts and try out design options.

• A prototype can be used in:– The requirements engineering process to help

with requirements elicitation and validation;– In design processes to explore options and

develop a UI design;– In the testing process to run back-to-back tests.

Page 27: Un it 2-se-mod-staff

Prototyping

• For some large systems, incremental iterative development and delivery may be impractical; this is especially true when multiple teams are working on different sites.

• Prototyping, where an experimental system is developed as a basis for formulating the requirements may be used. This system is thrown away when the system specification has been agreed.

Page 28: Un it 2-se-mod-staff

Benefits of prototyping

• Improved system usability.• A closer match to users’ real needs.• Improved design quality.• Improved maintainability.• Reduced development effort.

Page 29: Un it 2-se-mod-staff

Back to back testingTest data

Resultscomparator

Systemprototype

Applicationsystem

Differencereport

Page 30: Un it 2-se-mod-staff

The prototyping process

Establishprototypeobjectives

Defineprototype

functionality

Developprototype

Evaluateprototype

Prototypingplan

Outlinedefinition

Executableprototype

Evaluationreport

Page 31: Un it 2-se-mod-staff

Throw-away prototypes

• Prototypes should be discarded after development as they are not a good basis for a production system:– It may be impossible to tune the system to meet

non-functional requirements;– Prototypes are normally undocumented;– The prototype structure is usually degraded

through rapid change;– The prototype probably will not meet normal

organisational quality standards.

Page 32: Un it 2-se-mod-staff

TCS2411 Software Engineering 32

Functional Modeling

• In understanding the requirements of the software, the functions required by the customer will be identified

• All the functions process information in some way in the system

• Basically input process output• Representation of how information is

transformed

Page 33: Un it 2-se-mod-staff

Data-processing models

• Data flow diagrams (DFDs) may be used to model the system’s data processing.

• These show the processing steps as data flows through a system.

• DFDs are an intrinsic part of many analysis methods.

• Simple and intuitive notation that customers can understand.

• Show end-to-end processing of data.

Page 34: Un it 2-se-mod-staff

Order processing DFD

Completeorder form

Orderdetails +

blankorder form

Validateorder

Recordorder

Send tosupplier

Adjustavailablebudget

Budgetfile

Ordersfile

Completedorder form

Signedorder form

Signedorder form

Checked andsigned order

+ ordernotification

Orderamount

+ accountdetails

Signedorder form

Orderdetails

Page 35: Un it 2-se-mod-staff

Data flow diagrams

• DFDs model the system from a functional perspective.

• Tracking and documenting how the data associated with a process is helpful to develop an overall understanding of the system.

• Data flow diagrams may also be used in showing the data exchange between a system and other systems in its environment.

Page 36: Un it 2-se-mod-staff

Insulin pump DFD

Insulinrequirementcomputation

Blood sugaranalysis

Blood sugarsensor

Insulindelivery

controller

Insulinpump

Blood

Bloodparameters

Blood sugarlevel

Insulin

Pump controlcommands Insulin

requirement

Page 37: Un it 2-se-mod-staff

Behavioural models

• Behavioural models are used to describe the overall behaviour of a system.

• Two types of behavioural model are:– Data processing models that show how data is

processed as it moves through the system;– State machine models that show the systems

response to events.• These models show different perspectives so

both of them are required to describe the system’s behaviour.

Page 38: Un it 2-se-mod-staff

State machine models

• These model the behaviour of the system in response to external and internal events.

• They show the system’s responses to stimuli so are often used for modelling real-time systems.

• State machine models show system states as nodes and events as arcs between these nodes. When an event occurs, the system moves from one state to another.

• Statecharts are an integral part of the UML and are used to represent state machine models.

Page 39: Un it 2-se-mod-staff

Statecharts

• Allow the decomposition of a model into sub-models (see following slide).

• A brief description of the actions is included following the ‘do’ in each state.

• Can be complemented by tables describing the states and the stimuli.

Page 40: Un it 2-se-mod-staff

Microwave oven state descriptionState Description

Waiting The oven is waiting for input. The display shows the current time.

Half power The oven power is set to 300 watts. The display shows ŌHalf powerÕ.

Full power The oven power is set to 600 watts. The display shows ŌFull powerÕ.

Set time The cooking time is s et to the userÕs input value. The display shows the cooking timeselected and is updated as the time is set.

Disabled Oven operation is disabled for safety. Interior oven light is on. Display shows ŌNotreadyÕ.

Enabled Oven operation is enabled. Interior oven light is off. Display shows ŌReady to cookÕ.

Operation Oven in operation. Interior oven light is on. Display shows the timer countdown. Oncompletion of cooking, the buzzer is sounded for 5 s econds. Oven light is on. Displayshows ŌCooking completeÕ while buzzer is sounding.

Page 41: Un it 2-se-mod-staff

Microwave oven stimuli

Stimulus Description

Half power The user has pressed the half power button

Full power The user has pressed the full power button

Timer The user has pressed one of the timer buttons

Number The user has pressed a numeric key

Door open The oven door switch is not closed

Door closed The oven door switch is closed

Start The user has pressed the start button

Cancel The user has pressed the cancel button

Page 42: Un it 2-se-mod-staff

Microwave oven operation

Cookdo:run

generator

Done

do:buzzer onfor 5 secs.

Waiting

Alarm

do:displayevent

do:checkstatus

Checking

Turntablefault

Emitterfault

Disabled

OK

Timeout

Time

Door open Cancel

Operation

Page 43: Un it 2-se-mod-staff

Semantic data models

• Used to describe the logical structure of data processed by the system.

• An entity-relation-attribute model sets out the entities in the system, the relationships between these entities and the entity attributes

• Widely used in database design. Can readily be implemented using relational databases.

• No specific notation provided in the UML but objects and associations can be used.

Page 44: Un it 2-se-mod-staff

Library semantic modelSource

titlepublisherissuedatepages

1

Article

titleauthorspdf filefee

has-links

1

Buyer

nameaddresse-mailbilling info

places

fee-payable-to

n

1

n

published-in

deliversin

m n

1

1

1

CopyrightAgencynameaddress

Country

copyright formtax rate

1

Order

order numbertotal paymentdatetax status

in

1

Page 45: Un it 2-se-mod-staff

Structured methods(analysis)

• Structured methods incorporate system modelling as an inherent part of the method.

• Methods define a set of models, a process for deriving these models and rules and guidelines that should apply to the models.

• CASE tools support system modelling as part of a structured method.

Page 46: Un it 2-se-mod-staff

Method weaknesses

• They do not model non-functional system requirements.

• They do not usually include information about whether a method is appropriate for a given problem.

• The may produce too much documentation.• The system models are sometimes too

detailed and difficult for users to understand.

Page 47: Un it 2-se-mod-staff

CASE workbenches

• A coherent set of tools that is designed to support related software process activities such as analysis, design or testing.

• Analysis and design workbenches support system modelling during both requirements engineering and system design.

• These workbenches may support a specific design method or may provide support for a creating several different types of system model.

Page 48: Un it 2-se-mod-staff

An analysis and design workbench

Centralinformationrepository

Codegenerator

Querylanguagefacilities

Structureddiagramming

tools

Datadictionary

Reportgenerationfacilities

Design, analysisand checking

tools

Formscreation

tools

Import/exportfacilities

Page 49: Un it 2-se-mod-staff

Analysis workbench components

• Diagram editors• Model analysis and checking tools• Repository and associated query language• Data dictionary• Report definition and generation tools• Forms definition tools• Import/export translators• Code generation tools

Page 50: Un it 2-se-mod-staff

Data dictionaries

• Data dictionaries are lists of all of the names used in the system models. Descriptions of the entities, relationships and attributes are also included.

• Advantages– Support name management and avoid duplication;– Store of organisational knowledge linking analysis,

design and implementation;• Many CASE workbenches support data dictionaries.

Page 51: Un it 2-se-mod-staff

Data dictionary entriesName Description Type Date

ArticleDetails of the published article that may be ordered bypeople using LIBSYS.

Entity 30.12.2002

authorsThe names of the authors of the article who may be duea share of the fee.

Attribute 30.12.2002

BuyerThe person or organisation that orders a co py of thearticle.

Entity 30.12.2002

fee-payable-to

A 1:1 relationship between Article and the CopyrightAgency who should be paid the copyright fee.

Relation 29.12.2002

Address(Buyer)

The address of the buyer. This is used to any paperbilling information that is required.

Attribute 31.12.2002