CMSC 435: Sof tware More Resources Engineering Sect ion 0101 Atif - - PDF document

cmsc 435 sof tware
SMART_READER_LITE
LIVE PREVIEW

CMSC 435: Sof tware More Resources Engineering Sect ion 0101 Atif - - PDF document

CMSC 435: Sof tware More Resources Engineering Sect ion 0101 Atif M. Memon (atif @cs. umd.edu) Class TA 4115 A. V. Williams building Qing Xie Phone: 301- 405- 3071 qing@cs. umd.edu Of f ice hours Of f ice location


slide-1
SLIDE 1

1

CMSC 435: Sof tware Engineering Sect ion 0101

  • Atif M. Memon (atif @cs. umd.edu)
  • 4115 A. V. Williams building
  • Phone: 301- 405- 3071
  • Of f ice hours

– . Tu. Th. (10:45am- 12:00pm & 4:30pm- 5:30pm)

  • Don’t wait, don’t hesitate, do

communicate!!

– Phone – E- mail – Of f ice hours

More Resources

  • Class TA

– Qing Xie – qing@cs. umd.edu – Of f ice location

  • AVW 4122

– Of f ice hours

  • Wed (9:00am-11:30am)
  • Course page

– www. cs. umd.edu/ ~atif / teaching/ spring2006

How Cars are Engineered (A simple view)

  • User requirements

– Engine power, all- wheel, seat ing, comf ort , MP3 player!!

  • Detailed design

– Blueprints, design documents

  • Test design

– Simulation, protot yping

  • Develop parts (components)

– Test each component – Component s may be reused – Mass produced

  • Assemble the car

– Test the car

  • Fr ont / side cr ash t est s
  • St abilit y t est s

– Usabilit y testing

  • Feedback f r om dr iver s/ passenger s

I n Pictures!! But Seriously

  • Features of many LEGO parts

– Modularity – Reusability

  • Each part can be used in dif f erent places

and ways

– Flexibility of design – Compatibility

  • Wit h ot her LEGO set s
  • Building- blocks

Similar Techniques Used by Builders: Bridges

slide-2
SLIDE 2

2

Detailed Design and Specif ications

Galvanized Bridge Wire for Parallel Wire Bridge Cables. Recommended diameter .196 inch. Galvanized Bridge Strand--consists of several bridge wires, of various diameters twisted together. Galvanized Bridge Rope--consists of six strands twisted around a strand core.

Parallel Wire Cable

Detail of Main Cable and Cable Band. The wrapping wire is omitted at the right for clarity. Note the closed construction and aluminum fillers.

More Det ailed Design and Specif ications Tacoma Narrows Bridge Disaster Back to Sof tware

  • Sof tware uses some of the most

complex structures ever designed

  • Need to apply/ develop engineering

principles to/ f or sof tware

  • Sof tware engineering is concerned

with theories, methods and tools f or prof essional sof tware development

I mportant: Team Work

  • Most sof tware is developed

– By teams of

  • Designer s
  • Pr ogr ammer s
  • Manager s
  • Social skills

– Trust other team members

  • They will develop sof t war e component s t hat you may

use

  • Management skills

– Schedules – Work distribution – Budget

A Few Facts About Sof tware Today

  • Sof tware costs of ten dominate

system costs.

– The costs of sof tware are of ten greater than the hardware cost

  • Sof tware costs more to maintain

than it does to develop.

– For systems with a long lif e, maintenance costs may be several times development costs

slide-3
SLIDE 3

3

Costs I nvolved

  • Typically

– 60% of costs are development costs, – 40% are testing costs. – For custom sof tware, evolution costs of ten exceed development costs

  • Costs vary depending on the type of

system being developed and the requirements of system attributes such as perf ormance and system reliability

  • Distribution of costs depends on the

development method that is used

We will Engineer Sof tware

  • But what is sof tware?

– Computer programs and – Associated documentation

  • Sof tware products may be

developed f or

– A particular customer or – A general market

Role of a Sof tware Engineer

  • Sof tware engineers should adopt a

systematic and organised approach to their work and use appropriate tools and techniques depending on the problem to be solved, the development constraints and the resources available

Attributes of Good Sof tware

  • Should deliver the required f unctionality

and perf ormance

  • Maintainability

– Sof tware must evolve to meet changing needs

  • Dependability

– Sof tware must be trustworthy

  • Ef f iciency

– Sof tware should not make wastef ul use of system resources

  • Usability

– Sof tware must be usable by the users f or which it was designed

Sof tware Processes

  • What is a Sof tware Process?

– A set of activities whose goal is the development or evolution of sof tware

  • Some Activities:

– Specif ication

  • what t he syst em should do and it s development

const r aint s

– Development

  • pr oduct ion of t he sof t war e syst em

– Validation

  • checking t hat t he sof t war e is what t he cust omer

want s

– Evolution

  • changing t he sof t war e in r esponse t o changing

demands

