AARM95 - Structure
Author: JTC1/SC22/WG9/ARG, by Randall Brukardt, ARG Editor

Contents Index Previous Next

# 1.1.2 Structure

1
This International Standard contains thirteen sections, fourteen annexes, and an index.
2
The core of the Ada language consists of:
3

- Sections 1 through 13

4

- Annex A, ``Predefined Language Environment''

5

- Annex B, ``Interface to Other Languages''

6

- Annex J, ``Obsolescent Features''

7
The following Specialized Needs Annexes define features that are needed by certain application areas:
8

- Annex C, ``Systems Programming''

9

- Annex D, ``Real-Time Systems''

10

- Annex E, ``Distributed Systems''

11

- Annex F, ``Information Systems''

12

- Annex G, ``Numerics''

13

- Annex H, ``Safety and Security''

14
The core language and the Specialized Needs Annexes are normative, except that the material in each of the items listed below is informative:
15

- Text under a NOTES or Examples heading.

16

- Each clause or subclause whose title starts with the word ``Example'' or ``Examples''.

17
All implementations shall conform to the core language. In addition, an implementation may conform separately to one or more Specialized Needs Annexes.
18
The following Annexes are informative:
19

- Annex K, ``Language-Defined Attributes''

20

- Annex L, ``Language-Defined Pragmas''

21

- Annex M, ``Implementation-Defined Characteristics''

22

- Annex N, ``Glossary''

23

- Annex P, ``Syntax Summary''

23.a
Discussion: The idea of the Specialized Needs Annexes is that implementations can choose to target certain application areas. For example, an implementation specifically targeted to embedded machines might support the application-specific features for Real-time Systems, but not the application-specific features for Information Systems.
23.b
The Specialized Needs Annexes extend the core language only in ways that users, implementations, and standards bodies are allowed to extend the language; for example, via additional library units, attributes, representation items (see 13.1), pragmas, and constraints on semantic details that are left unspecified by the core language. Many implementations already provide much of the functionality defined by Specialized Needs Annexes; our goal is to increase uniformity among implementations by defining standard ways of providing the functionality.
23.c
We recommend that the validation procedures allow implementations to validate the core language, plus any set of the Specialized Needs Annexes. We recommend that implementations not be allowed to validate a portion of one of the Specialized Needs Annexes, although implementations can, of course, provide unvalidated support for such portions. We have designed the Specialized Needs Annexes assuming that this recommendation is followed. Thus, our decisions about what to include and what not to include in those annexes are based on the assumption that each annex is validated in an ``all-or-nothing'' manner.
23.d
An implementation may, of course, support extensions that are different from (but possibly related to) those defined by one of the Specialized Needs Annexes. We recommend that, where appropriate, implementations do this by adding library units that are children of existing language-defined library packages.
23.e
An implementation should not provide extensions that conflict with those defined in the Specialized Needs Annexes, in the following sense: Suppose an implementation supports a certain error-free program that uses only functionality defined in the core and in the Specialized Needs Annexes. The implementation should ensure that that program will still be error free in some possible full implementation of all of the Specialized Needs Annexes, and that the semantics of the program will not change. For example, an implementation should not provide a package with the same name as one defined in one of the Specialized Needs Annexes, but that behaves differently, even if that implementation does not claim conformance to that Annex.
23.f
Note that the Specialized Needs Annexes do not conflict with each other; it is the intent that a single implementation can conform to all of them.
24
Each section is divided into clauses and subclauses that have a common structure. Each section, clause, and subclause first introduces its subject. After the introductory text, text is labeled with the following headings:

#### Language Design Principles

24.a
These are not rules of the language, but guiding principles or goals used in defining the rules of the language. In some cases, the goal is only partially met; such cases are explained.
24.b
This is not part of the definition of the language, and does not appear in the RM95.

#### Syntax

25
Syntax rules (indented).

#### Name Resolution Rules

26
Compile-time rules that are used in name resolution, including overload resolution.
26.a
Discussion: These rules are observed at compile time. (We say ``observed'' rather than ``checked,'' because these rules are not individually checked. They are really just part of the Legality Rules in Section 8 that require exactly one interpretation of each constituent of a complete context.) The only rules used in overload resolution are the Syntax Rules and the Name Resolution Rules.
26.b
When dealing with non-overloadable declarations it sometimes makes no semantic difference whether a given rule is a Name Resolution Rule or a Legality Rule, and it is sometimes difficult to decide which it should be. We generally make a given rule a Name Resolution Rule only if it has to be. For example, ``The name, if any, in a raise_statement shall be the name of an exception.'' is under ``Legality Rules.''

#### Legality Rules

27
Rules that are enforced at compile time. A construct is legal if it obeys all of the Legality Rules.
27.a
Discussion: These rules are not used in overload resolution.
27.b
Note that run-time errors are always attached to exceptions; for example, it is not ``illegal'' to divide by zero, it just raises an exception.

#### Static Semantics

28
A definition of the compile-time effect of each construct.
28.a
Discussion: The most important compile-time effects represent the effects on the symbol table associated with declarations (implicit or explicit). In addition, we use this heading as a bit of a grab bag for equivalences, package specifications, etc. For example, this is where we put statements like so-and-so is equivalent to such-and-such. (We ought to try to really mean it when we say such things!) Similarly, statements about magically-generated implicit declarations go here. These rules are generally written as statements of fact about the semantics, rather than as a you-shall-do-such-and-such sort of thing.

#### Post-Compilation Rules

