Ada Conformity Assessment Authority      Home Conformity Assessment   Test Suite ARGAda Standard
 
Annotated Ada Reference Manual (Ada 2022)Legal Information
Contents   Index   References   Search   Previous   Next 

10   Program Structure and Compilation Issues

1/3
{AI05-0299-1} [The overall structure of programs and the facilities for separate compilation are described in this clause. A program is a set of partitions, each of which may execute in a separate address space, possibly on a separate computer. 
1.a/5
Term entry: program — set of partitions, each of which can execute in a separate address space, possibly on a separate computer
1.b/5
Term entry: partition — part of a program, which consists of a set of interdependent library units
Note: Each partition can run in a separate address space, possibly on a separate computer. A program can contain just one partition, or it can be distributed across multiple partitions, which can execute concurrently.
2
As explained below, a partition is constructed from library units. Syntactically, the declaration of a library unit is a library_item, as is the body of a library unit. An implementation may support a concept of a program library (or simply, a “library”), which contains library_items and their subunits. Library units may be organized into a hierarchy of children, grandchildren, and so on.]
3/3
{AI05-0299-1} This clause has two subclauses: 10.1, “Separate Compilation” discusses compile-time issues related to separate compilation. 10.2, “Program Execution” discusses issues related to what is traditionally known as “link time” and “run time” — building and executing partitions.

Language Design Principles

3.a
We should avoid specifying details that are outside the domain of the language itself. The standard is intended (at least in part) to promote portability of Ada programs at the source level. It is not intended to standardize extra-language issues such as how one invokes the compiler (or other tools), how one's source is represented and organized, version management, the format of error messages, etc.
3.b
The rules of the language should be enforced even in the presence of separate compilation. Using separate compilation should not make a program less safe.
3.c
It should be possible to determine the legality of a compilation unit by looking only at the compilation unit itself and the compilation units upon which it depends semantically. As an example, it should be possible to analyze the legality of two compilation units in parallel if they do not depend semantically upon each other.
3.d
On the other hand, it may be necessary to look outside that set in order to generate code — this is generally true for generic instantiation and inlining, for example. Also on the other hand, it is generally necessary to look outside that set in order to check Post-Compilation Rules.
3.e
See also the “generic contract model” Language Design Principle of 12.3, “Generic Instantiation”. 

Wording Changes from Ada 83

3.f/3
{AI05-0299-1} The clause organization mentioned above is different from that of RM83.

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