Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program...

220
©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 1 Software Processes

Transcript of Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program...

Page 1: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 1

Software Processes

Page 2: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 2

Objectives

To introduce software process models To describe three generic process models and

when they may be used To describe outline process models for

requirements engineering, software development, testing and evolution

To explain the Rational Unified Process model To introduce CASE technology to support

software process activities

Page 3: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 3

Topics covered

Software process models Process iteration Process activities The Rational Unified Process Computer-aided software engineering

Page 4: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 4

The software process

A structured set of activities required to develop a software system • Specification; • Design; • Validation; • Evolution.

A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective.

Page 5: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 5

Generic software process models The waterfall model

• Separate and distinct phases of specification and development.

Evolutionary development • Specification, development and validation are

interleaved. Component-based software engineering

• The system is assembled from existing components.

Page 6: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 6

Waterfall model

Requir ementsdefinition

System andsoftware design

Implementa tionand unit testing

Integ ration andsystem testing

Oper ation andmaintenance

Page 7: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 7

Waterfall model phases

Requirements analysis and definition System and software design Implementation and unit testing Integration and system testing Operation and maintenance The main drawback of the waterfall model is

the difficulty of accommodating change after the process is underway. One phase has to be complete before moving onto the next phase.

Page 8: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 8

Waterfall model problems

Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer requirements.

Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly limited during the design process.

Few business systems have stable requirements.

Page 9: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 9

Evolutionary development

Exploratory development • Objective is to work with customers and to evolve

a final system from an initial outline specification. Should start with well-understood requirements and add new features as proposed by the customer.

Throw-away prototyping • Objective is to understand the system

requirements. Should start with poorly understood requirements to clarify what is really needed.

Page 10: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 10

Evolutionary development

Concurr entacti vities

Valida tionFinal

version

DevelopmentInter media te

versions

Specifica tionInitial

version

Outlinedescription

Page 11: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 11

Evolutionary development

Problems • Lack of process visibility; • Systems are often poorly structured; • Special skills (e.g. in languages for rapid

prototyping) may be required. Applicability

• For small or medium-size interactive systems; • For parts of large systems (e.g. the user interface); • For short-lifetime systems.

Page 12: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 12

Component-based software engineering

Based on systematic reuse where systems are integrated from existing components or COTS (Commercial-off-the-shelf) systems.

Process stages • Component analysis; • Requirements modification; • System design with reuse; • Development and integration.

This approach is becoming increasingly used as component standards have emerged.

Page 13: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 13

Reuse-oriented development

Requirementsspecification

Componentanalysis

Developmentand integ ration

System designwith reuse

Requirementsmodification

Systemvalidation

Page 14: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 14

Process iteration

System requirements ALWAYS evolve in the course of a project so process iteration where earlier stages are reworked is always part of the process for large systems.

Iteration can be applied to any of the generic process models.

Two (related) approaches • Incremental delivery; • Spiral development.

Page 15: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 15

Incremental delivery

Rather than deliver the system as a single delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality.

User requirements are prioritised and the highest priority requirements are included in early increments.

Once the development of an increment is started, the requirements are frozen though requirements for later increments can continue to evolve.

Page 16: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 16

Incremental development

Valida teincrement

Develop systemincrement

Design systemarchitectur e

Integ rateincrement

Validatesystem

Define outline requirements

Assign requirements to increments

System incomplete

Finalsystem

Page 17: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 17

Incremental development advantages

Customer value can be delivered with each increment so system functionality is available earlier.

Early increments act as a prototype to help elicit requirements for later increments.

Lower risk of overall project failure. The highest priority system services tend to

receive the most testing.

Page 18: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 18

Spiral development

Process is represented as a spiral rather than as a sequence of activities with backtracking.

Each loop in the spiral represents a phase in the process.

No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required.

Risks are explicitly assessed and resolved throughout the process.

Page 19: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 19

Spiral model of the software process

Riskanal ysis

Riskanal ysis

Riskanal ysis

Riskanal ysis Proto-

type 1

Prototype 2

Prototype 3Oper a-tionalpr oto ype

Concept ofOper a tion

Simula tions , models , benchmar ks

S/Wrequir ements

Requir ementvalida tion

DesignV&V

Productdesign Detailed

design

Code

Unit test

Integ ra tiontestAcceptance

testService De velop , verifyne xt-le vel pr oduct

Evalua te alterna tives,identify , resolv e risks

Deter mine objecti ves,alterna tives and

constr aints

Plan ne xt phase

Integ ra tionand test plan

De velopmentplan

Requir ements planLife-cy cle plan

REVIEW

Page 20: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 20

Process activities

Software specification Software design and implementation Software validation Software evolution

Page 21: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 21

Software specification

The process of establishing what services are required and the constraints on the system’s operation and development.

Requirements engineering process • Feasibility study; • Requirements elicitation and analysis; • Requirements specification; • Requirements validation.

Page 22: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 22

Software design and implementation

The process of converting the system specification into an executable system.

Software design • Design a software structure that realises the

specification; Implementation

• Translate this structure into an executable program;

The activities of design and implementation are closely related and may be inter-leaved.

Page 23: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 23

Design process activities

Architectural design Abstract specification Interface design Component design Data structure design Algorithm design

Page 24: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 24

Structured methods

Systematic approaches to developing a software design.

The design is usually documented as a set of graphical models.

Possible models • Object model; • Sequence model; • State transition model; • Structural model; • Data-flow model.

Page 25: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 25

Programming and debugging

Translating a design into a program and removing errors from that program.

Programming is a personal activity - there is no generic programming process.

Programmers carry out some program testing to discover faults in the program and remove these faults in the debugging process.

Page 26: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 26

The debugging process

Locateerr or

Designerror repair

Repairerror

Re-testpr ogram

Page 27: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 27

Software validation

Verification and validation (V & V) is intended to show that a system conforms to its specification and meets the requirements of the system customer.

Involves checking and review processes and system testing.

System testing involves executing the system with test cases that are derived from the specification of the real data to be processed by the system.

Page 28: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 28

Testing stages Component or unit testing

• Individual components are tested independently; • Components may be functions or objects or

coherent groupings of these entities. System testing

• Testing of the system as a whole. Testing of emergent properties is particularly important.

Acceptance testing • Testing with customer data to check that the

system meets the customer’s needs.

Page 29: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 29

Software evolution

Software is inherently flexible and can change. As requirements change through changing

business circumstances, the software that supports the business must also evolve and change.

Although there has been a demarcation between development and evolution (maintenance) this is increasingly irrelevant as fewer and fewer systems are completely new.

Page 30: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 30

