Annotated Ada Reference ManualLegal Information
Contents   Index   References   Search   Previous   Next 

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
{AI05-0243-1} 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 to which a categorization pragma applies.
3/3
{AI05-0243-1} 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 (see 10.2.1is considered a categorization pragma.
4/3
{8652/0078} {AI95-00048-01} {AI05-0243-1} [ A library package or generic library package is called a shared passive library unit if the a Shared_Passive aspect of the unit is True pragma applies to it. A library package or generic library package is called a remote types library unit if the a Remote_Types aspect of the unit is True pragma applies to it. A library unit package or generic library package is called a remote call interface if the a Remote_Call_Interface aspect of the unit is True pragma applies to it.] A normal library unit is one for to which no categorization aspect is True pragma applies
4.a/3
Proof: {AI05-0243-1} These terms (other than “normal library unit”) are really defined in the following clauses. 
4.a.1/1
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.
5/3
{AI05-0206-1} {AI05-0243-1} [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 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
{AI05-0243-1} The overall hierarchy (including declared pure) is as follows (with a lower-numbered category being earlier 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. 
7/3
{AI05-0243-1} Declared Pure 

Can depend only on other declared pure library units;
8/3
{AI05-0243-1} Shared Passive 

Can depend only on other shared passive or declared pure library units;
9/3
{AI05-0206-1} {AI05-0243-1} Remote Types 

The declaration of the library unit can depend only on other remote types library units, or one of the above library unit categories, or limited views, or preelaborated normal library units that are mentioned only in private with clauses; the body of the library unit is unrestricted;
10/3
 {AI05-0206-1} {AI05-0243-1} 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;
11/3
 {AI05-0243-1} Normal 

Unrestricted. 
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. ]

Implementation Requirements

13/1
 This paragraph was deleted.{8652/0079} {AI95-00208-01} For a given library-level type declared in a preelaborated library unit or in the declaration of a remote types or remote call interface library unit, the implementation shall choose the same representation for the type upon each elaboration of the type's declaration for different partitions of the same program. 

Implementation Permissions

14
Implementations are allowed to define other categorization pragmas.

Wording Changes from Ada 95

14.a/2
{8652/0078} {AI95-00048-01} Corrigendum: Clarified that a library subprogram can be a remote call interface unit.
14.b/2
{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. 

Wording Changes from Ada 2005

14.c/3
{AI05-0206-1} We now allow private withs of preelaborated units in Remote Types and Remote Call Interface units; this is documented as an extension in the sections where this is defined normatively.
14.d/3
{AI05-0243-1} We have introduced categorization aspects; these are documented as extensions in the clauses where they actually are defined.

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe