Self-hosting refers 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. Computer programs (also software programs, or just programs) are instructions for a Computer. In Software, a toolchain is the set of Computer programs ( tools) that are used to create a product (typically another computer program or system of programs An operating system (commonly abbreviated OS and O/S) is the software component of a Computer system that is responsible for the management and coordination A compiler is a Computer program (or set of programs that translates text written in a computer language (the source language) into another In Computer science, source code (commonly just source or code) is any sequence of statements or declarations written in some Human-readable Self-hosting software is commonplace on personal computers and larger systems. A personal computer ( PC) is any Computer whose original sales price size and capabilities make it useful for individuals and which is intended to be operated Other programs that are typically self-hosting include kernels, assemblers, and shells. In Computer science, the kernel is the central component of most computer Operating systems (OS See the terminology section below for information regarding inconsistent use of the terms assembly and assembler In computing a shell is a piece of software that provides an interface for users
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. Computer data storage, often called storage or memory, refers to Computer components devices and recording media that retain digital 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. Linux (commonly pronounced ˈlɪnəks MINIX is a Unix-like computer Operating system based on a Microkernel architecture. 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. A programming language is an Artificial language that can be used to write programs which control the behavior of a machine particularly a Computer. The first compiler for a new programming language can be written in another language (in rare cases, machine language) or produced using bootstrapping. Machine code or machine language is a system of instructions and data executed directly by a Computer 's Central processing unit. Bootstrapping is a term used in Computer science to describe the techniques involved in writing a Compiler (or assembler) in the target Programming Self-hosting languages include Lisp, Forth, Pascal, Delphi, C, Modula-2, Oberon, Smalltalk, OCaml, and FreeBASIC. Lisp (or LISP) is a family of Computer Programming languages with a long history and a distinctive fully parenthesized syntax Forth is a structured, imperative, stack-based, computer Programming language and programming environment Pascal is an influential imperative and procedural Programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small Object Pascal refers to a branch of object oriented derivatives of Pascal, mostly known as the primary Programming language of CodeGear Delphi tags please moot on the talk page first! --> In Computing, C is a general-purpose cross-platform block structured Modula-2 is a computer Programming language invented by Niklaus Wirth at ETH, around 1978 as a successor to his intermediate language Modula Smalltalk is an object-oriented, dynamically typed, reflective programming language. Objective Caml ( OCaml) is the main implementation of the Caml Programming language, created by Xavier Leroy, Jérôme Vouillon FreeBASIC is a free / Open source ( GPL) 32-bit BASIC Compiler for Microsoft Windows, protected-mode DOS
The first self-hosting compiler (excluding assemblers) was written for Lisp by Hart and Levin at MIT in 1962. Lisp (or LISP) is a family of Computer Programming languages with a long history and a distinctive fully parenthesized syntax Year 1962 ( MCMLXII) was a Common year starting on Monday (the link is to a full 1962 calendar of the Gregorian calendar. 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. [1]
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. Theoretical computer science is the collection of topics of Computer science that focuses on the more abstract logical and mathematical aspects of Computing, such In computability theory, the halting problem is a Decision problem which can be stated as follows given a description of a program and a finite input