Computer-aided software engineering

Computer-aided software engineering (CASE) is software to support software development and evolution processes.

Activity automation • Graphical editors for system model development; • Data dictionary to manage design entities; • Graphical UI builder for user interface construction; • Debuggers to support program fault finding; • Automated translators to generate new versions of a

program.

Page 31: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 31

Key points

Software processes are the activities involved in producing and evolving a software system.

Software process models are abstract representations of these processes.

General activities are specification, design and implementation, validation and evolution.

Generic process models describe the organisation of software processes. Examples include the waterfall model, evolutionary development and component-based software engineering.

Iterative process models describe the software process as a cycle of activities.

Page 32: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 4 Slide 32

Key points

Requirements engineering is the process of developing a software specification.

Design and implementation processes transform the specification to an executable program.

Validation involves checking that the system meets to its specification and user needs.

Evolution is concerned with modifying the system after it is in use.

CASE technology supports software process activities.

Page 33: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 1

Project management

Page 34: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 2

Objectives

To explain the main tasks undertaken by project managers

To introduce software project management and to describe its distinctive characteristics

To discuss project planning and the planning process To show how graphical schedule representations are

used by project management To discuss the notion of risks and the risk

management process

Page 35: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 3

Topics covered

Management activities Project planning Project scheduling Risk management

Page 36: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 4

Concerned with activities involved in ensuring that software is delivered on time and on schedule and in accordance with the requirements of the organisations developing and procuring the software.

Project management is needed because software development is always subject to budget and schedule constraints that are set by the organisation developing the software.

Software project management

Page 37: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

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

The product is intangible. The product is uniquely flexible. Software engineering is not recognized as an

engineering discipline with the sane status as mechanical, electrical engineering, etc.

The software development process is not standardised.

Many software projects are 'one-off' projects.

Software management distinctions

Page 38: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

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

Proposal writing. Project planning and scheduling. Project costing. Project monitoring and reviews. Personnel selection and evaluation. Report writing and presentations.

Management activities

Page 39: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

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

These activities are not peculiar to software management.

Many techniques of engineering project management are equally applicable to software project management.

Technically complex engineering systems tend to suffer from the same problems as software systems.

Management commonalities

Page 40: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 8

Project staffing

May not be possible to appoint the ideal people to work on a project • Project budget may not allow for the use of highly-paid

staff; • Staff with the appropriate experience may not be

available; • An organisation may wish to develop employee skills

on a software project. Managers have to work within these constraints

especially when there are shortages of trained staff.

Page 41: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 9

Project planning

Probably the most time-consuming project management activity.

Continuous activity from initial concept through to system delivery. Plans must be regularly revised as new information becomes available.

Various different types of plan may be developed to support the main software project plan that is concerned with schedule and budget.

Page 42: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 10

Types of project plan

Plan Description

Quality plan Describes the quality procedures and standards that will beused in a project. See Chapter 27.

Validation plan Describes the approach, resources and schedule used forsystem validation. See Chapter 22.

Configurationmanagement plan

Describes the configuration management procedures andstructures to be used. See Chapter 29.

Maintenance plan Predicts the maintenance requirements of the system,maintenance costs and effort required. See Chapter 21.

Staff developmentplan.

Describes how the skills and experience of the project teammembers will be developed. See Chapter 25.

Page 43: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 11

Project planning process

Establish the project constraints Make initial assessments of the project parameters Define project milestones and deliverables while project has not been completed or cancelled loop Draw up project schedule Initiate activities according to schedule Wait ( for a while ) Review project progress Revise estimates of project parameters Update the project schedule Re-negotiate project constraints and deliverables if ( problems arise ) then Initiate technical review and possible revision end if end loop

Page 44: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 12

The project plan

The project plan sets out: • The resources available to the project; • The work breakdown; • A schedule for the work.

Page 45: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 13

Project plan structure

Introduction. Project organisation. Risk analysis. Hardware and software resource

requirements. Work breakdown. Project schedule. Monitoring and reporting mechanisms.

Page 46: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 14

Activity organization

Activities in a project should be organised to produce tangible outputs for management to judge progress.

Milestones are the end-point of a process activity.

Deliverables are project results delivered to customers.

The waterfall process allows for the straightforward definition of progress milestones.

Page 47: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 15

Milestones in the RE process

Evalua tionrepor t

Prototypede velopment

Userrequirements

Requir ementsanal ysis

Feasibilityrepor t

Feasibilitystud y

Architectur aldesign

Designstud y

Systemrequirements

Requir ementsspecifica tion

ACTIVITIES

MILESTONES

Page 48: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 16

Project scheduling

Split project into tasks and estimate time and resources required to complete each task.

Organize tasks concurrently to make optimal use of workforce.

Minimize task dependencies to avoid delays caused by one task waiting for another to complete.

Dependent on project managers intuition and experience.

Page 49: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 17

The project scheduling process

Estimate resourcesfor activities

Identify activitydependencies

Identifyactivities

Allocate peopleto activities

Softwarerequirements

Activity chartsand bar char ts

Create projectchar ts

Page 50: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 18

Scheduling problems

Estimating the difficulty of problems and hence the cost of developing a solution is hard.

Productivity is not proportional to the number of people working on a task.

Adding people to a late project makes it later because of communication overheads.

The unexpected always happens. Always allow contingency in planning.

Page 51: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 19

Bar charts and activity networks

Graphical notations used to illustrate the project schedule.

Show project breakdown into tasks. Tasks should not be too small. They should take about a week or two.

Activity charts show task dependencies and the the critical path.

Bar charts show schedule against calendar time.

Page 52: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 20

Task durations and dependencies

Activity Duration (days) DependenciesT1 8T2 15T3 15 T1 (M1)T4 10T5 10 T2, T4 (M2)T6 5 T1, T2 (M3)T7 20 T1 (M1)T8 25 T4 (M5)T9 15 T3, T6 (M4)T10 15 T5, T7 (M7)T11 7 T9 (M6)T12 10 T11 (M8)

Page 53: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 21

Activity network

star t

T2

M3T6

Finish

T10

M7T5

T7

M2T4

M5

T8

4/7 /03

8 da ys

1 4/7 /03 15 da ys

4/8/03

15 da ys

2 5/8/03

7 da ys

5/9/03

10 da ys

19/9/03

15 da ys

11/8/03

2 5 da ys

10 da ys

20 da ys

5 da ys25/7 /03

15 da ys

25/7 /03

1 8/7 /03

10 da ys

T1

M1 T3T9

M6

T11

M8

T12

M4

Page 54: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 22

Activity timeline 4/7 11/7 18/7 25/7 1/8 8/8 15/8 22/8 29/8 5/9 12/9 19/9

T4

T1T2

M1

T7T3

M5T8

M3M2T6T5

M4T9

M7T10

M6T11

M8

T12

Star t

Finish

Page 55: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 23

Staff allocation

4/7 11/7 18/7 25/7 1/8 8/8 15/8 2 2/8 2 9/8 5/9 1 2/9 19/9

T4

T8 T11

T12

T1

T3

T9

T2

T6 T10

T7

T5

Fred

Jane

Anne

Mary

Jim

Page 56: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 24

Risk management

Risk management is concerned with identifying risks and drawing up plans to minimise their effect on a project.

A risk is a probability that some adverse circumstance will occur • Project risks affect schedule or resources; • Product risks affect the quality or performance of

the software being developed; • Business risks affect the organisation developing

or procuring the software.

Page 57: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 25

Software risks Risk Affects Description

Staff turnover Project Experienced staff will leave the project before it is finished.

Management change Project There will be a change of organisational management withdifferent priorities.

Hardware unavailability Project Hardware that is essential for the project will not bedelivered on schedule.

Requirements change Project andproduct

There will be a larger number of changes to therequirements than anticipated.

Specification delays Project andproduct

Specifications of essential interfaces are not available onschedule

Size underestimate Project andproduct

The size of the system has been underestimated.

CASE tool under-performance

Product CASE tools which support the project do not perform asanticipated

Technology change Business The underlying technology on which the system is built issuperseded by new technology.

Product competition Business A competitive product is marketed before the system iscompleted.

Page 58: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 26

The risk management process

Risk identification • Identify project, product and business risks;

Risk analysis • Assess the likelihood and consequences of these

risks; Risk planning

• Draw up plans to avoid or minimise the effects of the risk;

Risk monitoring • Monitor the risks throughout the project;

Page 59: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 27

The risk management process

Risk avoidanceand contingency

plans

Risk planning

Prioritised risklist

Risk analysis

List of potentialrisks

Riskidentification

Riskassessment

Riskmonitoring

Page 60: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 28

Risk identification

Technology risks. People risks. Organisational risks. Requirements risks. Estimation risks.

Page 61: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 29

Risks and risk types Risk type Possible risks

Technology The database used in the system cannot process as many transactions per secondas expected.Software components that should be reused contain defects that limit theirfunctionality.

People It is impossible to recruit staff with the skills required.Key staff are ill and unava ilable at critical times.Required training for staff is not available.

Organisational The organisation is restructured so that different management are responsible forthe project.Organisational financial problems force reductions in the project budget.

Tools The code generated by CASE tools is inefficient.CASE tools cannot be integrated.

Requirements Changes to requirements that require major design rework are proposed.Customers fail to understand the impact of requirements changes.

Estimation The time required to develop the software is underestimated.The rate of defect repair is underestimated.The size of the software is underestimated.

Page 62: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 30

Risk analysis

Assess probability and seriousness of each risk.

Probability may be very low, low, moderate, high or very high.

Risk effects might be catastrophic, serious, tolerable or insignificant.

Page 63: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 31

Risk analysis (i)

Risk Probability Effects

Organisational financial problems force reductions inthe project budget.

Low Catastrophic

It is impossible to recruit staff with the skills requiredfor the project.

High Catastrophic

Key staff are ill at critical times in the project. Moderate Serious

Software components that should be reused containdefects which limit their functionality.

Moderate Serious

Changes to requirements that require major designrework are proposed.

Moderate Serious

The organisation is restructured so that differentmanagement are responsible for the project.

High Serious

Page 64: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 32

Risk analysis (ii)

Risk Probability Effects

The database used in the system cannot process asmany transactions per second as expec ted.

Moderate Serious

The time required to develop the software isunderestimated.

High Serious

CASE tools cannot be integrated. High Tolerable

Customers fail to understand the impact ofrequirements changes.

Moderate Tolerable

Required training for staff is not available. Moderate Tolerable

The rate of defect repair is underestimated. Moderate Tolerable

The size of the software is underestimated. High Tolerable

The code generated by CASE tools is inefficient. Moderate Insignificant

Page 65: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 33

Risk planning

Consider each risk and develop a strategy to manage that risk.

Avoidance strategies • The probability that the risk will arise is reduced;

Minimisation strategies • The impact of the risk on the project or product will

be reduced; Contingency plans

• If the risk arises, contingency plans are plans to deal with that risk;

Page 66: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 34

Risk management strategies (i)

Risk Strategy

Organisationalfinancial problems

Prepare a briefing document for senior managementshowing how th e project is making a very importantcontribution to the goals of the business.

Recruitmentproblems

Alert customer of potential difficulties and thepossibility of delays, investigate buying-incomponents.

Staff illness Reorganise team so that there is more overlap of workand people therefore understand each other’s jobs.

Defectivecomponents

Replace potentially defective components with bough t-in components of known reliability.

Page 67: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 35

Risk management strategies (ii)

Risk Strategy

Requirementschanges

Derive traceability information to assess requirementschange impact, maximise information hiding in thedesign.

Organisationalrestructuring

Prepare a briefing document for senior managementshowing how th e project is making a very importantcontribution to the goals of the business.

Databaseperformance

Investigate the possibility of buying a higher-performance database.

Underestimateddevelopment time

Investigate buying in components, investigate use of aprogram generator

Page 68: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 36

Risk monitoring

Assess each identified risks regularly to decide whether or not it is becoming less or more probable.

Also assess whether the effects of the risk have changed.

Each key risk should be discussed at management progress meetings.

Page 69: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 37

Risk indicators

Risk type Potential indicators

Technology Late delivery of hardware or support software, many reportedtechnology problems

People Poor staff morale, poor relationships amongst team member,job availability

Organisational Organisational gossip, lack of action by senior management

Tools Reluctance by team members to use tools, complaints aboutCASE tools, demands for higher-powered workstations

Requirements Many requirements change requests, customer complaints

Estimation Failure to meet agreed schedule, failure to clear reporteddefects

Page 70: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 38

Key points

Good project management is essential for project success.

The intangible nature of software causes problems for management.

Managers have diverse roles but their most significant activities are planning, estimating and scheduling.

Planning and estimating are iterative processes which continue throughout the course of a project.

Page 71: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 5 Slide 39

A project milestone is a predictable state where a formal report of progress is presented to management.

Project scheduling involves preparing various graphical representations showing project activities, their durations and staffing.

Risk management is concerned with identifying risks which may affect the project and planning to ensure that these risks do not develop into major threats.

Key points

Page 72: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 1

Software Requirements

Page 73: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 2

Objectives

To introduce the concepts of user and system requirements

To describe functional and non-functional requirements

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

Page 74: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 3

Topics covered

Functional and non-functional requirements User requirements System requirements Interface specification The software requirements document

Page 75: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 4

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 76: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

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

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 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 77: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

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

Requirements abstraction (Davis)

“If a company wishes to let a contract for a large software development project, itmust define its needs in a sufficiently abstract way that a solution is not pre-defined.The requirements must be written so that several contractors can bid for the contract,offering, perhaps, different ways of meeting the client organisation’s needs. Once acontract has been awarded, the contractor must write a system definition for the clientin more detail so that the client understands and can validate what the software willdo. Both o f these documents may be ca lled the requirements document for thesystem.”

Page 78: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

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

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 79: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 8

Definitions and specifications

1. The softw are m ust pr ovide a means of representing and1. accessing e xternal files cr ea ted b y other tools .

1.1 The user should be pr ovided with facilities to define the type of1.2 external files .1.2 Each e xternal file type ma y have an associa ted tool w hich ma y be1.2 applied to the file .1.3 Each e xternal file type ma y be r epr esented as a specific icon on1.2 the user’ s displa y.1.4 Facilities should be pr o vided for the icon r epresenting an1.2 external file type to be defined b y the user .1.5 When a user selects an icon r epr esenting an e xternal file , the1.2 effect of that selection is to apply the tool associated with the type of1.2 the external file to the file represented by the selected icon.

User requir ement definition

System requir ements specification

Page 80: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 9

Requirements readers

Client mana gersSystem end-usersClient eng ineersContr actor mana gersSystem ar chitects

System end-usersClient eng ineersSystem ar chitectsSoftware de velopers

Client eng ineers (perha ps)System ar chitectsSoftware de velopers

Userrequir ements

Systemrequir ements

Software designspecifica tion

Page 81: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 10

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 82: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 11

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 83: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 12

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 84: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 13

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 85: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 14

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 86: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 15

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

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

Page 87: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 16

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 88: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 17

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 89: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 18

Non-functional requirement types

Perfor mancerequir ements

Spacerequir ements

Usa bilityrequir ements

Efficiencyrequir ements

Relia bilityrequir ements

Portabilityrequir ements

Inter oper abilityrequir ements

Ethicalrequir ements

Leg islativerequir ements

Implementa tionrequir ements

Standar dsrequir ements

Deli veryrequir ements

Safetyrequir ements

Privacyrequir ements

Productrequir ements

Organisationalrequir ements

Externalrequir ements

Non-functionalrequir ements

Page 90: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 19

Non-functional requirements examples Product requirement

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

Organisational requirement 9.3.2 The system development process and deliverable documents shall

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

External requirement 7.6.5 The system shall not disclose any personal information about

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

Page 91: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 20

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 92: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 21

Examples

A system goal • The system should be easy to use by experienced controllers

and should be organised 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 93: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 22

Requirements measures

Property Measure

Speed Processed transactions/secondUser/Event response timeScreen refresh time

Size M BytesNumber of ROM 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 94: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 23

Requirements interaction

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

Spacecraft system • To minimise weight, the number of separate chips in

the system should be minimised. • To minimise power consumption, lower power chips

should be used. • However, using low power chips may mean that

more chips have to be used. Which is the most critical requirement?

Page 95: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 24

Domain requirements

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

Domain requirements be new functional requirements, constraints on existing requirements or define specific computations.

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

Page 96: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 25

Library system domain requirements There shall be a standard user interface to all

databases which shall be based on the Z39.50 standard.

Because of copyright restrictions, some documents must be deleted immediately on arrival. Depending on the user’s requirements, these documents will either be printed locally on the system server for manually forwarding to the user or routed to a network printer.

Page 97: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 26

Train protection system

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 98: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 27

Domain requirements problems

Understandability • Requirements are expressed in the language of the

application domain; • This is often not understood by software engineers

developing the system. Implicitness

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

Page 99: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 28

User requirements

Should describe functional and non-functional requirements in such a way that they are understandable by system users who don’t have detailed technical knowledge.

User requirements are defined using natural language, tables and diagrams as these can be understood by all users.

Page 100: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 29

Problems with natural language

Lack of clarity • Precision is difficult without making the document

difficult to read. Requirements confusion

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

Requirements amalgamation • Several different requirements may be expressed

together.

Page 101: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 30

LIBSYS requirement

4..5 LIBSYS shall provide a financial accounting system that maintains records of all payments made by users of the system. System managers may configure this system so that regular users may receive discounted rates.

Page 102: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 31

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 103: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 32

Requirement problems

Database requirements includes both conceptual and detailed information • Describes the concept of a financial accounting system that is

to be included in LIBSYS; • However, it also includes the detail that managers can

configure this system - this is unnecessary at this level. Grid requirement mixes three different kinds of

requirement • Conceptual functional requirement (the need for a grid); • Non-functional requirement (grid units); • Non-functional UI requirement (grid switching).

Page 104: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 33

Structured presentation

2.6.1 Grid facilitiesThe editor shall provide a grid facility where a m atrix of horizontal andvertical lines provide a background to the editor window. This grid shall be apassive grid where the alignment of entities is the user's responsibility.Rationale: A grid helps the user to create a tidy diagram with well-spacedentities. 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 entitiesshould be positioned.Specification: ECLIPSE/WS/Tools/DE/FS Section 5.6Source: Ray Wilson, Glasgow Office

Page 105: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 34

Guidelines for writing requirements

Invent a standard format and use it for all requirements.

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

Use text highlighting to identify key parts of the requirement.

Avoid the use of computer jargon.

Page 106: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 35

System requirements

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

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

They may be incorporated into the system contract.

System requirements may be defined or illustrated using system models discussed in Chapter 8.

Page 107: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 36

Requirements and design

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

In practice, requirements and design are inseparable • A system architecture may be designed to structure

the requirements; • The system may inter-operate with other systems

that generate design requirements; • The use of a specific design may be a domain

requirement.

Page 108: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 37

Problems with NL specification

Ambiguity • The readers and writers of the requirement must

interpret the same words in the same way. NL is naturally ambiguous so this is very difficult.

Over-flexibility • The same thing may be said in a number of different

ways in the specification. Lack of modularisation

• NL structures are inadequate to structure system requirements.

Page 109: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 38

Alternatives to NL specification

Notation Description

Structured naturallanguage

This approach depends on defining standard forms or templates to express therequirements specification.

Designdescriptionlanguages

This approach uses a language like a programming language but with more abstractfeatures 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 interfacespecifications.

Graphicalnotations

A graphical language, supplemented by text annotations is used to define thefunctional requirements for the system. An early example of such a graphicallanguage was SADT. Now, use-case descriptions and sequence d iagrams arecommonly used .

Mathematicalspecifications

These are notations based on mathematical concepts such as finite-state machines orsets. These unambiguous specifications reduce the arguments between customer andcontractor about system functionality. Howeve r, most customers don’t understandformal specifications and are reluctant to accept it as a system contract.

Page 110: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 39

Structured language specifications

The freedom of the requirements writer is limited by a predefined template for requirements.

All requirements are written in a standard way. The terminology used in the description may be

limited. The advantage is that the most of the

expressiveness of natural language is maintained but a degree of uniformity is imposed on the specification.

Page 111: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 40

Form-based specifications

Definition of the function or entity. Description of inputs and where they come from. Description of outputs and where they go to. Indication of other entities required. Pre and post conditions (if appropriate). The side effects (if any) of the function.

Page 112: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 41

Form-based node specification

Insulin Pump/Control Software/SRS/3.3.2Function Compute insulin dose: Safe sugar levelDescription Computes the dose of insulin to be delivered when the current measured sugar level is in

the safe zone between 3 and 7 units.Inputs Current sugar reading (r2), the previous two readings (r0 and r1)Source Current sugar reading from sensor. Other readings from memory.Outputs CompDose ذ the dose in insulin to be deliveredDestination Main control loopAction: CompDose is zero if the sugar level is stable or falling or if the level is increasing but the rate of

increase is decreasing. If the level is increasing and the rate of increase is increasing, then CompDose iscomputed by dividing the difference between the current sugar level and the previous level by 4 androunding the result. If the result, is rounded to zero then CompDose is set to the minimum dose that canbe delivered.

Requires Two previous readings so that the rate of change of sugar level can be computed.Pre-condition The insulin reservoir contains at least the maximum allowed single dose of insulin..Post-condition r0 is replaced by r1 then r1 is replaced by r2Side-effects None

Page 113: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 42

Tabular specification

Used to supplement natural language. Particularly useful when you have to define a

number of possible alternative courses of action.

Page 114: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 43

Tabular specification

Condition Action

Sugar level falling (r2 < r1) CompDose = 0

Sugar level stable (r2 = r1) CompDose = 0

Sugar level increasing and rate ofincrease decreasing ((r2-r1)<(r1-r0))

CompDose = 0

Sugar level increasing and rate ofincrease stable or increasing. ((r2-r1) (r1-r0))

CompDose = round ((r2-r1)/4)If rounded result = 0 thenCompDose = MinimumDose

Page 115: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 44

Graphical models

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

Different graphical models are explained in Chapter 8.

Page 116: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 45

Sequence diagrams

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

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

Cash withdrawal from an ATM • Validate card; • Handle request; • Complete transaction.

Page 117: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 46

Sequence diagram of ATM withdrawal ATM Database

CardCard number

Card OKPIN request

PINOption menu

<<exception>>invalid card

Withdraw request

Amount request

Amount

Balance request

Balance

<<exception>>insufficient cash

Debit (amount)

Debit response

Card

Card removed

Cash

Cash removedReceipt

Validate card

Handle request

Completetransaction

Page 118: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 47

Interface specification

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

Three types of interface may have to be defined • Procedural interfaces; • Data structures that are exchanged; • Data representations.

Formal notations are an effective technique for interface specification.

Page 119: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 48

PDL interface description

interface PrintServer {

// defines an abstract printer server// requires: interface Printer, interface PrintDoc// provides: initialize, print, displayPrintQueue, cancelPrintJob, switchPrinter

void initialize ( Printer p ) ;void print ( Printer p, PrintDoc d ) ;void displayPrintQueue ( Printer p ) ;void cancelPrintJob (Printer p, PrintDoc d) ;void switchPrinter (Printer p1, Printer p2, PrintDoc d) ;

} //PrintServer

Page 120: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 49

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 121: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 50

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 testeng ineers

Managers

Systemeng ineers

Specify the requirements andread them to check that they

meet their needs. T heyspecify changes to the

requirements

Systemcustomers

Use the requirements to helpunderstand the system and

the relationships between itspar ts

Systemmaintenance

eng ineers

Page 122: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 51

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 123: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 52

Requirements document structure

Preface Introduction Glossary User requirements definition System architecture System requirements specification System models System evolution Appendices Index

Page 124: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 53

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. User requirements should be written using natural language, tables and diagrams.

Page 125: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 6 Slide 54

Key points

System requirements are intended to

communicate the functions that the system should provide.

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

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

Page 126: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 1

System models

Page 127: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 2

Objectives

To explain why the context of a system should be modelled as part of the RE process

To describe behavioural modelling, data modelling and object modelling

To introduce some of the notations used in the Unified Modeling Language (UML)

To show how CASE workbenches support system modelling

Page 128: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 3

Topics covered

Context models Behavioural models Data models Object models CASE workbenches

Page 129: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 4

System modelling

System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers.

Different models present the system from different perspectives • External perspective showing the system’s context or

environment; • Behavioural perspective showing the behaviour of the

system; • Structural perspective showing the system or data

architecture.

Page 130: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 5

Model types Data processing model showing how the data is

processed at different stages. Composition model showing how entities are

composed of other entities. Architectural model showing principal sub-systems. Classification model showing how entities have

common characteristics. Stimulus/response model showing the system’s

reaction to events.

Page 131: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 6

Context models

Context models are used to illustrate the operational context of a system - they show what lies outside the system boundaries.

Social and organisational concerns may affect the decision on where to position system boundaries.

Architectural models show the system and its relationship with other systems.

Page 132: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 7

The context of an ATM system

Auto-tellersystem

Securitysystem

Maintenancesystem

Accountda tabase

Usagedatabase

Branchaccounting

system

Branchcountersystem

Page 133: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 8

Process models

Process models show the overall process and the processes that are supported by the system.

Data flow models may be used to show the processes and the flow of information from one process to another.

Page 134: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 9

Equipment procurement process

Get costestima tes

Acceptdeli very ofequipment

Checkdelivered

items

Valida tespecifica tion

Specifyequipment

requir ed

Choosesupplier

Placeequipment

order

Installequipment

Findsuppliers

Supplierda tabase

Acceptdeli vered

equipment

Equipmentda tabase

Equipmentspec.

Checkedspec.

Deliverynote

Deliverynote

Ordernotifica tion

Installa tioninstructions

Installa tionacceptance

Equipmentdetails

Check ed andsigned or der form

Orderdetails plusblank or der

for m

Spec. +supplier +estima te

Supplier listEquipment

spec.

Page 135: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 10

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 136: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 11

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 137: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 12

Order processing DFD

Completeor der f orm

Orderdetails +

blankor der f orm

Valida teorder

Recor dor der

Send tosupplier

Adjustavailab lebudget

Budgetfile

Ordersfile

Completedorder f or m

Signedorder f or m

Signedorder f orm

Checked andsigned or der

+ or dernotifica tion

Orderamount

+ accountdetails

Signedorder f orm

Orderdetails

Page 138: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 13

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 139: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 14

Insulin pump DFD

Insulinrequir ementcomputa tion

Blood sugaranalysis

Blood sugarsensor

Insulindeli very

contr oller

Insulinpump

BloodBlood

parameters

Blood sugarlevel

InsulinPump contr ol

commands Insulinrequir ement

Page 140: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 15

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 141: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 16

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 142: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 17

Microwave oven model

Full po wer

Enabled

do: operateoven

Fullpow er

Halfpower

Halfpower

Fullpo wer

Number

Dooropen

Doorclosed

Doorclosed

Dooropen

Start

do: set power= 600

Half po werdo: set power

= 300

Set timedo: get number

exit: set time

Disab led

Operation

Cancel

Waiting

do: displaytime

Waiting

do: displaytime

do: display 'Ready'

do: display'Waiting'

Timer

Timer

Page 143: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 18

Microwave oven state description

State 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 144: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 19

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 145: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 20

Microwave oven operation

Cookdo: run

generator

Donedo: buzzer on

for 5 secs.

Waiting

Alarmdo: display

event

do: checkstatus

Checking

Turntablefault

Emitterfault

Disabled

OK

Timeout

Time

Door open Cancel

Operation

Page 146: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 21

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 147: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 22

Library semantic model

Sourcetitlepublisherissuedatepages

1

Articletitleauthorspdf filefee

has-links

1

Buyernameaddresse-mailbilling info

places

fee-payable-to

n

1

n

published-in

delivers in

m n

1

1

1

CopyrightAgencynameaddress

Country

copyright formtax rate

1

Order

order numbertotal paymentdatetax status

in

1

Page 148: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 23

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 149: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 24

Data dictionary entries

Name Description Type Date

Article Details of the published article that may be ordered bypeople using LIBSYS. Entity 30.12.2002

authors The names of the authors of the article who may be duea share of the fee. Attribute 30.12.2002

Buyer The 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

Page 150: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 25

Object models

Object models describe the system in terms of object classes and their associations.

An object class is an abstraction over a set of objects with common attributes and the services (operations) provided by each object.

Various object models may be produced • Inheritance models; • Aggregation models; • Interaction models.

Page 151: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 26

Object models

Natural ways of reflecting the real-world entities manipulated by the system

More abstract entities are more difficult to model using this approach

Object class identification is recognised as a difficult process requiring a deep understanding of the application domain

Object classes reflecting domain entities are reusable across systems

Page 152: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 27

Inheritance models

Organise the domain object classes into a hierarchy. Classes at the top of the hierarchy reflect the

common features of all classes. Object classes inherit their attributes and services

from one or more super-classes. these may then be specialised as necessary.

Class hierarchy design can be a difficult process if duplication in different branches is to be avoided.

Page 153: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 28

Object models and the UML

The UML is a standard representation devised by the developers of widely used object-oriented analysis and design methods.

It has become an effective standard for object-oriented modelling.

Notation • Object classes are rectangles with the name at the top,

attributes in the middle section and operations in the bottom section;

• Relationships between object classes (known as associations) are shown as lines linking objects;

• Inheritance is referred to as generalisation and is shown ‘upwards’ rather than ‘downwards’ in a hierarchy.

Page 154: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 29

Library class hierarchy

Catalogue n umberAcquisition da teCostTypeStatusNumber of copies

Library item

Acquire ()Catalo gue ()Dispose ()Issue ()Return ()

AuthorEditionPub lication da teISBN

Book

YearIssue

Magazine

DirectorDate of releaseDistributor

Film

VersionPlatfor m

Computerprogram

TitlePub lisher

Pub lished item

TitleMedium

Recor ded item

Page 155: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 30

User class hierarchy

NameAddressPhoneReg istration #

Library user

Reg ister ()De-reg ister ()

Affiliation

Reader

Items on loanMax. loans

Borrower

Depar tmentDepar tment phone

Staff

Major subjectHome ad dress

Student

Page 156: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 31

Multiple inheritance

Rather than inheriting the attributes and services from a single parent class, a system which supports multiple inheritance allows object classes to inherit from several super-classes.

This can lead to semantic conflicts where attributes/services with the same name in different super-classes have different semantics.

Multiple inheritance makes class hierarchy reorganisation more complex.

Page 157: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 32

Multiple inheritance

# Tapes

Talking book

AuthorEditionPub lication da teISBN

Book

Speak erDurationRecor ding da te

Voice recording

Page 158: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 33

Object aggregation

An aggregation model shows how classes that are collections are composed of other classes.

Aggregation models are similar to the part-of relationship in semantic data models.

Page 159: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 34

Object aggregation

Videota pe

Tape ids .

Lecturenotes

Text

OHP slides

Slides

Assignment

Credits

SolutionsTextDiagrams

Exercises

#Pr oblemsDescription

Course titleNumberYearInstructor

Study pack

Page 160: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 35

Object behaviour modelling

A behavioural model shows the interactions between objects to produce some particular system behaviour that is specified as a use-case.

Sequence diagrams (or collaboration diagrams) in the UML are used to model interaction between objects.

Page 161: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 36

Issue of electronic items

:Library User

Ecat:Catalog

Lookup

Issue

Display

:Library ItemLib1:NetServer

Issue licence

Accept licence

Compress

Deliver

Page 162: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 37

Structured methods

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 163: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 38

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 164: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 39

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 165: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 40

An analysis and design workbench

Centr alinfor ma tionrepository

Codegener ator

Querylangua gefacilities

Structur eddiag ramming

tools

Datadictionary

Repor tgener ation

facilities

Design, anal ysisand checking

tools

Formscr ea tion

tools

Impor t/e xpor tfacilities

Page 166: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 41

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 167: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 42

Key points

A model is an abstract system view. Complementary types of model provide different system information.

Context models show the position of a system in its environment with other systems and processes.

Data flow models may be used to model the data processing in a system.

State machine models model the system’s behaviour in response to internal or external events

