12.4 Incremental Compiling

Many of the first language processors operated incrementally. A programmer typed a line and it was processed right through to execution. BASIC interpreters were (and are) designed for this model. More complex language constructs and needs for efficient translation lead to compilers and the decrease of these early incremental techniques.

Modern programming language environments, with syntax-directed editors and complex optimizations, have discovered a new need for incremental translation techniques. In general, it is wasteful to recompile an entire program when a small change has been made.

The high-level techniques described in Sections 9.7 and 10.5 are amenable to incremental processing. Many Ada compilers also take advantage of recently developed techniques for incremental compilation. We will divide the incremental discussion here into front-end and back-end issues.

When programs consist of a number of separately compiled units, a unit may need to be recompiled, or partially recompiled, when a change is made to that unit or a change is made to to any unit in which the unit's identifiers are declared. A clever compiler can discover when a compilation is redundant.

Send questions and comments to: Karen Lemone