User:Rob/Self containment notes

From Organic Design wiki

{{#security:edit|Rob}} An attempt to reconsile theoretical and practical ideas in software engineering

Terms of reference

Execution, by which I mean execution of native machine code.

It is important to make the distinction between binary executables (hereafter referred to as binaries), and program sources, that require a compiler to transform them into machine code for them to be able to execute.


For a given machine architecture there exists a set of tools that can generate all possible tools. Executable programs that run on this machine, are the product of a compiler. In practice this is not one tool, but a group of tools working together in a specific way.

If an environment exists, where these tools may execute, they may then, when provided with source files, produce binary executables for this architecture.

In this case we may say that this system achieves self-containment, in the sense that it may acquire the ability to perform any task if it is able to obtain the source of a program to perform that task.

As the compiler is able to produce executable machine code instructions, it requires only the source code to be able generate an executable to perform any task.

This next bit sounds like it could be explained better in a discourse, after Archilles and the Tortise or something like that

I do not have a hammer. I need a hammer to crack a nut. I have a tool that can produce any tool. I have the ability to obtain a program describing how to produce a hammer. I obtain the program, run the program through by tool, and a hammer is produced. I then use the hammer to crack the nut.

Furthermore, I am an expert in tools. I obtain the program that describes how to make my hammer-producing-tool. I am able to devise a way to improve the tool so that it will produce tools (hammers and other tools) more efficiently. I modify the program to be more efficient. I run this program through my original tool and the result is a more efficient tool.

So I now have three tools. A hammer, and two slightly different 'super tools', both of which can produce hammers (and other tools), but one is slightly more efficient. From now on when I need to add functionality, I use my newer, more efficient tool. So now I can produce a spade and a fork in a more efficient way than before.

None of this is new.

What has this got to do with a Turing machine?

(not too sure about this) Minimal turing machine possible actions. Read symbol, write symbol, move left, move right, load symbol as m configuration.

By reading a symbol and loading this symbol as the machine's m configuration, the machine may perform the actions of any machine for which an m-symbol is provided on the tape. The m configuration can represent any software action. If the m configuration represents a compiler and the machine has the ability to write onto the tape a symbol that represents a compiler, the machine can be said to be self contained, provided that the tape provides the symbols required - the source code.

This is analogous to the idea that a compiler, provided with a source file (a series of symbols), can produce a compiler, or any other tool.


For GNU these tools consist of

  • coreutils - standard unix tools to link processes together
  • make - manage depends
  • binutils - the assembler and dynamic linker
  • gcc - the compiler
  • glibc - the c library
  • kernel - the linux kernel
  • storage/network - to obtain source files