Send
Close Add comments:
(status displays here)
Got it! This site "robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website. Note: This appears on each machine/browser from which this site is accessed.
Compilers and fixed points
1. Compilers and fixed points
,
2. Computers
A computer is a machine that takes input and produces output and often does some computation on the input in order to produce the output.
3. Running a program
To do this, the computer needs to be running a program. Thus, the idea of a computer can be associated with the program that the computer is running.
4. Compilers
A compiler is a program that converts/translates/compiles a source program into a target program - often machine code.
The "Source text" is what is called a computer program (as text).
The "Target code" is what is called a computer program (as code).
5. Code and data
John von Neumann had the brilliant insight that data could be code and code could be data. Today, that computing paradigm, used by all conventional computers, is called a Von Neumann architecture based on a 1945 description by Von Neumann.
6. Compilers
A "compiler" is a program that converts (mostly) legible "Source text" that a human can read into (mostly) illegible "Target code" that a computer machine can read and execute.
From where does one get a "
compiler"? It is just a program written as text.
7. Compilers
8. Compile the compiler
In this pattern, the compiler as binary code compiles the compiler as text code to get an exact copy of itself - the compiler target as binary code.
This as a fixed point in compiler writing space. That is, a program that takes input to both create an exact copy if itself but also to be able to compile arbitrary programs written in that language/notation on the same machine on which it is running.
9. End of page