(c) p. h. welch. 20031 software engineering chapter 3

26
(C) P. H. Welch. 2003 1 Software Engineering Chapter 3

Upload: dana-rice

Post on 16-Jan-2016

229 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 1

SoftwareEngineering

Chapter 3

Page 2: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 2

Software Engineering

...the software crises & some philosophy

Page 3: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 3

Software Engineering

• No machinesNo programming problems

• Mild machinesMild problems

• Gigantic machinesGigantic problems

E. W. Dijkstra(Turing Award Lecturer – 1972)

Page 4: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 4

Software Engineering

• The computer industry is in its infancy

• It produces labour saving products (hardware and software)

• Its method of production is manual, labour intensive and fraught with human error

Page 5: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 5

Symptoms of Crisis

Systems that are:-•Late•Over budget (excessively)•Not to specification•Unreliable•Inflexible•Hard to maintain•Not reusable•Not portable

Page 6: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 6

Examples...???

• IBM OS/360• Ada• PL/1• System ‘X’• • • •

Page 7: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 7

Some Causes

• Failure of organizations to understand the life-cycle implications of software development

• Grave shortage of trained software engineers• “von Neumann” architecture• Tendency of organizations to become entrenched

in archaic programming languages and practices

(acknowledgements to Grady Booch)

Page 8: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 8

Fundamental Problem

Workers

“Nobody knows what precisely they

are supposed to be doing.”

Management

“Nobody knows what the hell is going on!!!”

Page 9: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 9

We are expected to produce “complex” systems:-

• Large(1 M lines of code)

• Long lived(15 years)

• Continuously changing specifications(that’s life!)

• Physical constraints(of hardware technology – also changing)

• High reliability(and fault tolerance)

Page 10: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 10

How can we master complexity?

• Limitations of the human mind to cope with more than 7 (2) things at once

• “I have only a very small head and I must live with it.”

- E. W. Dijkstra

Page 11: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 11

“A complex system that works is invariably found to have evolved from a simple system that worked.”

-John Gall(Fifteenth law in :

“Systematics: How Systems Work and Especially How They Fail”

Times Books, New York, 1977)

Page 12: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 12

Systems with complex properties

... are complicated?

...must be built from systems with simple properties

Replicated, perhaps,to a massive extent

Combined in a simple way

Reusable

Page 13: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 13

...software engineering

Page 14: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 14

Software Engineering

The computing professional must become both an:

Engineer

• Working from a base of formal theory and a set of applied principles

Artist

• Creating systems from the raw materials of data structures & algorithms, but within the above disciplines

Page 15: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 15

Software Engineering

• “A disciplined artistry” – G. Booch

• sets goals for good systems

• identifies principles to help achieve the goals

• provides tools to support the principles

Page 16: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 16

Software Engineering Goals

Simplicity:

• Understandability• Verifiability• Reliability• Modifiability• Efficiency• Reusability

Page 17: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 17

Software Engineering Principles

• Abstraction

• Information Hiding

• Structuring

• Localisation

• Uniformity

• Completeness

• Verifiability

Page 18: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 18

Beyond Syntax and Semantics

This course is not going to just address the syntax and

semantics of occam as a programming language.

Without a conscious understanding of software engineering

principles, we will continue to fail to achieve the goals of

software engineering.

For multi-processor systems, the consequences of

software mis-engineering will be particularly difficult to

overcome.

Page 19: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 19

Abstraction

• The extraction of essential details of an “object” that are necessary and sufficient to characterise (and hence, use) it

• the omission of inessential details (that clutter up the mind and commit you to particular implementation details)

Page 20: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 20

Abstraction

“In the development of our understanding of complex phenomena, the most powerful tool available to the human intellect is abstraction”

C. A. R. Hoare

“Notes on Data Structuring”:in ‘Structured

Programming’,

Dahl, Dijkstra, & Hoare,

Academic Press, 1972

Page 21: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 21

Abstraction

Information Hiding

Abstraction

when applied

achieve

Structuring

Attributes of good abstractions

LocalisationUniformityCompletenessVerifiability

Page 22: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 22

Abstraction

...simplicity versus complexity

Page 23: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 23

Successful Strategies for Design

1. Design so simple that obviously there are no deficiencies.

2. Design so complex that there are no obvious deficiencies.

C.A.R. Hoare,

ACM Turing Award Lecture,

1980

Page 24: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 24

Successful Strategies for Design

“Ada covers a much larger application domain than Pascal. Hence, it is inevitably more complex than Pascal.”

J. Ichbiah

“The more complicated the subject we are trying to discuss, the more simple must be our language for discussing it.”

N. Wirth

Page 25: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 25

Language Reference Manuals

Language No. of Pages

Algol-60 43

Pascal 38

BCPL 20

occam 18

occam2 22

Ada 275

Page 26: (C) P. H. Welch. 20031 Software Engineering Chapter 3

(C) P. H. Welch. 2003 26

Entia non suntmultiplicanda

praeter necessitatem

William of Occam (XIV century)