CALIFORNIA STATE UNIVERSITY, NORTHRIDGE the EVOLUTION of SOFTWARE DESIGN IDEAS a Thesis Submitted in Partial Satisfaction Of
Total Page:16
File Type:pdf, Size:1020Kb
CALIFORNIA STATE UNIVERSITY, NORTHRIDGE THE EVOLUTION OF SOFTWARE DESIGN IDEAS A thesis submitted in partial satisfaction of the requirements for the degree of Master of Science in Computer Science by David J. Koepke May 1985 The thesis of David J. Koepke is approved: Professor Diane Schwartz Professor Russell '1:1;;'{t;Chair California State University, Northridge 11 ACKNOWLEDGEMENTS I would like to express my sincere gratitude to Professor Russ Abbott for all the enlightening conversations, suggestions, and generous extended use of his software design books and articles. I would also like to thank Pat Morales for her vital assistance in typing and revising this thesis, typing and distributing the inquiry letters, and her moral support throughout this project. A special thanks to Larry Constantine, Edsger Dijkstra, C.A.R. Hoare, James Emery and Donald Knuth for their responses to my questions on the history of software design. iii TABLE OF CONTENTS Page List of Figures ..................................... vii Abstract . Vlll Chapter 1 INTRODUCTION . 1 1.1 Overview of Thesis . 3 1.2 Previous Historical Texts 4 1.3 Historical Errors . 4 1.4 Design Influences of the Past 6 Chapter 2 ABSTRACTION 9 2.1 Early Abstraction 10 2.2 Top-Down Design/Stepwise Refinement 14 2.3 Levels of Abstraction . 20 2.4 Program Families 22 2.5 Abstract Data Types 24 2.6 Summary 32 Chapter 3 MODULARITY 34 3.1 Early Modularity 35 3.2 Information Hiding ..•.....• 42 3.3 Object-Oriented Programming 46 3.4 Summary ................................ 53 iv Chapter 4 STRUCTURED PROGRAMMING 54 4.1 Genesis of Structured Programming . 56 4.2 GOTO Controversy······~················· 58 4.3 Summary ............•...................... 65 Chapter 5 CONCURRENCY ........... ~ .. ~ ............... 66 5.1 Shared Variable Based Concurrency 68 5.1.1 Busy Waiting 70 5.1.2 Semaphores ....... •· ..... 71 5.1.3 Critical Regions . .. 72 5.1.4 Monitors 73 5.2 Message Based Concurrency ••.••• 74 5.2.1 Communicating Sequential Processes . 75 5.2.2 Distributed Processes . 77 5.2.3 Ada 78 5.3 Summary . 80 Chapter 6 DATA FLOW ............................... 81 6.1 Early Data Flow 81 6.2 Data Flow Computers and Languages 87 6.3 Summary 90 Chapter 7 FUTURE PROGRAM DESIGN . 91 7.1 Conventional Languages 91 7.2 Non-Conventional Languages 93 v Chapter 8 CONCLUSIONS AND COMMENTS •••.•••..••.•... 96 8.1 Software Design Trends . • . • • • . • . • • . • 96 8.2 Origin of Design Ideas •..•....•...•..... 107 8.2.1 Refinement of a Vague Idea ...•... 107 8.2.2 Reapplication of a Proven Idea ... 108 8.3 Understanding the Ideas •..••...•....••.. 109 References 112 Appendix - Letters .................................. 122 Vl LIST OF FIGURES AND TABLES Figures Figure 2.1 Abstract Flowchart 13 Figure 2.2 Abstract Data Type - Stack ............. 25 Figure 2.3 Axiomatic Queue Specification .•......... 31 Figure 3.1 Emery's Module Hierarchy Chart . ·-· ...... 40 Figure 5.1 Evolution of Concurrency 69 Figure 5.2 CSP Correspondence···········~·········· 77 Figure 5.3 Ada Rendezvous_ • • • • • • • • • • . • • • • • • • • • • • • . • 7 9 Figure 6.1 Early Data Flow Diagram . • • • . 82 Figure 6.2 Adams' Data Flow Graph 84 Figure 6.3 First Design Data Flow Diagram .......•.. 85 Figure 6.4 Serial Data Flow • . • . • . 86 Figure 6.5 Multiple Data Flow 87 Figure 8.1 Procedural Program Mode 1 ••..•.•.••••..•• 97 Figure 8.2 Object Program Model . • . 97 Figure 8.4 Evolution of High-Level Data Abstraction 99 Figure 8.5 Evolution of Concurrency Constructs ..... 101 Figure 8.6 Evolution of Information Hiding ......•.. 102 Tables Table 8.3 Action vs. Object Model . • . • . 98 vii ABSTRACT THE EVOLUTION OF SOFTWARE DESIGN IDEAS by David J. Koepke Master of Science in Computer Science This th~esis is a study of how software design ideas have evolved from the invention of the flowchart in 1947 to the present. The intent of this study is to accurately record software design history, to discover how new design ideas are conceived, and to recognize historial trends that may suggest future software design ideas. The specific design ideas discussed are abstraction, top-down design, levels of abstraction, program families, abstract data types, modularity, information hiding, object-oriented programming, structured programming, concurrency, and data flow. Each idea is defined and a step-by-step history of how it evolved is given. Also included is a brief discussion of future program design. viii Chapter 1 INTRODUCTION The importance of software design has been recognized since the NATO-Sponsored Conference on Software Engineering in 1968 [Dijk 72b]. Its importance is realized by considering that design significantly affects both the cost of developing and maintaining software. For example, in 1979 the annual cost of software in the u.s. was about 20 billion dollars [Boeh 79]. Approximately one third of this amount was used to develop software, of which design is an important step. The remaining two thirds of this 20 billion was spent on software maintenance: correcting errors, enhancing functionality, and improving performance [Wulf 79]. All of these activities are directly affected by a program's design. This thesis is a study of the evolution of software design ideas. Design ideas or design principles are general guidelines that program designers use in transforming the specification of a problem into a well-structured program. The design ideas discussed 1n this text are abstraction, levels of abstraction, program families, abstract data types, modularity, top-down design, information hiding, object-oriented programming, structured programming, concurrency and data flow. 1 2 The purpose of this thesis is to see what can be learned from studying the evolution of software des ig.n ideas. In particular, to observe past and present software design trends and to extrapolate from these trends to perhaps discover where software design is headed. Also, by observing how present design ideas have originatedi insight may be gained and used to develop future software design ideas. In other words, this thesis is a study of the human learning process applied specifically to design and the programming community of the past thirty five years. A second goal is to accurately record software design history: who first stated an idea, when they said it, in what book or article it first appeared, and how the idea has developed. A list of common historical misconceptions is given in Section 1.3. Portions of software design history have been reintroduced in some of the chapters to present each idea's history separately, so that maximum continuity of idea development would be obtained. The dates of origin given to the ideas discussed are based on the date of publication of an article or technical report or when it was first presented at a conference. The actual date of origin of an idea preceeds the published date. 3 1.1 Overview of Thesis This thesis is presented in four conceptual sections: the process of abstraction (Chapter 2), object or module abstraction (Chapter 3), control abstraction (Chapters 4, 5, 6), and future abstraction (Chapter 7). The chapters are organized as follows: Chapter 2 discusses abstraction, the major design technique of programming. Subtopics include the techniques for applying abstraction: top-down design/stepwise refinement, levels of abstraction, program families, and abstract data types. Chapter 3 discusses modularity. Modules are program sub-units that contain desired abstractions. The subtopics of this chapter are information hiding, the idea which has greatly influenced the module concept, and object-oriented programming, the latest form of modularity Chapter 4 covers structured programming. This idea has been presented in a separate chapter because it is a design philosophy that contains some of the other ideas within it. The main thrust of this chapter is the use of GOTOs. Chapter 5 discusses concurrency and is presented 1n two major sections, shared variable concurrency and message based concurrency. Shared variable concurrency discusses the ideas of busy waiting, semaphores, critical regions, and monitors. Message based concurrency discusses 4 communicating sequential processes, distributed processes, and ADA tasks. Chapter 6 explains data flow, the idea that program control should be based on the availability of data. Subsections of this chapter discuss early data flow concepts and recent uses of data -flow to facilitate concurrency. Chapter 7 presents a brief look at software design in the future. Chapter 8, the conclusion, discusses the benefits gained from studying the evolution of software design ideas. 1.2 Previous Historical Texts The research of current literature on software design did not reveal any general papers or books on the history of software design ideas (i.e., none covering a broad range of design ideas). However, papers by Shaw on abstraction [Shaw 84], by Yourdon on structured pro·gramming [Your 79], and by Gehani [Geha 84] and Andrews [Andr 83] on concurrency each covered the history of a single idea. 1.3 Historical Errors The few historical inaccuracies that were found during research were very slight in that credit was usually given to the second person in a sequence of developers of an 5 idea. For example, structured programming is often claimed, [McCr 73], [Shaw 84] to have begun with Dijkstra's 1968 letter to the ACM, "GOTO Statement Considered Harmful" [Dijk 68a], because it triggered a GOTO controversy. Perhaps a more accurate genesis of structured programming is Dijkstra's 1965 article, "Programming Considered as a Human Activity" [Dijk 65a]. This article not only contains arguments against the use of GOTOs but also presents the concepts of modularity and stepwise refinement within the general goal of program correctness (see Section 4.1 for more detail). Larry Constantine is often credited [Cons 84] with the invention of the data flow diagram because of the 1974 paper "Structured Design" [Stev 74]. In fact, he was the first to apply this type of diagram (which had been used as a model for the analysis of parallel computations in 1963), to software design (see Section 6.1 for more detail).