Annex A
(normative)
Predefined Language Environment
1
[
This Annex contains the specifications of library
units that shall be provided by every implementation. There are three
root library units: Ada, Interfaces, and System; other library units
are children of these:]
2/3
Standard (...continued)
Ada (...continued)
Strings (...continued)
Wide_Bounded — A.4.7
Wide_Equal_Case_Insensitive
— A.4.7
Wide_Hash — A.4.7
Wide_Hash_Case_Insensitive — A.4.7
Wide_Equal_Case_Insensitive — A.4.7
Wide_Fixed — A.4.7
Wide_Equal_Case_Insensitive
— A.4.7
Wide_Hash — A.4.7
Wide_Hash_Case_Insensitive — A.4.7
Wide_Hash — A.4.7
Wide_Hash_Case_Insensitive — A.4.7
Wide_Maps — A.4.7
Wide_Constants — A.4.7
Wide_Unbounded — A.4.7
Wide_Equal_Case_Insensitive
— A.4.7
Wide_Hash — A.4.7
Wide_Hash_Case_Insensitive — A.4.7
Wide_Wide_Bounded — A.4.8
Wide_Wide_Equal_Case_Insensitive
— A.4.8
Wide_Wide_Hash — A.4.8
Wide_Wide_Hash_Case_Insensitive
— A.4.8
Wide_Wide_Equal_Case_Insensitive
— A.4.8
Wide_Wide_Fixed — A.4.8
Wide_Wide_Equal_Case_Insensitive
— A.4.8
Wide_Wide_Hash — A.4.8
Wide_Wide_Hash_Case_Insensitive
— A.4.8
Wide_Wide_Hash — A.4.8
Wide_Wide_Hash_Case_Insensitive
— A.4.8
Wide_Wide_Maps — A.4.8
Wide_Wide_Constants — A.4.8
Wide_Wide_Unbounded — A.4.8
Wide_Wide_Equal_Case_Insensitive
— A.4.8
Wide_Wide_Hash — A.4.8
Wide_Wide_Hash_Case_Insensitive
— A.4.8
Synchronous_Barriers — D.10.1
Synchronous_Task_Control — D.10
EDF — D.10
2.a
Discussion: In running text, we generally
leave out the “Ada.” when referring to a child of Ada.
2.b
Reason: We had no strict rule for which
of Ada, Interfaces, or System should be the parent of a given library
unit. However, we have tried to place as many things as possible under
Ada, except that interfacing is a separate category, and we have tried
to place library units whose use is highly nonportable under System.
Implementation Requirements
3/2
{
AI95-00434-01}
The implementation shall ensure that each language-defined subprogram
is reentrant
in the sense that concurrent calls on
the same subprogram perform as specified, so long as all parameters that
could be passed by reference denote nonoverlapping objects.
3.a
Ramification: For example, simultaneous
calls to Text_IO.Put will work properly, so long as they are going to
two different files. On the other hand, simultaneous output to the same
file constitutes erroneous use of shared variables.
3.b
To be honest: Here, “language defined
subprogram” means a language defined library subprogram, a subprogram
declared in the visible part of a language defined library package, an
instance of a language defined generic library subprogram, or a subprogram
declared in the visible part of an instance of a language defined generic
library package.
3.c
Ramification: The rule implies that any
data local to the private part or body of the package has to be somehow
protected against simultaneous access.
3.1/3
{
AI05-0048-1}
If a descendant of a language-defined tagged type is declared, the implementation
shall ensure that each inherited language-defined subprogram behaves
as described in this International Standard. In particular, overriding
a language-defined subprogram shall not alter the effect of any inherited
language-defined subprogram.
3.d/3
Reason: This means that internally the
implementation must not do redispatching unless it is required by the
Standard. So when we say that some subprogram Bar is equivalent to Foo,
overriding Foo for a derived type doesn't change the semantics of Bar,
and in particular it means that Bar may no longer be equivalent to Foo.
The word “equivalent” is always a bit of a lie anyway.
Implementation Permissions
4
The implementation may restrict the replacement of
language-defined compilation units. The implementation may restrict children
of language-defined library units (other than Standard).
4.a
Ramification: For example, the implementation
may say, “you cannot compile a library unit called System”
or “you cannot compile a child of package System” or “if
you compile a library unit called System, it has to be a package, and
it has to contain at least the following declarations: ...”.
Wording Changes from Ada 83
4.b
Many of Ada 83's language-defined library units
are now children of Ada or System. For upward compatibility, these are
renamed as root library units (see
J.1).
4.c
The order and lettering of the annexes has been
changed.
Wording Changes from Ada 95
4.d/2
4.e/2
Wording Changes from Ada 2005
4.f/3
{
AI05-0048-1}
Correction: Added wording to ban redispatching unless it is explicitly
required, in order to safeguard portability when overriding language-defined
routines.
4.g/3
{
AI05-0060-1}
{
AI05-0206-1}
Correction: Added a permission to omit pragma Remote_Types from
language-defined units if Annex E is not supported. This was later removed,
as a better method of supporting the reason is now available. Note that
this requires all implementations to provide minimal support for the
Remote_Types categorization even if Annex E is not supported; being unable
to compile language-defined units is not allowed.
4.h/3
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe