fse - nottinghampszjg1/fse12/fse_3.pdf · 2012-02-06 · fse lecture 3 - req & spec more...

33
G51FSE FSE Foundations of software engineering From Req to Spec Monday, 6 February 12

Upload: others

Post on 20-Apr-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

G51FSE

FSEFoundations of

software engineering

From Req to Spec

Monday, 6 February 12

Page 2: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Coming up today...

Generating requirements

revision of requirements gathering

feasibility for software

validating requirements

Creation of software requirements speci!cations

Functional and non-functional requirements

Diagrams reproduced from course text - ch

2Monday, 6 February 12

Page 3: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Last week...

Covered terms and general de!nitions

what is software engineering

how do we create systems which cope with emergence

Introduction to methodologies

Waterfall methods

Iterative methods & component based development

3Monday, 6 February 12

Page 4: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 1 - IntroductionsFSE

There are numerous stages

4

Requirements Design Implementation Integration Deployment Maintenance

Requirements Design

Specification

Monday, 6 February 12

Page 5: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 1 - IntroductionsFSE

The Stakeholder

The Who of software engineering

Can be a number of characters

a person

an organisation

an institution

an entity

5Monday, 6 February 12

Page 6: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

The bottom line Requirements is all about giving the stakeholder what they want in the software

Problem is this:

stakeholders and clients don’t always know what they want!

Use requirements capture process to get requirements and convert this into a speci!cation

6Monday, 6 February 12

Page 7: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Requirements EngineeringThe process of establishing the services that the customer requires from a system and the constraints under which it operates and is developed

Requirements are functional or non-functional:

Functional requirements describe system services or functions

Non-functional requirements is a constraint on the system or on the development process

7Monday, 6 February 12

Page 8: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

What is a requirement?

Can be a number of representations

a high-level abstract statement of a service or of a system constraint to a detailed mathematical functional speci!cation

Requirements might 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 de!ned in detail

8Monday, 6 February 12

Page 9: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Req and Spec go together

Requirements de!nition is:

“A statement in natural language plus diagrams of the services the system provides and its operational constraints. Written for customers”

Requirements speci!cation is:

“A structured document setting out detailed descriptions of the system services. Written as a contract between client and contractor”

9Monday, 6 February 12

Page 10: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Therefore....A software speci!cation is:

A detailed software description which can serve as a basis for a design or implementation. Written for developers to make the software!

Without understanding the requirements, the speci!cation may be incomplete or inaccurate

(This is why most of you did the REQ module!!)

10Monday, 6 February 12

Page 11: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

What do they look like?

11Monday, 6 February 12

Page 12: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Who cares?

12Monday, 6 February 12

Page 13: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Wicked Problems!

Problems which are so complex that they can never be fully understood and where understanding evolves during the system development

Therefore, requirements are normally both incomplete and inconsistent

Iterative interplay between requirements and speci!cation

13Monday, 6 February 12

Page 14: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Inconsistencies happenLarge software systems must improve the current situation. It is hard to anticipate the effects that the new system will have on the organisation

Different users have different requirements and priorities. There is a constantly shifting compromise in the requirements

System end-users and organisations who pay for the system have different requirements

Use prototyping approaches to evolve

14Monday, 6 February 12

Page 15: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Four stage processFeasibility study

Find out if the current user needs be satis!ed given the available technology and budget?

Requirements analysis Find out what stakeholders require from the system

Requirements de!nitionDe!ne the requirements in a form understandable to the customer

Requirements speci!cationDe!ne the requirements in detail

15Monday, 6 February 12

Page 16: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

A dodgy picture of the process

16Monday, 6 February 12

Page 17: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

“The Requirements Document”The requirements document is the official statement of what is required of the system developers

Should include both a de!nition and a speci!cation of 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

the HOW goes in the speci!cation!

17Monday, 6 February 12

Page 18: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Validation of requirementsConcerned with demonstrating that the requirements de!ne the system that the customer really wants

Requirements error costs are high so validation is very important

Fixing a requirements error after delivery may cost up to 100 times the cost of !xing an implementation error

