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_inline63 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_inline71 , 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_inline73 , a compiler for language L written in a subset of L.
  3. Compile tex2html_wrap_inline73 using tex2html_wrap_inline71 to obtain tex2html_wrap_inline79 , a compiler for language L, which runs on machine A and produces code for machine A.

displaymath81

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

displaymath83

To produce a compiler for a different machine B:

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



CS 631 Class Account
Thu Sep 14 11:55:16 ADT 2000