Categorization of Library Units
Author: JTC1/SC22/WG9/ARG, by Randall Brukardt, ARG Editor

Ada Reference Manual — Legal Information

# E.2 Categorization of Library Units

1
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.
2/3
A categorization pragma is a library unit pragma (see 10.1.5) that specifies a corresponding categorization aspect. A categorization aspect restricts the declarations, child units, or semantic dependences of the library unit to which it applies. A categorized library unit is a library unit that has a categorization aspect that is True.
3/3
The pragmas Shared_Passive, Remote_Types, and Remote_Call_Interface are categorization pragmas, and the associated aspects are categorization aspects. In addition, for the purposes of this Annex, the aspect Pure (see 10.2.1) is considered a categorization aspect and the pragma Pure is considered a categorization pragma.
4/3
A library package or generic library package is called a shared passive library unit if the Shared_Passive aspect of the unit is True. A library package or generic library package is called a remote types library unit if the Remote_Types aspect of the unit is True. A library unit is called a remote call interface if the Remote_Call_Interface aspect of the unit is True. A normal library unit is one for which no categorization aspect is True.
5/3
The various categories of library units and the associated restrictions are described in this and the following 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 in the hierarchy, except that the body of a remote types or remote call interface library unit is unrestricted, the declaration of a remote types or remote call interface library unit may depend on preelaborated normal library units that are mentioned only in private with clauses, and all categories can depend on limited views.
6/3
The overall hierarchy (including declared pure) is as follows, with a lower-numbered category being “earlier in the hierarchy” in the sense of the previous paragraph:
6.1/3
1.
Declared Pure
6.2/3
2.
Shared Passive
6.3/3
3.
Remote Types
6.4/3
4.
Remote Call Interface
6.5/3
5.
Normal (no restrictions)
Paragraphs 7 through 11 were deleted.
12
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.
Paragraph 13 was deleted.

#### Implementation Permissions

14
Implementations are allowed to define other categorization pragmas.

Ada 2005 and 2012 Editions sponsored in part by Ada-Europe