Translator (computing)
A translator is a computer program that performs the translation of a program written in a given programming language into a functionally equivalent program in a different computer language, without losing the functional or logical structure of the original code (the "essence" of each program).[1] These include translations between high-level and human-readable computer languages such as C++, Java and COBOL, intermediate-level languages such as Java bytecode, low-level languages such as the assembly language and machine code, and between similar levels of language on different computing platforms, as well as from any of these to any other of these. Arguably they also include translators between software implementations and hardware/ASIC microchip implementations of the same program, and from software descriptions of a microchip to the logic gates needed to build it.
Examples of widely used types of computer languages translators include interpreters, compilers and decompilers, and assemblers and disassemblers.[2]
Types
- If the translator translates a high-level language into another high-level language, it's called a translator or source-to-source compiler. Examples include Haxe, FORTRAN-to-Ada translators, CHILL-to-C++ translators, PASCAL-to-C translators, COBOL(DialectA)-to-COBOL(DialectB) translators.
- If the translator translates a high-level language into a lower-level language, it is called a compiler. Notice that every language can be either translated into a (Turing-complete) high-level or assembly language.
- If the translator translates a high-level language into an intermediate code which will be immediately executed, it is called an interpreter.
- If the translator translates target/machine code to source language, it is called a decompiler. Example: DCC, Boomerang Decompilers and Reverse Engineering Compiler (REC).
- If the translator translates assembly language to machine code, it is called an assembler. Examples include MASM, TASM and NASM.
- If the translator translates machine code into assembly language, it is called a disassembler. Examples include gdb, IDA Pro and OllyDbg.
- Translators that translate from a human-readable design specified in terms of rules and high-level functions into the equivalent logic gates and chip layout needed to achieve its manufacture belong to electronic design automation and hardware description language categories. line by line
References
- ↑ "COMS W4115: Programming Languages and Translators". cs.columbia.edu. December 24, 2013. Retrieved January 7, 2015.
- ↑ "Introduction to Programming using Python, Chapter 5. Program execution, Section 5.2. Interpreter and Compiler". pasteur.fr. February 4, 2008. Retrieved January 7, 2015.