10 Program Structure and Compilation Issues
[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
Term entry: program
— set of partitions, each of which can execute in a separate address
space, possibly on a separate computer
Term entry: partition
— part of a program, which consists of a set of interdependent
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.
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
and their subunits.
Library units may be organized
into a hierarchy of children, grandchildren, and so on.]
This clause has two subclauses: 10.1
” discusses compile-time issues related to separate
” discusses issues related to what is traditionally
known as “link time” and “run time” — building
and executing partitions.
Language Design Principles
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.
rules of the language should be enforced even in the presence of separate
compilation. Using separate compilation should not make a program less
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.
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.
Wording Changes from Ada 83
The clause organization mentioned above is different from that of RM83.
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe