Bootstrapping (programming)

from Wikipedia, the free encyclopedia

In programming, bootstrapping (also known as original input ) describes the process of programming more powerful tools with simple development tools .

The simplest environment is something like a very basic text editor and assembler . These tools can be a more complex text editor and a simple compiler for a higher programming language to write, and so on, until a graphical integrated development environment and programming language has a very high.

Compilers for a programming language X are often written in the same programming language X (examples: almost all C compilers, Free Pascal , PyPy , Glasgow Haskell compilers ). This creates a chicken and egg problem : How is the new compiler compiled for the first time? Possible ways are:

  • Another compiler for X was written in another Y programming language.
  • Earlier versions of the compiler were written in a subset of X for which another compiler existed.
  • The compiler for X is cross compiled from another architecture on which a compiler for X exists.
  • The compiler was compiled by hand and possibly applied to its own source code afterwards. This means that a programmer translates the compiler into a hardware-related language, e.g. B. with the help of the instruction set architecture in assembly language .
  • The compiler compiled itself using an interpreter written in another Y language.

notation

Bartman diagram

The so-called Bartman diagram is used to graphically represent the process of bootstrapping . In the diagram opposite, a compiler for Ada is written in C , which generates code in machine language .

etymology

In English the expression "to pull oneself up by one's bootstraps" or "to pull oneself over a fence by one's bootstraps" has existed since the early 19th century at the latest as a designation for solving an inherently unsolvable problem, particularly one that has a chicken and egg problem like the compiler compilation mentioned above.

The story is often mentioned in this context, in which Baron Münchhausen (possibly) pulls himself out of the swamp, but he uses his pigtail instead of a boot loop.

The concept of booting also goes back to "bootstrapping".

literature

Individual evidence

  1. Bootstrapping . Dict CC. Retrieved March 17, 2011.
  2. a b c Basics of Compiler Design. Retrieved October 22, 2018 .