Page 168: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 8 Slide 43

Key points

Semantic data models describe the logical structure of data which is imported to or exported by the systems.

Object models describe logical system entities, their classification and aggregation.

Sequence models show the interactions between actors and the system objects that they use.

Structured methods provide a framework for developing system models.

Page 169: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 1

Architectural Design

Page 170: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 2

Objectives

To introduce architectural design and to discuss its importance

To explain the architectural design decisions that have to be made

To introduce three complementary architectural styles covering organisation, decomposition and control

To discuss reference architectures are used to communicate and compare architectures

Page 171: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 3

Topics covered

Architectural design decisions System organisation Decomposition styles Control styles Reference architectures

Page 172: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 4

Software architecture

The design process for identifying the sub-systems making up a system and the framework for sub-system control and communication is architectural design.

The output of this design process is a description of the software architecture.

Page 173: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 5

Architectural design

An early stage of the system design process. Represents the link between specification

and design processes. Often carried out in parallel with some

specification activities. It involves identifying major system

components and their communications.

Page 174: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 6

Advantages of explicit architecture

Stakeholder communication • Architecture may be used as a focus of

discussion by system stakeholders. System analysis

• Means that analysis of whether the system can meet its non-functional requirements is possible.

Large-scale reuse • The architecture may be reusable across a

range of systems.

Page 175: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 7

Architecture and system characteristics

Performance • Localise critical operations and minimise communications.

Use large rather than fine-grain components. Security

• Use a layered architecture with critical assets in the inner layers.

Safety • Localise safety-critical features in a small number of sub-

systems. Availability

• Include redundant components and mechanisms for fault tolerance.

Maintainability • Use fine-grain, replaceable components.

Page 176: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 8

Architectural conflicts

Using large-grain components improves performance but reduces maintainability.

Introducing redundant data improves availability but makes security more difficult.

Localising safety-related features usually means more communication so degraded performance.

Page 177: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 9

System structuring

Concerned with decomposing the system into interacting sub-systems.

The architectural design is normally expressed as a block diagram presenting an overview of the system structure.

More specific models showing how sub-systems share data, are distributed and interface with each other may also be developed.

Page 178: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 10

Packing robot control system

Visionsystem

Objectidentifica tion

system

Armcontr oller

Grippercontr oller

Packag ingselectionsystem

Packingsystem

Conveyorcontr oller

Page 179: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 11

Box and line diagrams

Very abstract - they do not show the nature of component relationships nor the externally visible properties of the sub-systems.

However, useful for communication with stakeholders and for project planning.

Page 180: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 12

Architectural design decisions

Architectural design is a creative process so the process differs depending on the type of system being developed.

However, a number of common decisions span all design processes.

Page 181: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 13

Architectural design decisions

Is there a generic application architecture that can be used?

How will the system be distributed? What architectural styles are appropriate? What approach will be used to structure the system? How will the system be decomposed into modules? What control strategy should be used? How will the architectural design be evaluated? How should the architecture be documented?

Page 182: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 14

Architecture reuse

Systems in the same domain often have similar architectures that reflect domain concepts.

Application product lines are built around a core architecture with variants that satisfy particular customer requirements.

Application architectures are covered in Chapter 13 and product lines in Chapter 18.

Page 183: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 15

Architectural styles

The architectural model of a system may conform to a generic architectural model or style.

An awareness of these styles can simplify the problem of defining system architectures.

However, most large systems are heterogeneous and do not follow a single architectural style.

Page 184: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 16

Architectural models

Used to document an architectural design. Static structural model that shows the major system

components. Dynamic process model that shows the process

structure of the system. Interface model that defines sub-system interfaces. Relationships model such as a data-flow model that

shows sub-system relationships. Distribution model that shows how sub-systems are

distributed across computers.

Page 185: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 17

System organisation

Reflects the basic strategy that is used to structure a system.

Three organisational styles are widely used: • A shared data repository style; • A shared services and servers style; • An abstract machine or layered style.

Page 186: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 18

The repository model

Sub-systems must exchange data. This may be done in two ways: • Shared data is held in a central database or

repository and may be accessed by all sub-systems;

• Each sub-system maintains its own database and passes data explicitly to other sub-systems.

When large amounts of data are to be shared, the repository model of sharing is most commonly used.

Page 187: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 19

CASE toolset architecture

Projectrepository

Designtransla tor

Programeditor

Designeditor

Codegener ator

Designanal yser

Repor tgener ator

Page 188: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 20

Repository model characteristics

Advantages • Efficient way to share large amounts of data; • Sub-systems need not be concerned with how data is

produced Centralised management e.g. backup, security, etc.

• Sharing model is published as the repository schema. Disadvantages

• Sub-systems must agree on a repository data model. Inevitably a compromise;

• Data evolution is difficult and expensive; • No scope for specific management policies; • Difficult to distribute efficiently.

Page 189: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 21

Client-server model

Distributed system model which shows how data and processing is distributed across a range of components.

Set of stand-alone servers which provide specific services such as printing, data management, etc.

Set of clients which call on these services. Network which allows clients to access

servers.

Page 190: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 22

Film and picture library

Catalo gueserver

Librarycatalo gue

Videoserver

Film clipfiles

Pictureserver

Digitisedphoto g raphs

Web serv er

Film andphoto info.

Client 1 Client 2 Client 3 Client 4

Internet

Page 191: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 23

Client-server characteristics

Advantages • Distribution of data is straightforward; • Makes effective use of networked systems. May require

cheaper hardware; • Easy to add new servers or upgrade existing servers.

Disadvantages • No shared data model so sub-systems use different data

organisation. Data interchange may be inefficient; • Redundant management in each server; • No central register of names and services - it may be hard

to find out what servers and services are available.

Page 192: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 24

Abstract machine (layered) model

Used to model the interfacing of sub-systems. Organises the system into a set of layers (or abstract

machines) each of which provide a set of services. Supports the incremental development of sub-

systems in different layers. When a layer interface changes, only the adjacent layer is affected.

However, often artificial to structure systems in this way.

Page 193: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 25

Version management system

Configuration management system layer

Database system layer

Operating system layer

Object management system layer

Page 194: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 26

Modular decomposition styles

Styles of decomposing sub-systems into modules.

No rigid distinction between system organisation and modular decomposition.

Page 195: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 27

Sub-systems and modules

A sub-system is a system in its own right whose operation is independent of the services provided by other sub-systems.

A module is a system component that provides services to other components but would not normally be considered as a separate system.

Page 196: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 28

Modular decomposition

Another structural level where sub-systems are decomposed into modules.

