Appendix A. The Compilation Model

Table of Contents
A.1. Source Representation
A.2. Foreign Language Representation
A.3. File Naming Rules
A.4. Using Other File Names
A.5. Naming of XGC Ada Source Files
A.6. Generating Object Files
A.7. Source Dependencies
A.8. The Ada Library Information Files
A.9. Representation of Time Stamps
A.10. Binding an Ada Program
A.11. Mixed Language Programming
A.12. Comparison of XGC Ada With C/C++ Compilation Model
A.13. Comparison of XGC Ada With Ada Library Model

This Appendix describes the compilation model used by XGC Ada. Although similar to that used by other languages, such as C and C++, this model is different from the traditional Ada compilation models, which are based on a library. The model is initially described without reference to this traditional model. If you have not previously used an Ada compiler, you need only read the first part of this Appendix. The last section describes and discusses the differences between the XGC Ada model and the traditional Ada compiler models. If you have used other Ada compilers, you may find this section helps you to understand those differences.

A.1. Source Representation

Ada source programs are represented in standard text files, using Latin-1 coding. Latin-1 is the ASCII character set with additional characters used for representing foreign languages (see Section A.2 for support of international character sets). The format effector characters are represented using their standard ASCII encodings, as follows:

VT Vertical tab 16#0B#
HT Horizontal tab 16#09#
CR Carriage return 16#0D#
LF Line feed 16#0A#
FF Form feed 16#0C#

The end of physical lines is marked by any of the following sequences: LF, CR, CR-LF, or LF-CR. Standard UNIX-format files simply use LF to terminate physical lines. The other combinations are recognized to provide convenient processing for files imported from other operating systems.

The end of a source file is normally represented by the physical end of file. However the control character 16#1A# (Ctrl-Z) is also represented as signaling the end of the source file. Again, this is provided for compatibility with other operating systems where this code is used to represent the end of file.

Each file contains a single Ada compilation unit, including any pragmas associated with the unit. For example, this means you must place a package declaration (a package spec) and the corresponding body in separate files. An Ada compilation (which is a sequence of compilation units) is represented using a sequence of files. Similarly, you will place each subunit or child unit in a separate file.