Sof tware Process Models

  • A simplif ied representation of a sof tware

process, presented f rom a specif ic perspective

  • Examples of process perspectives are

– Workf low perspective

  • sequence of act ivit ies

– Data- f low perspective

  • inf or mat ion f low

– Role/ action perspective

  • who does what
  • Generic process models

– Waterf all – Evolutionary development – Formal transf ormation – I ntegration f rom reusable components

slide-4
SLIDE 4

4

Generic Sof tware Process Models

  • The waterf all model

– Separate and distinct phases of specif ication and development

  • Evolutionary development

– Specif ication and development are interleaved

  • Formal systems development

– A mathematical system model is f ormally transf ormed to an implementation

  • Reuse- based development

– The system is assembled f rom existing components

Waterf all Model

Requirements Def inition Requirements Def inition System & Sof tware Design System & Sof tware Design I mplementation & Unit Testing I mplementation & Unit Testing I ntegration & System Testing I ntegration & System Testing Operation & Maintenance Operation & Maintenance

Waterf all Model Problems

  • I nf lexible partitioning of the

project into distinct stages

  • This makes it dif f icult to respond

to changing customer requirements

  • Theref ore, this model is only

appropriate when the requirements are well- understood

Evolutionary Development

  • Exploratory development

– Objective is to work with customers and to evolve a f inal system f rom an initial outline specif ication. Should start with well- understood requirements

  • Throw- away prototyping

– Objective is to understand the system

  • requirements. Should start with poorly

understood requirements

Evolutionary Development

Outline Description Outline Description Specif ication Specif ication Development Development Validation Validation I nitial Version I nitial Version I ntermediate Versions I ntermediate Versions I ntermediate Versions I ntermediate Versions Final Version Final Version Concurrent Activities

Evolutionary Development

  • Problems

– Lack of process visibility – Systems are of ten poorly structured – Special skills (e. g. in languages f or rapid prototyping) may be required

  • Applicability

– For small or medium- size interactive systems – For parts of large systems (e. g. the user interf ace) – For short- lif etime systems

slide-5
SLIDE 5

5

Formal Systems Development

  • Based on the transf ormation of a

mathematical specif ication through dif f erent representations to an executable program

  • Transf ormations are ‘correctness-

preserving’ so it is straightf orward to show that the program conf orms to its specif ication

  • Embodied in the ‘Cleanroom’

approach to sof tware development

Formal Systems Development

Requirements Def inition Requirements Def inition Formal Specif ication Formal Specif ication Formal Transf ormation Formal Transf ormation I ntegration & System Testing I ntegration & System Testing

Formal Transf ormations

Formal Specif ication Formal Specif ication Executable Program Executable Program R3 R3 R2 R2 R1 R1 P1 P1 P2 P2 P3 P3 P4 P4 T1 T2 T3 T4 Formal Transf ormations Proof s of Transf ormation Correctness

Formal Systems Development

  • Problems

– Need f or specialised skills and training to apply the technique – Dif f icult to f ormally specif y some aspects of the system such as the user interf ace

  • Applicability

– Critical systems especially those where a saf ety or security case must be made bef ore the system is put into

  • peration

Reuse- oriented Development

  • Based on systematic reuse where

systems are integrated f rom existing components or COTS (Commercial- of f - the- shelf ) systems

  • Process stages

– Component analysis – Requirements modif ication – System design with reuse – Development and integration

  • This approach has received a lot of

attention recently

Reuse- oriented Development

Requirements Specif ication Requirements Specif ication Component Analysis Component Analysis Requirements Modif ication Requirements Modif ication System Validation System Validation System Design With Reuse System Design With Reuse Development & I ntegration Development & I ntegration

slide-6
SLIDE 6

6

Process I teration

  • System requirements ALWAYS

evolve in the course of a project so process iteration where earlier stages are reworked is always part

  • f the process f or large systems
  • I teration can be applied to any of

the generic process models

  • Two (related) approaches

– I ncremental development – Spiral development

I ncremental Development

  • 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 f unctionality

  • User requirements are prioritized and

the highest priority requirements are included in early increments

  • Once the development of an increment is

started, the requirements are f rozen though requirements f or later increments can continue to evolve

I ncremental Development

Def ine Outline Requirements Def ine Outline Requirements Assign Requirements to I ncrements Assign Requirements to I ncrements Design System Architecture Design System Architecture Develop System I ncrement Develop System I ncrement Validat e I ncrement Validat e I ncrement I ntegrate I ncrement I ntegrate I ncrement Validat e System Validat e System Final Version Final Version System I ncomplete

I ncremental Development Advantages

  • Customer value can be delivered

with each increment so system f unctionality is available earlier

  • Early increments act as a prototype

to help elicit requirements f or later increments

  • Lower risk of overall project f ailure
  • The highest priority system

services tend to receive t he most testing

Extreme Programming

  • New approach to development based
  • n the development and delivery of

