A_Structured_Programming_Approach_to_Data_1979_Coleman.pdf

(5668 KB) Pobierz
A Structured Programming Approach
to Data
Derek Coleman
A Structured
Programming
Approach to Data
Springer-Verlag New York
Derek Coleman
Department of Computation
Institute of Science Technology
University of Manchester
Manchester
England
Library of Congress Cataloging in Publication Data.
Coleman, Derek.
A structured programming appr6ach to data.
Bibliography: p.
1. Structured programming. 2. Data structures
(Computer science)
I.
Title.
QA76.6.06255 001.6'42 79-11220
All rights reserved.
No
part
of this book may be translated or reproduced
in any form without written permission of the copyright holder.
@
1979
Derek Coleman
ISBN 978-1-4684-7987-4
ISBN 978-1-4612-5981-7 (eBook)
DOI 10.1007/978-1-4612-5981-7
9 8 7 6 543 2 1
Contents
Preface
Acknowledgements
1. An Overview of Program Design
ix
xi
1
1
2
1.1
Introduction - The Software Crisis
1.2
1.3
1.4
1.5
1.6
1.7
Objectives of Program Design
The Heart of the Problem
Stepwise Refmement
What Do We Mean When We Say a Program 'Works'?
Summary
Bibliographical Notes
3
4
4
5
5
6
2. Program
Design
Notation
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
An
Abstract Programming Language
Structuring Control
Structuring Data
What is a Data Structure?
Unstructured Data Types
Implementation of Unstructured Types
Summary
Bibliographical Notes
6
6
15
16
17
19
19
20
21
21
22
24
3.
Arrays
3.1
3.2
3.3
3.4
3.5
Array Structures
Arrays and Functions
Implementation of Arrays
Summary
Bibliographical Notes
26
26
27
27
4. Simple Data Structuring
4.1 Record Types
4.2 Implementation of Record Types
29
vi
4.3
4.4
4.5
4.6
4.7
Contents
Use of Structured Types
Variant Types
Implementation of Variant Types
Summary
Bibliographical Notes
29
31
34
34
35
36
36
37
47
48
49
53
53
54
56
59
64
65
66
66
68
71
s.
On Program Design
5.1
5.2
5.3
5.4
Stepwise Refmement of Programs
Two Examples
Summary
Bibliographical Notes
Exercises 1
6.
Set Structures
6.1
6.2
6.3
6.4
6.5
6.6
Introduction
Set Operations
Use of Set Structures
Implementation of Set Structures
Summary
Bibliographical Notes
7.
The Class Construct
7.1
7.2
7.3
7.4
7.5
Using and Implementing Data Structures
Classes
Implementation of Classes
Summary
Bibliographical Notes
79
79
8.
Dynamic Data Structures
8.1
8.2
8.3
8.4
8.5
8.6
8.7
Introduction
Basic Implementation Techniques for Dynamic Data Structures
Linear Linked Lists
Storage Management for Dynamic Data Structures
Linear Linked List Implementation of Integersets
Summary
Bibliographical Notes
80
80
83
84
87
88
94
94
95
95
98
104
108
9. Sequences
9.1
9.2
9.3
9.4
Introduction
Operations on Sequences
Storage Structures for Sequences
Queues
Zgłoś jeśli naruszono regulamin