next up previous
Next: Compiler Phases Up: Compiler Overview Previous: Compiler Compilers

Bootstrapping

A compiler is characterized by three languages:

  1. Source Language
  2. Target Language
  3. Implementation Language

Notation: tex2html_wrap_inline108 represents a compiler for Source S, Target T, implemented in I. The T-diagram shown above is also used to depict the same compiler.

To create a new language, L, for machine A:

  1. Create tex2html_wrap_inline116 , a compiler for a subset, S, of the desired language, L, using language A, which runs on machine A. (Language A may be assembly language.)

  2. Create tex2html_wrap_inline118 , a compiler for language L written in a subset of L.
  3. Compile tex2html_wrap_inline118 using tex2html_wrap_inline116 to obtain tex2html_wrap_inline124 , a compiler for language L, which runs on machine A and produces code for machine A.

displaymath126

The process illustrated by the T-diagrams is called bootstrapping and can be summarized by the equation:

displaymath128

To produce a compiler for a different machine B:

  1. Convert tex2html_wrap_inline130 into tex2html_wrap_inline132 (by hand, if necessary). Recall that language S is a subset of language L.
  2. Compile tex2html_wrap_inline132 to produce tex2html_wrap_inline136 , a cross-compiler for L which runs on machine A and produces code for machine B.
  3. Compile tex2html_wrap_inline132 with the cross-compiler to produce tex2html_wrap_inline140 , a compiler for language L which runs on machine B.



Mitch Roth
Tue Sep 10 14:28:46 ADT 1996