Two modular decomposition models covered • An object model where the system is decomposed into

interacting object; • A pipeline or data-flow model where the system is

decomposed into functional modules which transform inputs to outputs.

If possible, decisions about concurrency should be delayed until modules are implemented.

Page 197: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 29

Object models

Structure the system into a set of loosely coupled objects with well-defined interfaces.

Object-oriented decomposition is concerned with identifying object classes, their attributes and operations.

When implemented, objects are created from these classes and some control model used to coordinate object operations.

Page 198: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 30

Invoice processing system

issue ()sendReminder ()acceptP ayment ()sendReceipt ()

invoice#dateamountcustomer

invoice#dateamountcustomer#

invoice#dateamountcustomer#

customer#namead dresscredit period

Customer

Payment

Invoice

Receipt

Page 199: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 31

Object model advantages

Objects are loosely coupled so their implementation can be modified without affecting other objects.

The objects may reflect real-world entities. OO implementation languages are widely

used. However, object interface changes may

cause problems and complex entities may be hard to represent as objects.

Page 200: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 32

Function-oriented pipelining

Functional transformations process their inputs to produce outputs.

May be referred to as a pipe and filter model (as in UNIX shell).

Variants of this approach are very common. When transformations are sequential, this is a batch sequential model which is extensively used in data processing systems.

Not really suitable for interactive systems.

Page 201: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 33

Invoice processing system

Read issuedinvoices

Identifypayments

Issuereceipts

Findpa yments

due

Receipts

Issuepa ymentreminder

Reminders

Invoices Payments

Page 202: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 34

Pipeline model advantages

Supports transformation reuse. Intuitive organisation for stakeholder

communication. Easy to add new transformations. Relatively simple to implement as either a

concurrent or sequential system. However, requires a common format for data

transfer along the pipeline and difficult to support event-based interaction.

Page 203: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 35

Control styles

Are concerned with the control flow between sub-systems. Distinct from the system decomposition model.

Centralised control • One sub-system has overall responsibility for

control and starts and stops other sub-systems. Event-based control

• Each sub-system can respond to externally generated events from other sub-systems or the system’s environment.

Page 204: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 36

Centralised control

A control sub-system takes responsibility for managing the execution of other sub-systems.

Call-return model • Top-down subroutine model where control starts at the

top of a subroutine hierarchy and moves downwards. Applicable to sequential systems.

Manager model • Applicable to concurrent systems. One system

component controls the stopping, starting and coordination of other system processes. Can be implemented in sequential systems as a case statement.

Page 205: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 37

Call-return model

Routine 1.2Routine 1.1 Routine 3.2Routine 3.1

Routine 2 Routine 3Routine 1

Mainprogram

Page 206: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 38

Real-time system control

Systemcontr oller

Userinter face

Faulthandler

Computa tionpr ocesses

Actuatorprocesses

Sensorpr ocesses

Page 207: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 39

Event-driven systems

Driven by externally generated events where the timing of the event is outwith the control of the sub-systems which process the event.

Two principal event-driven models • Broadcast models. An event is broadcast to all sub-

systems. Any sub-system which can handle the event may do so;

• Interrupt-driven models. Used in real-time systems where interrupts are detected by an interrupt handler and passed to some other component for processing.

Other event driven models include spreadsheets and production systems.

Page 208: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 40

Broadcast model

Effective in integrating sub-systems on different computers in a network.

Sub-systems register an interest in specific events. When these occur, control is transferred to the sub-system which can handle the event.

Control policy is not embedded in the event and message handler. Sub-systems decide on events of interest to them.

However, sub-systems don’t know if or when an event will be handled.

Page 209: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 41

Selective broadcasting

Sub-system1

Event and messa ge handler

Sub-system2

Sub-system3

Sub-system4

Page 210: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 42

Interrupt-driven systems

Used in real-time systems where fast response to an event is essential.

There are known interrupt types with a handler defined for each type.

Each type is associated with a memory location and a hardware switch causes transfer to its handler.

Allows fast response but complex to program and difficult to validate.

Page 211: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 43

Interrupt-driven control

Handler1

Handler2

Handler3

Handler4

Process1

Process2

Process3

Process4

Interrupts

Interruptvector

Page 212: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 44

Reference architectures

Architectural models may be specific to some application domain.

Two types of domain-specific model • Generic models which are abstractions from a number of

real systems and which encapsulate the principal characteristics of these systems. Covered in Chapter 13.

• Reference models which are more abstract, idealised model. Provide a means of information about that class of system and of comparing different architectures.

Generic models are usually bottom-up models; Reference models are top-down models.

Page 213: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 45

Reference architectures

Reference models are derived from a study of the application domain rather than from existing systems.

May be used as a basis for system implementation or to compare different systems. It acts as a standard against which systems can be evaluated.

OSI model is a layered model for communication systems.

Page 214: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 46

OSI reference model

Presenta tion

Session

Transpor t

Network

Data link

Physical

7

6

5

4

3

2

1

Comm unica tions medium

Networ k

Data link

Physical

Applica tion

Presenta tion

Session

Transpor t

Networ k

Data link

Physical

Applica tion

Page 215: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 47

Case reference model

Data repository services • Storage and management of data items.

Data integration services • Managing groups of entities.

Task management services • Definition and enaction of process models.

Messaging services • Tool-tool and tool-environment communication.

User interface services • User interface development.

Page 216: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 48

The ECMA reference model

Toolslots

Messageservices

Task management servicesUser inter face services

Data repository servicesData integ ration services

Page 217: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 49

Key points

The software architecture is the fundamental framework for structuring the system.

Architectural design decisions include decisions on the application architecture, the distribution and the architectural styles to be used.

Different architectural models such as a structural model, a control model and a decomposition model may be developed.

System organisational models include repository models, client-server models and abstract machine models.

Page 218: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 50

Key points

Modular decomposition models include object models and pipelining models.

Control models include centralised control and event-driven models.

Reference architectures may be used to communicate domain-specific architectures and to assess and compare architectural designs.

Page 219: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 51

Architectural models

Different architectural models may be produced during the design process

Each model presents different perspectives on the architecture

Page 220: Software Processes 4/muna software.pdfProgramming and debugging Translating a design into a program and removing errors from that program. Programming is a personal activity - there

©Ian Sommerville 2004 Software Engineering, 7th edition. Chapter 11 Slide 52

Architecture attributes

Performance • Localise operations to minimise sub-system communication

Security • Use a layered architecture with critical assets in inner layers

Safety • Isolate safety-critical components

Availability • Include redundant components in the architecture

Maintainability • Use fine-grain, self-contained components