There are a few key Ada-related documents that you should know about:
  • The most important document is the Ada 95 Reference Manual (RM), which has been referred to throughout this tutorial. The Ada 95 RM is like a legal contract between a user of the Ada language and an Ada compiler developer; it defines the rights and responsibilities of each party. The previous version of this manual was titled the Language Reference Manual (LRM), and some people still use the term "LRM" to refer to the RM.
  • Ada Quality and Style: Guidelines for Professional Programmers (AQ&S) provides a set of specific guidelines to help developers produce better Ada programs. Basically it's the distilled experience of other Ada users; most Ada developers use it. The AQ&S was developed by the Software Productivity Consortium (SPC).
  • The Ada Rationale is a document that explains why Ada is designed the way it is. The rationale includes a number of examples showing how to use the various features of Ada, in particular the features new to Ada 95.
  • The Annotated Ada Reference Manual (AARM) is an extended version of the RM. The AARM is simply the RM with a large number of additional notes in each section on the ramifications and implications of every part. The AARM is used mostly by compiler vendors.

All of these reference documents are available electronically. See URL "http://www.adahome.com/Resources/References.html". Which document is a set of guidelines to help you develop better Ada programs? RM. AARM AQ&S No, sorry. The RM does include some guidelines and hints, but that's not its main purpose. No, sorry. The AARM does include some guidelines and hints, but that's not its main purpose. Right. It'd be a good idea to skim through the AQ&S before you write a lot of Ada code.

Since the RM is the single most important Ada document, it's important to understand that document's structure. The RM contains thirteen sections (numbered 1 through 13), fourteen annexes (labelled A through P), and an index. It also has an introduction which briefly describes the Ada language as a whole.

All true Ada compilers are required to implement the ``core Ada language''. The core of the Ada language is defined in the sections (1 through 13) and three of the document's annexes:

  • Annex A, ``Predefined Language Environment'' - this defines predefined packages like Text_IO and Ada.Strings.Unbounded.
  • Annex B, ``Interface to Other Languages'' - this defines interfaces to other computer languages like C and Fortran.
  • Annex J, ``Obsolescent Features'' - this describes a few Ada 83 capabilities that are permitted but deprecated.

Here are the thirteen sections of the RM, with a simplified description of what is in each section:

  1. General - introduces the standard and defines some basic terms.
  2. Lexical Elements - what are keywords, identifiers, and number syntax.
  3. Declarations and Types - how to declare types, constants, variables, and named numbers.
  4. Names and Expressions - what are legal expressions and uses of types.
  5. Statements - statement syntax (if, loop, etc.)
  6. Subprograms - how to declare and define subprograms (procedures and functions)
  7. Packages - how to declare and define packages
  8. Visibility Rules - scoping rules, use clauses
  9. Tasks and Synchronization - all about tasks and protected types/objects
  10. Program Structure and Compilation Issues - how to compile programs, "with" clauses
  11. Exceptions - all about exceptions
  12. Generic Units - all about generics
  13. Representation Issues - all about low-level requests (requiring records to be stored in certain formats, bit lengths of variables, and so on).

Ada compilers may also include features needed by certain application areas, which are defined in some of the other annexes. These are called the "specialized needs annexes", and are defined in annexes C through H. For example, annex G defines additional requirements and support packages for numerical work, and annex H defines additional support for safety and security. A given Ada compiler may support none or a selected set of these annexes.

Both the index and the table of contents may help you find a specific issue you're trying to find out about. Annex N is the glossary, which may help you understand a specific term used in the RM.

RM references are usually given in the form of the section number followed by the paragraph number, with the paragraph number in parentheses. Thus, if a compiler error message or someone's post to a newsgroup references RM 7.1(3), they are referring to the third paragraph in section 7.1 (which gives the syntax for a package specification).

Is the RM an easy document to read at first? No, not for most people; it's a lot like reading a legal document. However, it gets easier to do over time, and it's a useful skill. Once you are able to look up things in the RM, you'll be able to answer authoritatively many Ada-related questions.

