Translator (computing): Difference between revisions

Content deleted Content added
m top: grammar
revert to remove copyright violations. copied from: "Translators: Purpose, Types, Examples & Advantages". Teach Computer Science. 2018-01-11. Archived from the original on 2022-01-09. Retrieved 2022-01-09.
Line 1:
{{About|language translation of programming languages|translation of natural languages|Natural language processing|and|Machine translation}}
{{Short description|Computer program that translates code from one programming language to another}}
{{Use dmy dates|date=February 2020|cs1-dates=y}}
{{Use list-defined references|date=January 2022}}
{{Program execution}}
A '''translator''' or '''programming language processor''' is a generic term that can refer to anythinga that[[compiler]], [[Dataassembler conversion(computing)|convertsassembler]], or [[interpreter (computing)|interpreter]]&mdash;anything that converts code from one computer language into another.<ref name="Thornton_2017MCT"/><ref name="Intel_1983_SH"/> A program written in a high-level language is called a source program. These include translations between [[high-level language|high-level]] and [[Source code|human-readable computer languages]] such as [[C++]] and [[Java (programming language)|Java]], intermediate-level languages such as [[Java bytecode]], [[low-level language]]s such as the [[assembly language]] and [[machine code]], and between similar levels of language on different [[computing platform]]s, as well as from any of the abovethese to anotherany other of these.<ref name="Thornton_2017MCT"/> The term is also used for translators between software implementations and hardware/[[ASIC]] [[microchip]] implementations of the same program, and from software descriptions of a microchip to the [[logic gate]]s needed to build it.{{Citation needed|date=July 2019}}
 
Examples of widely used types of computer language translators include interpreter]s, compilers and [[decompiler]]s, assemblers and [[disassembler]]s.<ref name="Pasteur_2008"/>
The term is also used for translators between software implementations and hardware implementations ([[ASIC]]s [[microchip]]s) of the same program, and from software descriptions of a microchip to the [[logic gate]]s needed to build it.{{Citation needed|date=July 2019}}
 
== See also ==
== Different types of translators ==
 
The 3 different types of translators are normally as follows:
 
=== Compiler ===
{{main|Compiler}}
A [[compiler]] is a translator used to convert [[high-level programming language]] to [[low-level programming language]]. It converts the whole [[Computer program|program]] in one session and reports [[Software bug|errors]] detected after the conversion. The compiler takes time to do its work as it translates high-level code to lower-level code all at once and then saves it to memory.
A compiler is [[Central processing unit|processor]]-dependent and [[Cross-platform software|platform-dependent]].
It has been addressed by alternate names as the following: special compiler, cross-compiler and, source-to-source compiler.<ref name="TCS_2018"/><ref name="Thornton_2017"/><ref name="Pasteur_2008"/>
 
=== Interpreter ===
{{main|Interpreter (computing)}}
The [[Interpreter (computing)|interpreter]] is similar to a compiler, as it is a translator used to convert [[high-level programming language]] to [[low-level programming language]]. The difference is that it converts the program one line of code at a time and reports errors when detected, while also doing the conversion.
An interpreter is faster than a compiler as it immediately executes the code upon reading the code.
It is often used as a [[debugging tool]] for [[software development]] as it can execute a single line of [[computer code|code]] at a time. An interpreter is also more portable than a compiler as it is [[Central processing unit|processor]]-independent, you can work between different [[Computer hardware|hardware]] [[Computer architecture|architectures]].<ref name="TCS_2018"/><ref name="Thornton_2017"/><ref name="Pasteur_2008"/>
 
