12.1
A Compiler as a Software Project

12.2
Features, Techniques and Tradeoffs

12.3
Run-Time Storage Management

12.4
Incremental Compiling

12.5
Compiler Example: Borland Turbo Compilers

12.6
Compiler Example: Ada Compilers

12.7
Summary

Web References

Exercises

E-Mail

12.6 Compiler Example: Ada Compilers

There are many Ada compilers. Rather than describing one, some problems and features, in general, will be mentioned. Many Ada compilers are designed for special architectures, so much of the material in Module 12 applies to Ada compilers. The reference at the end of the chapter include more detailed reports on Ada compiler technology (see, in particular, Ganapathi and Mendal, 1989).

Ada is a complex language with difficult to implement constructs. It was designed by a committee over a period of years. An Ada compiler is not deemed official unless it passes a validation suite which was designed at the same time as the language was designed.

Ada is designed for separate compilation, that is, it is designed so that modules, called packages, may be compiled separately and then linked. Incremental compilation is supported by most Ada compilers in the recompilation of packages. Many compilers support incremental recompilation at the semantic analysis phase when a change is "local".

On multiprocessor systems, compiler phases, which are not dependent upon one another, may be compiled in parallel.

Most Ada systems consist of an environment of a syntax-directed and semantics- directed editors, a debugger, and other tools. The compiler is but one of the tools

Ada is designed with its own high-level intermediate representation, Diana (Descriptive Intermediate Attributed Notation for Ada), and a lower level IR, called CGIR .

Type checking in Ada is an important part of the semantic analysis phase. Ada allows overloading of many constructs including functions and procedures (see Module 2). Ada also requires strong typing, that is, the type of a name must be resolved at compile time.

Optimization is especially important in Ada compilers since one of Ada's stated applications is in embedded systems, systems which often must run in real-time. Many optimizations are machine dependent; RISC machines in particular (see Module 13) present opportunities for optimizations.