E.2 Categorization of Library Units
[Library units can be categorized according to the
role they play in a distributed program. Certain restrictions are associated
with each category to ensure that the semantics of a distributed program
remain close to the semantics for a nondistributed program.]
{categorization pragma
[distributed]} {pragma,
categorization [distributed]} {library
unit pragma (categorization pragmas) [partial]} {pragma,
library unit (categorization pragmas) [partial]} {categorized
library unit} A
categorization pragma
is a library unit pragma (see
10.1.5) that
restricts the declarations, child units, or semantic dependences of the
library unit to which it applies. A
categorized library unit is
a library unit to which a categorization pragma applies.
The pragmas Shared_Passive, Remote_Types, and Remote_Call_Interface
are categorization pragmas. In addition, for the purposes of this Annex,
the pragma Pure (see
10.2.1) is considered
a categorization pragma.
{
8652/0078}
{
AI95-00048-01}
{shared passive library unit}
A library package or generic library package is called
a
shared passive library unit if a Shared_Passive pragma applies
to it.
{remote types library unit}
A library package or generic library package is called
a
remote types library unit if a Remote_Types pragma applies to
it.
{remote call interface}
A library unit is called a
remote call interface
if a Remote_Call_Interface pragma applies to it.
{normal
library unit} A
normal library unit
is one to which no categorization pragma applies.
Ramification: {
8652/0078}
{
AI95-00048-01}
A library subprogram can be a remote call interface, but it cannot be
a remote types or shared passive library unit.
[The various categories of library units and the
associated restrictions are described in this clause and its subclauses.
The categories are related hierarchically in that the library units of
one category can depend semantically only on library units of that category
or an earlier one, except that the body of a remote types or remote call
interface library unit is unrestricted.
The overall hierarchy
(including declared pure) is as follows:
Declared Pure
Can depend only on other declared pure library units;
Shared Passive
Can depend only on other shared passive or declared pure library units;
Remote Types
The declaration of the library unit can depend only on other remote types
library units, or one of the above; the body of the library unit is unrestricted;
Remote Call Interface
The declaration of the library unit can depend only on other remote call
interfaces, or one of the above; the body of the library unit is unrestricted;
Normal
Unrestricted.
Declared pure and shared passive library units are
preelaborated. The declaration of a remote types or remote call interface
library unit is required to be preelaborable. ]
Implementation Requirements
Implementation Permissions
Implementations are allowed to define other categorization
pragmas.
Wording Changes from Ada 95
{
8652/0078}
{
AI95-00048-01}
Corrigendum: Clarified that a library subprogram can be a remote
call interface unit.
{
8652/0079}
{
AI95-00208-01}
Corrigendum: Removed the requirement that types be represented
the same in all partitions, because it prevents the definition of heterogeneous
distributed systems and goes much further than required.