29
Rules that are enforced before running a partition. A partition is legal if its compilation units are legal and it obeys all of the Post-Compilation Rules.
29.a
Discussion: It is not specified exactly when these rules are checked, so long as they are checked for any given partition before that partition starts running. An implementation may choose to check some such rules at compile time, and reject compilation_units accordingly. Alternatively, an implementation may check such rules when the partition is created (usually known as ``link time''), or when the partition is mapped to a particular piece of hardware (but before the partition starts running).

#### Dynamic Semantics

30
A definition of the run-time effect of each construct.
30.a
Discussion: This heading describes what happens at run time. Run-time checks, which raise exceptions upon failure, are described here. Each item that involves a run-time check is marked with the name of the check -- these are the same check names that are used in a pragma Suppress. Principle: Every check should have a name, usable in a pragma Suppress.

#### Bounded (Run-Time) Errors

31
Situations that result in bounded (run-time) errors (see 1.1.5).
31.a
Discussion: The ``bounds'' of each such error are described here -- that is, we characterize the set of all possible behaviors that can result from a bounded error occurring at run time.

#### Erroneous Execution

32
Situations that result in erroneous execution (see 1.1.5).

#### Implementation Requirements

33
Additional requirements for conforming implementations.
33.a
Discussion: ...as opposed to rules imposed on the programmer. An example might be, ``The smallest representable duration, Duration'Small, shall not be greater than twenty milliseconds.''
33.b
It's really just an issue of how the rule is worded. We could write the same rule as ``The smallest representable duration is an implementation-defined value less than or equal to 20 milliseconds'' and then it would be under ``Static Semantics.''

#### Documentation Requirements

34
Documentation requirements for conforming implementations.
34.a
Discussion: These requirements are beyond those that are implicitly specified by the phrase ``implementation defined''. The latter require documentation as well, but we don't repeat these cases under this heading. Usually this heading is used for when the description of the documentation requirement is longer and does not correspond directly to one, narrow normative sentence.

#### Metrics

35
Metrics that are specified for the time/space properties of the execution of certain language constructs.

#### Implementation Permissions

36
Additional permissions given to the implementer.
36.a
Discussion: For example, ``The implementation is allowed to impose further restrictions on the record aggregates allowed in code statements.'' When there are restrictions on the permission, those restrictions are given here also. For example, ``An implementation is allowed to restrict the kinds of subprograms that are allowed to be main subprograms. However, it shall support at least parameterless procedures.'' -- we don't split this up between here and ``Implementation Requirements.''

#### Implementation Advice

37
Optional advice given to the implementer. The word ``should'' is used to indicate that the advice is a recommendation, not a requirement. It is implementation defined whether or not a given recommendation is obeyed.
37.a
Implementation defined: Whether or not each recommendation given in Implementation Advice is followed.
37.b/1
Discussion: The advice generally shows the intended implementation, but the implementer is free to ignore it. The implementer is the sole arbiter of whether or not the advice has been obeyed, if not, whether the reason is a good one, and whether the required documentation is sufficient. It would be wrong for the ACATSACVC to enforce any of this advice.
37.c
For example, ``Whenever possible, the implementation should choose a value no greater than fifty microseconds for the smallest representable duration, Duration'Small.''
37.d
We use this heading, for example, when the rule is so low level or implementation-oriented as to be untestable. We also use this heading when we wish to encourage implementations to behave in a certain way in most cases, but we do not wish to burden implementations by requiring the behavior.
NOTES
38
1 Notes emphasize consequences of the rules described in the (sub)clause or elsewhere. This material is informative.

#### Examples

39
Examples illustrate the possible forms of the constructs described. This material is informative.
39.a
Discussion:
The next three headings list all language changes between Ada 83 and Ada 95. Language changes are any change that changes the set of text strings that are legal Ada programs, or changes the meaning of any legal program. Wording changes, such as changes in terminology, are not language changes. Each language change falls into one of the following three categories:

#### Inconsistencies With Ada 83

39.b
This heading lists all of the upward inconsistencies between Ada 83 and Ada 95. Upward inconsistencies are situations in which a legal Ada 83 program is a legal Ada 95 program with different semantics. This type of upward incompatibility is the worst type for users, so we only tolerate it in rare situations.
39.c
(Note that the semantics of a program is not the same thing as the behavior of the program. Because of Ada's indeterminacy, the ``semantics'' of a given feature describes a set of behaviors that can be exhibited by that feature. The set can contain more than one allowed behavior. Thus, when we ask whether the semantics changes, we are asking whether the set of behaviors changes.)
39.d
This is not part of the definition of the language, and does not appear in the RM95.

#### Incompatibilities With Ada 83

39.e
This heading lists all of the upward incompatibilities between Ada 83 and Ada 95, except for the ones listed under ``Inconsistencies With Ada 83'' above. These are the situations in which a legal Ada 83 program is illegal in Ada 95. We do not generally consider a change that turns erroneous execution into an exception, or into an illegality, to be upwardly incompatible.
39.f
This is not part of the definition of the language, and does not appear in the RM95.

#### Extensions to Ada 83

39.g
This heading is used to list all upward compatible language changes; that is, language extensions. These are the situations in which a legal Ada 95 program is not a legal Ada 83 program. The vast majority of language changes fall into this category.
39.h
This is not part of the definition of the language, and does not appear in the RM95.
39.i
As explained above, the next heading does not represent any language change:

#### Wording Changes from Ada 83

39.j
This heading lists some of the non-semantic changes between RM83 and the RM95. It is incomplete; we have not attempted to list all wording changes, but only the ``interesting'' ones.
39.k
This is not part of the definition of the language, and does not appear in the RM95.

Contents Index Previous Next Legal