Home/Standards & Guidelines

Ada '83 Quality and Style:

Guidelines for Professional Programmers

Copyright 1989, 1991,1992 Software Productivity Consortium, Inc., Herndon, Virginia.
Style Guide navigation aids...
High-level TOC - Links to Style Guide chapters.
Detailed TOC - Links to all numbered section headings.
Chapter summaries - Links to guideline summaries by chapter and topic.
Table of contents from Postscript printed version.


About this book, from the Introduction:

"This book [and this hypertext version] is intended to help the computer professional produce better Ada programs. It presents a set of specific guidelines for using the powerful features of Ada in a disciplined manner. Each guideline consists of a concise statement of the principles that should be followed, and a rationale explaining why following the guideline is important. In most cases, an example of the use of the guideline is provided, and in some cases a further example is included showing the consequences of violating the guideline...."

About this Web/HTML version:

This conversion of the Ada '83 Style Guide to HTML was completed for the Ada Information Clearinghouse in August/September 1995, for installation on the AdaIC web server at http://sw-eng.falls-church.va.us/AdaIC/.

No formatted copy suitable for automatic conversion to HTML could be found. (There are as yet no general-purpose PostScript-to-HTML converters). The text-only version was therefore used as a starting point. Logic n.v.'s TextToHTML was used to encode HTML special characters and create an initial file set with rudimentary formatting. The rest of the conversion and formatting was "semi-automated" (in other words, mostly manual gruntwork aided by some clever macros). A printed copy of the PostScript version was used to guide formatting in order to stay close to the original in appearance and intent.

This HTML version adds several features and improvements, notably:

-- Jim Irving 11sep95


Style Guide Chapters

Copyright, Trademarks, Preface, Authors and Acknowledgements
CHAPTER 1: Introduction
CHAPTER 2: Source Code Presentation
CHAPTER 3: Readability
CHAPTER 4: Program Structure
CHAPTER 5: Programming Practices
CHAPTER 6: Concurrency
CHAPTER 7: Portability
CHAPTER 8: Reusability
CHAPTER 9: Performance
CHAPTER 10: Complete Examples
APPENDIX A: Map from Ada Language Reference Manual to Guidelines
REFERENCES
BIBLIOGRAPHY
INDEX

Chapter summary topics

Summary of Chapter 2:
Source Code Presentation
code formatting
Summary of Chapter 3:
Readability
spelling
naming conventions
comments
using types
Summary of Chapter 4:
Program Structure
high-level structure
visibility
exceptions
Summary of Chapter 5:
Programming Practices
optional parts of the syntax
parameter lists
types
data structures
expressions
statements
visibility
using exceptions
erroneous execution
Summary of Chapter 6:
Concurrency
tasking
communication
termination
Summary of Chapter 7:
Portability
fundamentals
numeric types and expressions
storage control
tasking
exceptions
representation clauses and implementation-dependent features
input/output
Summary of Chapter 8:
Reusability
understanding and clarity
robustness
adaptability
independence
Summary of Chapter 9:
Performance
improving execution speed

Table of Contents from Postscript printed version

CHAPTER 1 Introduction                                           1
1.1     HOW TO USE THIS BOOK                                     2
1.2     TO THE NEW Ada PROGRAMMER                                2
1.3     TO THE EXPERIENCED Ada PROGRAMMER                        3
1.4     TO THE SOFTWARE PROJECT MANAGER                          3
1.5     TO CONTRACTING AGENCIES AND STANDARDS ORGANIZATIONS      4
CHAPTER 2 Source Code Presentation                               5
2.1     CODE FORMATTING                                          5
2.2     SUMMARY                                                 15
CHAPTER 3 Readability                                           17
3.1     SPELLING                                                17
3.2     NAMING CONVENTIONS                                      20
3.3     COMMENTS                                                24
3.4     USING TYPES                                             35
3.5     SUMMARY                                                 37
CHAPTER 4 Program Structure                                     41
4.1     HIGH-LEVEL STRUCTURE                                    41
4.2     VISIBILITY                                              46
4.3     EXCEPTIONS                                              50
4.4     SUMMARY                                                 52
CHAPTER 5 Programming Practices                                 55
5.1     OPTIONAL PARTS OF THE SYNTAX                            55
5.2     PARAMETER LISTS                                         58
5.3     TYPES                                                   60
5.4     DATA STRUCTURES                                         63
5.5     EXPRESSIONS                                             66
5.6     STATEMENTS                                              69
5.7     VISIBILITY                                              77
5.8     USING EXCEPTIONS                                        80
5.9     ERRONEOUS EXECUTION                                     83
5.10    SUMMARY                                                 87
CHAPTER 6 Concurrency                                           91
6.1     TASKING                                                 91
6.2     COMMUNICATION                                           96
6.3     TERMINATION                                            104
6.4     SUMMARY                                                107
CHAPTER 7 Portability                                          109
7.1     FUNDAMENTALS                                           110
7.2     NUMERIC TYPES AND EXPRESSIONS                          113
7.3     STORAGE CONTROL                                        116
7.4     TASKING                                                117
7.5     EXCEPTIONS                                             118
7.6     REPRESENTATION CLAUSES AND IMPLEMENTATION-DEPENDENT
          FEATURES                                             119
7.7     INPUT/OUTPUT                                           122
7.8     SUMMARY                                                124
CHAPTER 8 Reusability                                          127
8.1     UNDERSTANDING AND CLARITY                              128
8.2     ROBUSTNESS                                             130
8.3     ADAPTABILITY                                           136
8.4     INDEPENDENCE                                           147
8.5     SUMMARY                                                151
CHAPTER 9 Performance                                          153
9.1     IMPROVING EXECUTION SPEED                              153
9.2     SUMMARY                                                156
CHAPTER 10 Complete Examples                                   157
10.1    MENU-DRIVEN USER INTERFACE                             157
10.2    LINE-ORIENTED PORTABLE DINING PHILOSOPHERS EXAMPLE     165
10.3    WINDOW-ORIENTED PORTABLE DINING PHILOSOPHERS EXAMPLE   170
APPENDIX A Map from Ada Language Reference Manual to
          Guidelines                                           179
REFERENCES                                                     185
BIBLIOGRAPHY                                                   189
INDEX                                                          193