Book contents
- Frontmatter
- Contents
- Preface
- 1 A modern approach to computing
- 2 Specifications I
- 3 Diagrams
- 4 Specifications II
- 5 PDL
- 6 Code generation
- 7 Verification
- 8 Examination of templates and target code
- 9 Abstract data types
- 10 The mathematical basis of abstract data types
- 11 Utilisation of existing programs
- 12 A small scale study – topological sorting
- Appendices
- References
- Index
3 - Diagrams
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- 1 A modern approach to computing
- 2 Specifications I
- 3 Diagrams
- 4 Specifications II
- 5 PDL
- 6 Code generation
- 7 Verification
- 8 Examination of templates and target code
- 9 Abstract data types
- 10 The mathematical basis of abstract data types
- 11 Utilisation of existing programs
- 12 A small scale study – topological sorting
- Appendices
- References
- Index
Summary
In this chapter many kinds of diagram are discussed. They all show structure in some way. They may broadly be classified into program structure diagrams and data structure diagrams – but note that sometimes programs are data to other programs so the distinction is imprecise.
Diagrams used in the program development process
This section discusses the use of diagrams in the program development process.
There are many kinds of diagram and everyone has favourites. It is the intention of this chapter to demonstrate the usefulness of a disciplined approach to diagrams and to stress the similarities between kinds of diagrams rather than to advocate one particular diagramming technique above all others.
In computer programming, the main uses for diagrams are:
to show the flow of control in a program (= flowchart)
to show the structure of data (= data structure diagram), and
to show the structure of a programming language (= syntax diagram).
All these diagramming systems show structure in some way.
All the systems can be used intuitively and informally to organise initial ideas or they can be used formally as part of a disciplined design process.
In looking for the similarities rather than differences between different diagramming systems, the critical observation is that all systems have a way of showing
sequencing
selection
repetition
The diagram below shows the way these structure forms are drawn in three different diagramming systems.
- Type
- Chapter
- Information
- Program Construction , pp. 39 - 60Publisher: Cambridge University PressPrint publication year: 1987