Self-hosting

Self-hosting

The term: Self-hosting was coined to refer to the use of a computer program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code. Self-hosting software is commonplace on personal computers and larger systems. Other programs that are typically self-hosting include kernels, assemblers, and shells.

The same concept also applies to energy systems. For example, the first steam engines were manufactured using hydro mechanical power (water mills), but once steam engines were used to generate the mechanical power used to manufacture other steam engines, steam power became self hosting.

If a system is so new that no software has been written for it, then software is developed on another self-hosting system and placed on a storage device that the new system can read. Development continues this way until the new system can reliably host its own development. Development of the Linux operating system, for example, was initially hosted on a Minix system. Writing new software development tools "from the metal" (that is, without using another host system) is rare and in many cases impossible.

Several programming languages are self-hosting, in the sense that a compiler for the language, written in the same language, is available. The first compiler for a new programming language can be written in another language (in rare cases, machine language) or produced using bootstrapping. Self-hosting languages include Perl, Lisp, Forth, Pascal, Delphi, C, Modula-2, Oberon, Smalltalk, OCaml, FASM, and FreeBASIC.

History

The first self-hosting compiler (excluding assemblers) was written for Lisp by Hart and Levin at MIT in 1962. Because Lisp interpreters existed previously, but no Lisp compilers, they used an original method to compile their compiler. The compiler, like any other Lisp program, could be run in a Lisp interpreter. So they simply ran the compiler in the interpreter, giving it "its own source code" to compile.

:"The compiler as it exists on the standard compiler tape is a machine language program that was obtained by having the S-expression definition of the compiler work on itself through the interpreter." (AI Memo 39)cite web | title=AI Memo 39-The new compiler| author=Tim Hart and Mike Levin | url=ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-039.pdf | accessdate=2008-05-23] This technique is only possible when an interpreter already exists for the very same language that is to be compiled. It borrows directly from the notion of running a program on itself as input, which is also used in various proofs in theoretical computer science, such as the proof that the halting problem is undecidable.

References

ee also

* Bootstrapping (compilers)
* Cross-compiler
* Dogfooding
* Futamura projection
* Self-interpreter
* Self reference


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Hosting — can mean: * Self hosting software distribution which provides all necessary source code to enable itself to be re compiled from scratch * Internet hosting service, including: **Web hosting service **Shared web hosting service **Dedicated hosting… …   Wikipedia

  • Self-interpreter — A self interpreter, or metainterpreter, is a programming language interpreter written in the language it interprets. An example would be a BASIC interpreter written in BASIC. Conceptually, self interpreters are closely related to self hosting… …   Wikipedia

  • Self-portrait — A Self portrait is a representation of an artist, drawn, painted, photographed, or sculpted by the artist. Although self portraits have been made by artists since the earliest times, it is not until the Early Renaissance in the mid 1400s that… …   Wikipedia

  • Self Service Science Forum — Dr Karl s Self Service Science Forum (sometimes abbreviated SSSF) is Australia s most popular public science discussion site.Fact|date=July 2008 Although Dr Karl himself doesn t visit the forum very often, it has a solid community of fifty to a… …   Wikipedia

  • Comparison of file hosting services — A comparison of file hosting services. Web Host Language Storage size Max. file size Direct access[1] Traffic/bandwidth limit File expiration[2] Misc. notes Remote uploading? Developer API? Date of last row update (added or revised) 1fichier BU,… …   Wikipedia

  • Dedicated hosting service — Dedicated server redirects here. For information about dedicated servers in multiplayer video gaming, see Game server#Types of game servers. Types of Internet hosting service …   Wikipedia

  • Web hosting service — An example of rack mounted servers …   Wikipedia

  • DNS hosting service — Types of Internet hosting service …   Wikipedia

  • List of self-sufficient webcomics — The following self sufficient webcomics are known to produce the primary income of their artists and/or writers. This income typically is derived from on site advertising, web comic merchandising, collections of strips in book form, art… …   Wikipedia

  • Bootstrapping (compilers) — This article is about bootstrapping compilers. For the general concept, see Bootstrapping. In computer science, bootstrapping is the process of writing a compiler (or assembler) in the target programming language which it is intended to compile.… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”