Table Of ContentAN ABSTRACT OF THE THESIS OF
Stephen M. Shum for the degree of Doctor of Philosophy
in Computer Science presented on November 25, 1992.
Title: AOPS: An Abstraction Oriented Programming System
For Literate Programming
Redacted for Privacy
Abstract approved:
Curtis R. Cook
The practice of literate programming is not
widespread because existing literate programming systems
have some undesirable characteristics such as
programming language and text processor dependence and
lack of flexible tools for viewing and manipulation of
the source file. This dissertation describes the
literate programming system AOPS (Abstraction Oriented
Programming System) which addresses both of these
problems. AOPS is programming language and text
processor independent literate programming system. AOPS
tools include a hypertext browser, a lister with the
ability to select what is presented and what is
suppressed, and a filter to extract the program code
from the AOPS source file. AOPS introduces the notion
of a phantom abstraction that enhances the
understandability of the literate program and when used
in conjunction with the browser greatly extends the
capabilities of AOPS. We also discuss how the design of
AOPS supports extension of the concept of literate
programming to encompass the entire software life cycle.
Finally we describe an experiment which showed that
literate programs contain more documentation than
traditional programs.
AOPS: An Abstraction Oriented
Programming System For Literate Programming
by
Stephen M. Shum
A THESIS
submitted to
Oregon State University
in partial fulfillment of
the requirements for the
degree of
Doctor of Philosophy
Completed November 25, 1992
Commencement June 1993
APPROVED:
Redacted for Privacy
Professor of Computer Science in charge of major
Redacted for Privacy
Head of department of Computer Science
Redacted for Privacy
Dean of Gra, ate Sch
411
Date thesis is presented November 25, 1992
Typed by Stephen M. Shum for Stephen M. Shum
ACKNOWLEDGEMENTS
Dr. Curtis Cook, my advisor, was one of the most
influential forces behind my work at Oregon State
University. He has always been willing and able to help
me formulate my ideas. He has always listened to me
when I made sense and when I did not. Completing this
research would have been impossible without the help and
guidance he provided. I valued greatly in his
teachings, guidance, encouragement, and advice.
Dr. John Bolte, Dr. Bella Bose, Dr. Tim Budd, Dr.
Ted Lewis, and Dr. Mike Quinn, my committee members,
provided valuable insights into the applicability of my
research and offered encouragement at several points
along the way. Ed Gellenbeck, my fellow student and
friend, provided valuable comments throughout my
research. Dave Cawlfield, my friend, let me use his
home, his office, and his computer for my work.
Augustana College, my employer, provided financial
support without which I would not be able to come back
to graduate school. My sincere thanks to them all.
Most of all, I want to thank my family, especially
my mother and father, without whom nothing is possible
or worthwhile.
TABLE OF CONTENTS
1. INTRODUCTION 1
1.1 The Problem 2
1.1.1 Lack of Flexible Literate Programming
Systems 2
1.1.2 Lack of Empirical Support for
Literate Programming 7
1.2 Solution Approach 10
1.2.1 Abstraction Oriented Programming System
(AOPS) 10
1.2.2 A Literate Programming Experiment 12
1.3 Overview of The Dissertation 13
2. LITERATE PROGRAMMING 15
2.1 Literate Programming 16
2.2 Web 18
2.3 Remarks 23
3. AOPS: ABSTRACTION ORIENTED PROGRAMMING SYSTEM 24
3.1 Abstraction Oriented 24
3.2 The AOPS Rules 25
3.2.1 The Code Rule 26
3.2.2 The Textdoc Rule 27
3.2.3 The Graphicdoc Rule 28
3.3 Free Style Modular Decomposition 29
3.4 Incremental Program and Data Development 30
3.5 Program Evolution 31
3.6 Embedded Program Design 32
3.7 Development of Large Programs and Reuse 33
3.8 Hierarchical Structure of An AOPS Program 34
3.9 Tightly Coupled Code and Documentation 34
3.10 The AOPS Tools 36
3.10.1 AOB (Abstraction Oriented Browser) 36
3.10.2 AOL (Abstraction Oriented Lister) 39
3.10.3 AOP (Abstraction Oriented Processor) 41
3.11 Phantom Abstraction 45
3.12 Implementation 49
3.13 Summary 50
4. UNIQUE FEATURES AND APPLICATIONS OF AOPS 52
4.1 Phantom Abstraction 52
4.1.1 Object Oriented Programming 55
4.1.1.1 Navigation 57
4.1.1.2 The Yoyo Problem 60
4.1.2 Delocalized Plans 64
4.2 AOPS and The Design Phase of The Software
Life Cycle 72
4.2.1 AOPS and PDL 72
4.2.2 AOPS and Graphical Design Methodologies 76
4.3 Design History 79
4.4 Extensibility 80
4.5 AOPS Aids in Reuse 82
4.6 AOPS Aids Understandability of Programs 84
4.7 AOPS as a Teaching Tool 87
5. AN EMPIRICAL STUDY ON LITERATE PROGRAMMING 89
5.1 Problems of Controlled Experiments 91
5.1.1 Methodological Concerns 91
5.1.1.1 Selection of Subjects 91
5.1.1.2 Selection of Materials 94
5.1.1.1 Selection of an Experimental
Measure 95
5.1.2 Validity Issues 98
5.1.2.1 Internal Validity 98
5.1.2.2 External Validity 99
5.2 The Literate Programming Experiment 99
5.2.1 Hypothesis 99
5.2.2 Independent and Dependent Variables 99
5.2.3 Design 100
5.2.4 Data Collection and Measures 104
5.2.5 Results 106
5.2.6 Further Analysis 108
5.3 Discussion 114
6. CONCLUSIONS 116
BIBLIOGRAPHY 121
APPENDICES
APPENDIX A AOPS 8-QUEENS SOURCE FILE 127
APPENDIX B AOP 8-QUEENS OUTPUT FILE 138
APPENDIX C AOPS AND PDL 141
APPENDIX D DESCRIPTIONS OF THE TWO PROGRAMMING
PROBLEMS 142
APPENDIX E PROJECT GUIDELINES 146
APPENDIX F DATA COLLECTION 148
APPENDIX G ANALYSIS RESULTS 150
APPENDIX H ANALYSIS RESULTS CONTINUED 152
LIST OF FIGURES
Figure Page
1. Improvements Made by Existing Literate
Programming Systems 7
2. The Processing Paths in the Literate Paradigm 17
3. The Processing Paths in Web 19
4. Portion of a Web Source File 21
5. Weave and TEX Output 21
6. Tangle Output 22
7. Code Definitions for 8-queens solution and
variables of 8-queens 30
8. The Program Tree for the 8-queens Program 35
9. Sample AOB Session 37
10. Listing for (procedures and functions of
8-queens, 2, cn) 42
11. Listing for (QueenPosition, 1, ctgn) 43
12. Table of Contents and Index 44
13. AOP Output for the AOPS 8-queens Program 46
14. An Application of Phantom Abstractions 48
15. Hierarchical Program Structure of Web-Like
Literate Programs 53
16. Network Program Structure of AOPS Programs 53
17. Example Class Hierarchy 57
18. Example AOPS Rules 58
19. Effective Browsing of the Class Hierarchy 59
20. Collapsing of the Class Hierarchy into a Single
Class 62
21. Delocalized Plans Documentation 66
22. Delocalized Plans Documentation Using AOPS 69
23. Online Delocalized Plans Documentation
Understanding 70
24. PDL and AOPS 74
25. Datagram and Actigram 77
26. AOPS and the Software Life Cycle 81
27. An Example Reuse Library Hierarchy 84
LIST OF TABLES
Table Page
1. Average Number of Code and Comment in Line,
Word, and Character 107
2. Average Amount of Code per Assignment per
Method 107
3. Average Number and Size of Comments 109
4. U Test of Average Number and Size of Comments 109
5. Average Number and Size of Non-Delimiter Type
Comments 110
6. U Test of Average Number and Size of Non-
Delimiter Type Comments 110
7. Analysis of Information Contents of Comments 112
Description:AOPS: An Abstraction Oriented Programming System For Literate Programming by Stephen M. Shum A THESIS submitted to Oregon State University in partial fulfillment of