Section 14.2 - RM Structure

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:

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.


Quiz:

What section would give more information about protected objects?

  1. Section 1.
  2. Section 5.
  3. Section 6.
  4. Section 9.
  5. Section 12.
  6. Section 13.

You may also:

PREVIOUS Go back to the previous section

NEXT     Skip to the next section

OUTLINE  Go up to lesson 14 outline

David A. Wheeler (dwheeler@dwheeler.com)

The master copy of this file is at "http://www.adahome.com/Tutorials/Lovelace/s14s2.htm".