Magnus Kempe has developed a hypertext version of the Ada RM. It includes three ``zoom levels'' of the table of contents that you may find very useful. What section would give more information about protected objects? Section 1. Section 5. Section 6. Section 9. Section 12. Section 13.

If you're using Ada and have a question, there are a number of different resources available, depending on the kind of question you have. As we discussed earlier, the RM is the authoritative book regarding Ada syntax. Two other useful on-line sources for answers to common questions include:

Here are some of the more important Ada WWW servers that are good sources of Ada-related information:

  1. The Switzerland Ada WWW Server / Home of the Brave Ada Programmers (HBAP). One of the most popular Ada WWW servers is Magnus Kempe's Ada Home, also called the Home of the Brave Ada Programmers (HBAP). Kempe's server is located in Lausanne, Switzerland, and contains a number of Ada-related items, including this tutorial. This server is located at URL "http://www.adahome.com/".
  2. Public Ada Library (PAL). The PAL is a library of Ada software, courseware, and documentation. The main PAL site is in the U.S. at wuarchive.wustl.edu (WUARCHIVE), and a French mirror site is also available. The PAL (subject) "card catalog" is an easy way to directly access the PAL data. The PAL is currently managed by Richard Conn.
  3. Ada Information Clearinghouse Home Page. The Ada Information Clearinghouse Home Page provides a collection of Ada-related information.
  4. SIGAda WWW Home Page. SIGAda, a Special Interest Group of the Association for Computing Machinery (ACM), maintains an Ada-related home page. A number of working groups on specialized areas (such as numerics and real-time work) have information available through this server.

This list of servers is only a partial list; in particular there are a number of Ada software libraries. The HBAP server has a list of other sources of Ada information.

One set of reusable components I'd particularly like to point out are the free Ada 95 Booch Components. The Booch components were originally developed by Grady Booch and updated to Ada 95 by David Weller. The Booch components have been used by many developers. However, please don't confuse me (David A. Wheeler) with the person who ported the Booch components (David Weller); we just happen to have similar names.

There are simple ways to answer simple syntax questions. A nice set of Ada 95 reference cards have been developed by Paul Pukite. Members of the Database Research Group at the University of Geneva have produced a very nice set of documents describing the syntax rules of Ada 95 illustrated by syntactic diagrams, with cross-references.

Documentation on the Ada interface to the Java library is available from Intermetrics. If you're interested in a free Ada 95 compiler, look at GNAT; the GNAT Project Home Page has more information. "ez2load" is a simple-to-install package of Ada-related products (including GNAT) for IBM-compatible PCs running MS-DOS or Microsoft Windows 3.1/95/NT. The HBAP server can point you to lists of Ada compilers. If you're developing a program to analyze an Ada program, you may want to learn more about ASIS; the ASIS working group page may be of interest to you.

Your next source for answers should be local experts or your compiler vendor. If you can, ask your local Ada guru at your company or university. If you have a compiler question, send your question to the compiler vendor. For example, GNAT bug reports should be addressed to gnat-report@cs.nyu.edu. For bug reports to any compiler vendor, be sure to include the expected output, the actual output, the source code that causes the bug (simplified if possible), and the version number (GNAT reports this when given the -gnatv option).

If all these approaches fail, post your question to the newsgroup comp.lang.ada. As when posting to any other newsgroup, don't use inflammatory language, and include all the information necessary so others can understand your problem. In particular, state your question clearly, give the name and version number of your compiler, give the kind of computer and operating system you're running on, and include a simple example if that's relevant. What are the following: HBAP, PAL, GNAT, ez2load, comp.lang.ada? The Switzerland Ada WWW server, a library of Ada components, a free Ada compiler, an easy-to-install set of Ada components for PC's, the Ada newsgroup. A library of Ada components, the Switzerland Ada WWW server, a free Ada compiler, an easy-to-install set of Ada components for PC's, the Ada newsgroup. A free Ada compiler, an easy-to-install set of Ada components for PC's, the Ada newsgroup, a library of Ada components, the Switzerland Ada WWW server. That's correct. I asked about the abbreviations because you'll sometimes see the abbreviations in posts to the newsgroup comp.lang.ada.