Prototyping is an important technique of requirements validation

18Monday, 6 February 12

Page 19: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Evolution

19Monday, 6 February 12

Page 20: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Requirements analysisIn order to create a document that your software engineers can use the requirements must be analysed by a requirements engineer

transformed into a set of speci!c statements

Sometimes called requirements elicitation or requirements discovery

Involves technical staff working with customers to !nd out about the application domain, the services that the system should provide and the system’s operational constraints

20Monday, 6 February 12

Page 21: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Analysis has its problems tho!

Stakeholders don’t know what they really want

Stakeholders express requirements in their own terms

Different stakeholders may have con#icting requirements

Organisational and political factors may in#uence the system requirements

The requirements change during the analysis process. New stakeholders may emerge

21Monday, 6 February 12

Page 22: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Prototyping can solve thisProduce a speci!cation from the potentially incomplete requirements so that a prototype can be made

easier for stakeholders to decide if the requirements speci!ed are actually what they want

To do this you have to create something that an engineer can go and create

Many modelling and prototype development techniques to formalise this process

22Monday, 6 February 12

Page 23: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

So you have your requirements

Use the IEEE

Convert the requirements into a speci!cation

functional requirements

non-functional requirements

show how your systems should actually function (HOW)

23Monday, 6 February 12

Page 24: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Producing an SRS DocumentSRS = Software Requirements Speci!cation

Usually a big set of nested lists

Contain a translation from anecdotal user wishes to a formal document

Can evolve depending on your chosen SPM

Also used as a checklist for testing purposes

24Monday, 6 February 12

Page 25: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

To function or not to function

Divide into functional and nonfunctional requirements

Functional: "A requirement speci!es a function that a system or component must be able to perform." 

Non-Functional: "A non-functional requirement is a statement of how a system must behave, it is a constraint upon the systems behaviour."

25Monday, 6 February 12

Page 26: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

What does this mean???

26

Text

Monday, 6 February 12

Page 27: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Functional Requirements

Technical speci!cations - languages, operations

System design parameters and guidelines

Data manipulation, data processing, and calculation modules

Examples in a purchasing system:

supports the calculation of VAT exemption

calculates the estimated delivery time

27Monday, 6 February 12

Page 28: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Non-functional requirementsIn contrast to functional requirements!

Descriptive of the parameters of system performance

quality attributes

desired reliability

security,

predicted system cost,

constraints in design/implementation,

http://www.requirements.com/Glossary/NonFunctionalRequirements/tabid/91/Default.aspx

28Monday, 6 February 12

Page 29: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

More Examples

“The customer must place an order within two minutes of registering”

“The customer must be able to access their account 24 hours a day, seven days a week.”

“Only the system administrator can view the credit card details”

“System must monitor and display heart rate, blood pressure and EEC signal traces”

29Monday, 6 February 12

Page 30: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

More Examples

“The customer must place an order within two minutes of registering”

“The customer must be able to access their account 24 hours a day, seven days a week.”

“Only the system administrator can view the credit card details”

“System must monitor and display heart rate, blood pressure and EEC signal traces”

30Monday, 6 February 12

Page 31: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

The best way to get a feel for it...

Thats what we will do in friday’s lecture

Reinforce the interplay between requirements and speci!cation

Homework

be asked to make a mood tracking app for an android based mobile phone, think about what you might need in terms of requirements

Reading on Reddit too please

31Monday, 6 February 12

Page 32: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

Lecture 3 - Req & SpecFSE

Summary

Generating requirements

revision of requirements gathering

feasibility for software

validating requirements

Creation of software requirements speci!cations

Functional and non-functional requirements

32Monday, 6 February 12

Page 33: FSE - Nottinghampszjg1/FSE12/FSE_3.pdf · 2012-02-06 · FSE Lecture 3 - Req & Spec More Examples “The customer must place an order within two minutes of registering” “The customer

G51FSE

FSEFoundations of

software engineering

Friday:Generating speci!cations from

requirements practically

Monday, 6 February 12