=== Assembler ===
{{main|Assembly language#Assembler}}
An [[Assembler (computing)|assembler]] is a translator used to translate [[assembly language]] into [[machine language]]. It has the same function as a compiler for the assembly language but works like an interpreter. Assembly language is difficult to understand as it is a low-level programming language. An assembler translates a [[low-level language]], such as an assembly language to an even lower-level language, such as the [[machine code]].<ref name="TCS_2018"/><ref name="Thornton_2017"/>
 
== See also ==
* [[Binary translator]]<!-- ([[Static binary translator]], [[Dynamic binary translator]]) --> (binary-to-binary, typically code)
* [[Assembly language translator]] (low-level source-to-source, code)
Line 36 ⟶ 15:
* [[Transcoder]] (binary-to-binary, data)
 
== References ==
{{Reflist|refs=
<ref name="Intel_1983_SH">{{cite book |title=Software Handbook |chapter=Translators And Utilities For Program Development |page=3-1 |date=1984 |orig-dateyear=1983 |publisher=[[Intel Corporation]] |id=230786-001 |url=http://bitsavers.trailing-edge.com/components/intel/_dataBooks/230786-001_Intel_Software_Handbook_1984.pdf |access-date=2020-01-29 |url-status=live |archive-url=https://web.archive.org/web/20200129010534/http://bitsavers.trailing-edge.com/components/intel/_dataBooks/230786-001_Intel_Software_Handbook_1984.pdf |archive-date=2020-01-29}}</ref>
<ref name="TCS_2018MCT">{{cite web |title=Translators:What Purposeare compilers, Typestranslators, Examplesinterpreters, &and Advantagesassemblers? |date=20182017-0102-1117 |publisherauthor-first=TeachScott Computer|author-last=Thornton Science|work=MicrocontrollerTips |url=httpshttp://teachcomputersciencewww.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/ |access-date=20222020-0102-0902 |url-status=live |archive-url=https://web.archive.org/web/2022010922333320190719223609/https://teachcomputersciencewww.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/ |archive-date=20222019-0107-0919}}</ref>
<ref name="Pasteur_2008">{{cite book |author-first1=Katja |author-last1=Schuerer |author-first2=Catherine |author-last2=Letondal |author-first3=Eric |author-last3=Deveaud |date=2008-02-04 |orig-dateyear=2003-01-06 |publisher=[[Pasteur Institute]] |title=Introduction to Programming using Python - Programming Course for Biologists at the Pasteur Institute |chapter=Chapter 5. Program execution, Section 5.2. Interpreter and Compiler |website=pasteur.fr |pages=37–4037-40 |chapter-url=http://www.pasteur.fr/formation/infobio/python/ch05s02.html <!-- |url=http://www.pasteur.fr/formation/infobio/python/index.html -->|access-date=2015-01-07 |url-status=dead |archive-url=https://web.archive.org/web/20151111024459/http://www.pasteur.fr/formation/infobio/python/ch05s02.html |archive-date=2015-11-11}} [https://web.archive.org/web/20151124102155/http://www.pasteur.fr/formation/infobio/python/support.pdf]</ref>
<ref name="Thornton_2017">{{cite web |title=What are compilers, translators, interpreters, and assemblers? |date=2017-02-17 |author-first=Scott |author-last=Thornton |work=MicrocontrollerTips |url=http://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/ |access-date=2020-02-02 |url-status=live |archive-url=https://web.archive.org/web/20190719223609/https://www.microcontrollertips.com/compilers-translators-interpreters-assemblers-faq/ |archive-date=2019-07-19}}</ref>
<ref name="Pasteur_2008">{{cite book |author-first1=Katja |author-last1=Schuerer |author-first2=Catherine |author-last2=Letondal |author-first3=Eric |author-last3=Deveaud |date=2008-02-04 |orig-date=2003-01-06 |publisher=[[Pasteur Institute]] |title=Introduction to Programming using Python - Programming Course for Biologists at the Pasteur Institute |chapter=Chapter 5. Program execution, Section 5.2. Interpreter and Compiler |website=pasteur.fr |pages=37–40 |chapter-url=http://www.pasteur.fr/formation/infobio/python/ch05s02.html <!-- |url=http://www.pasteur.fr/formation/infobio/python/index.html -->|access-date=2015-01-07 |url-status=dead |archive-url=https://web.archive.org/web/20151111024459/http://www.pasteur.fr/formation/infobio/python/ch05s02.html |archive-date=2015-11-11}} [https://web.archive.org/web/20151124102155/http://www.pasteur.fr/formation/infobio/python/support.pdf]</ref>
}}
 
== Further reading ==
* {{cite book |title=Assemblers, Compilers, and Program Translation |author-first=Peter |author-last=Calingaert |editor-first=Ellis |editor-last=Horowitz |editor-link=Ellis Horowitz |date=1979 |orig-dateyear=1978-11-05 |series=Computer software engineering series |publisher=[[Computer Science Press, Inc.]] |publication-place=Potomac, Maryland, USA |___location=[[University of North Carolina at Chapel Hill]] |edition=1st printing, 1st |isbn=0-914894-23-4 |issn=0888-2088 |lccn=78-21905 |url=https://books.google.com/books?id=x84mAAAAMAAJ |access-date=2020-03-20 |url-status=live |archive-url=https://web.archive.org/web/20200320183710/https://books.google.de/books?id=x84mAAAAMAAJ&redir_esc=y |archive-date=2020-03-20}} (2+xiv+270+6 pages)
* {{cite web |title=Why Hasn't AI Mastered Language Translation? |author-first=David |author-last=Pring-Mill |work=Singularity Hub |publisher=[[Singularity University]] |date=2018-03-04 |url=https://singularityhub.com/2018/03/04/why-hasnt-ai-mastered-language-translation/#sm.00000g1rmbl85mcrmqbgjyoco3zrf |access-date=2020-02-02 |url-status=live |archive-url=https://web.archive.org/web/20191229055424/https://singularityhub.com/2018/03/04/why-hasnt-ai-mastered-language-translation/#sm.00000g1rmbl85mcrmqbgjyoco3zrf |archive-date=2019-12-29}}
* {{cite web |title=Language processors |author-first=Stephen A. |author-last=Edwards |publisher=[[Columbia University]] |date=Fall 2013 |url=http://www1.cs.columbia.edu/~sedwards/classes/2013/w4115-fall/processors.pdf |access-date=2020-02-02 |url-status=live |archive-url=https://web.archive.org/web/20190624175913/http://www1.cs.columbia.edu/~sedwards/classes/2013/w4115-fall/processors.pdf |archive-date=2019-06-24}}
* {{cite encyclopediaweb |title=Computer science |author-first1=Allen |author-last1=Tucker |author-first2=Geneva G. |author-last2=Belford |encyclopediawork=[[Encyclopædia Britannica]] |url=http://www.britannica.com/EBchecked/topic/130675/computer-science/168860/High-level-languages |access-date=2020-02-02 |url-status=live |archive-url=https://web.archive.org/web/20190723203047/https://www.britannica.com/science/computer-science |archive-date=2019-07-23}}
 
[[Category:Programming language implementation]]