Creating a specific program at the final stage, any programmer has to turn to the services of a compiler. In the technical documentation of this program, a rather modest definition is given as a compilation utility. Compilation is the process of turning a program written in a language that is understandable to a person (high-level language) into commands that are understandable for a machine (low-level language). As a result, we get a program that is close to machine code. It may look like an object module, an absolute code. Sometimes such a program is similar to assembly language.
Thus, compilation is when the input information (source code) representing the description of the algorithm or a program written in a problem-oriented language is rewritten into an equivalent list of commands presented in the object code (machine-oriented language).
To simplify the definition, to compile is to translate a machine program from a problem-oriented into a machine-oriented language.
Despite the transparency and ease of definition, compilation is a rather multifaceted process. There are several types of it. Batch compilation is performed on several source modules in one point of the job. Line-by-line compilation is the same as interpretation (step-by-step independent compilation of each subsequent statement). There is still conditional compilation. In this case, the translated text depends on the conditions that are specified in the source program by compiler directives.
By changing the value of a certain constant, you can adjust the inclusion or deactivation of the translation of part of the program text.
For the convenience of programmers, the most convenient and adapted compilers are used to solve various problems. If they are classified, then several types of such utilities can be distinguished.
The vectorizing compiler translates the source code into machine computer code, adapting to vector processors.
The flexible compiler was developed based on a modular principle. Its management is carried out by tables. It is programmed in a high-level language. It can also be implemented using the compiler compiler.
The incremental compiler re-broadcasts program fragments and additions to it, while recompiling the entire program is excluded.
The interpreter or step-by-step compiler uses the principle of sequentially performing independent compilation for each individual statement or command from the source program.
A compiler compiler is a compiler that accepts a formal description for a programming language. It is able to independently generate a compiler for a particular language.
The debug compiler can fix some kinds of syntax errors on its own.
The resident compiler is allocated a permanent place in RAM, and it is available when reused by a wide range of tasks.
There are self-compiling compilers. They are written in the same language from which the broadcast occurs.
The universal compiler is based on a formal description of the semantics and syntax of the input language. It consists of a kernel, syntactic and semantic loaders.
The most common tasks where compilers find use are kernel compilation for the Linux platform. This operation allows you to solve a wide range of problems associated with the coordination of equipment and setting the most acceptable version of the platform.
Java compilation is implemented using compilers running on a wide variety of platforms. This allows you to recompile the source code to the needs of operating systems from different manufacturers.