very small increments of f unctionality

  • Relies on constant code

improvement, user involvement in the development team and pairwise programming

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 f ixed phases such as specif ication or

design - loops in the spiral are chosen depending on what is required

  • Risks are explicitly assessed and resolved

throughout the process

slide-7
SLIDE 7

7

Spiral Model of the Sof tware Process

Risk analysis Risk analysis Risk analysis Risk analysis Proto- type 1 Prototype 2 Prototype 3 Opera- tional protoype Concept of Operation Simulations, models, benchmarks S/W requirements Requirement validation Design V&V Product design Detailed design Code Unit test Integration test Acceptance test Service Develop, verify next-level product Evaluate alternatives identify, resolve risks Determine objectives alternatives and constraints Plan next phase Integration and test plan Development plan Requirements plan Life-cycle plan REVIEW

Spiral Model Sectors

  • Objective setting

– Specif ic objectives f or the phase are identif ied

  • Risk assessment and reduction

– Risks are assessed and activities put in place to reduce the key risks

  • Development and validation

– A development model f or the system is chosen which can be any of the generic models

  • Planning

– The project is reviewed and the next phase

  • f the spiral is planned

Sof tware Specif ication

  • The process of establishing what

services are required and the constraints on the system’s

  • peration and development

The Requirements Engineering Process

Feasibility Study Feasibility Study Requirements Elicitation & Analysis Requirements Elicitation & Analysis Requirements Specif ication Requirements Specif ication Requirements Validation Requirements Validation Requirements Document Requirements Document User & System Requirements User & System Requirements System Models System Models Feasibility Report Feasibility Report

Sof tware Design and I mplementation

  • The process of converting the system

specif ication into an executable system

  • Sof tware design

– Design a sof tware structure that realises the specif ication

  • I mplementation

– Translate this structure into an executable program

  • The activities of design and

implementation are closely related and may be inter- leaved

The Sof tware Design Process

Architect ural Design Architect ural Design

Requirements Specif ication Requirements Specif ication

Abstract Specif ication Abstract Specif ication I nterf ace Design I nterf ace Design Component Design Component Design Data Struct ure Design Data Struct ure Design Algorithm Design Algorithm Design Algorithm Specif ication Algorithm Specif ication System Architect ure System Architect ure Sof tware Specif ication Sof tware Specif ication I nterf ace Specif ication I nterf ace Specif ication Component Specif ication Component Specif ication Data Struct ure Specif ication Data Struct ure Specif ication

Design Activities Design Products

slide-8
SLIDE 8

8

Design Methods

  • Systematic approaches to

developing a sof tware design

  • The design is usually documented as

a set of graphical models

  • Possible models

– Data- f low model – Entity- relation- attribute model – Structural model – Object models

Programming and Debugging

  • Translating a design into a program

and removing errors f rom that program

  • Programming is a personal activity -

there is no generic programming process

  • Programmers carry out some

program testing to discover f aults in the program and remove these f aults in the debugging process

The Debugging Process

Locate Error Locate Error Design Error Repair Design Error Repair Repair Error Repair Error Retest Program Retest Program

Sof tware Validation

  • Verif ication and validation is intended to

show that a system conf orms to its specif ication and meets the requirements

  • f the system customer
  • I nvolves checking and review processes

and system testing

  • System testing involves executing the

system with test cases that are derived f rom the specif ication of the real data to be processed by the system

The Testing Process

Unit Testing Unit Testing Module Testing Module Testing Sub- system Testing Sub- system Testing System Testing System Testing Accept ance Testing Accept ance Testing Component Testing I ntegration Testing User Testing

Testing Stages

  • Unit testing

– I ndividual components are tested

  • Module testing

– Related collections of dependent components are tested

  • Sub- system testing

– Modules are integrat ed into sub- syst ems and tested. The f ocus here should be on interf ace testing

  • System testing

– Testing of the syst em as a whole. Testing of emergent properties

  • Acceptance testing

– Testing with customer dat a to check that it is acceptable

slide-9
SLIDE 9

9

Testing Phases

Requirements Specif ication Requirements Specif ication System Design System Design System Specif ication System Specif ication Detailed Design Detailed Design Module & Unit Code & Tests Module & Unit Code & Tests Sub- system I ntegration Test Sub- system I ntegration Test System I ntegration Test System I ntegration Test Acceptance Test Acceptance Test

Service Service Accept ance Test Plan Accept ance Test Plan Sub- system I ntegration Test Plan Sub- system I ntegration Test Plan System I ntegration Test Plan System I ntegration Test Plan

Sof tware Evolution

  • Sof tware is inherently f lexible and

can change.

  • As requirements change through

changing business circumst ances, the sof tware that supports the business must also evolve and change

System Evolution

Def ine System Requirements Def ine System Requirements New System New System Existing Systems Existing Systems Assess Existing Systems Assess Existing Systems Propose System Changes Propose System Changes Modif y Systems Modif y Systems