Compiler: Difference between revisions

Content deleted Content added
Restored revision 1199180496 by Ancheta Wis (talk)
Cjs (talk | contribs)
Assemblers are not considered compilers (w/reference and quote)
Line 176:
** The output of these compilers target [[computer hardware]] at a very low level, for example a [[field-programmable gate array]] (FPGA) or structured [[application-specific integrated circuit]] (ASIC).<ref>{{cite book|last1=Swartz|first1=Jordan S.|last2=Betz |first2=Vaugh |last3 =Rose|first3=Jonathan|title=Proceedings of the 1998 ACM/SIGDA sixth international symposium on Field programmable gate arrays - FPGA '98 |chapter=A fast routability-driven router for FPGAs |___location=Monterey, CA|publisher=[[Association for Computing Machinery|ACM]]|chapter-url= http://www.eecg.toronto.edu/~vaughn/papers/fpga98.pdf |url-status=live|archive-url=https://web.archive.org/web/20170809012611/http://www.eecg.toronto.edu/~vaughn/papers/fpga98.pdf|archive-date=9 August 2017|date =22-25 February 1998|doi = 10.1145/275107.275134 |pages=140–149|isbn=978-0897919784|s2cid=7128364}}</ref>{{primary source inline|date=March 2017}} Such compilers are said to be hardware compilers, because the source code they compile effectively controls the final configuration of the hardware and how it operates. The output of the compilation is only an interconnection of [[transistor]]s or [[lookup table]]s.
** An example of hardware compiler is XST, the Xilinx Synthesis Tool used for configuring FPGAs.<ref>{{cite web|author=Xilinx Staff|date=2009|title=XST Synthesis Overview|publisher=Xilinx, Inc.|url=http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/ise_c_using_xst_for_synthesis.htm|access-date=28 February 2017|url-status=live|archive-url=https://web.archive.org/web/20161102004019/http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/ise_c_using_xst_for_synthesis.htm|archive-date=2 November 2016}}</ref>{{primary source inline|date=March 2017}} Similar tools are available from Altera,<ref>{{cite web|author=Altera Staff|date=2017|title=Spectra-Q™ Engine|publisher=Altera.com|url=https://www.altera.com/products/design-software/fpga-design/quartus-prime/features/spectra-q.html|access-date=28 February 2017|url-status=dead|archive-url=https://web.archive.org/web/20161010221724/https://www.altera.com/products/design-software/fpga-design/quartus-prime/features/spectra-q.html|archive-date=10 October 2016}}</ref>{{primary source inline|date=March 2017}} Synplicity, Synopsys and other hardware vendors.{{citation needed|date=March 2017}}
* An ''assembler'' is a program that compiles human readable [[assembly language]] to [[machine code]], the actual instructions executed by hardware. The inverse program that translates machine code to assembly language is called a [[disassembler]].
* A program that translates from a low-level language to a higher level one is a [[decompiler]].<ref>{{Cite web |title=Decompilers - an overview {{!}} ScienceDirect Topics |url=https://www.sciencedirect.com/topics/computer-science/decompilers |access-date=2022-06-12 |website=www.sciencedirect.com}}</ref>
* A program that translates into an object code format that is not supported on the compilation machine is called a [[cross compiler]] and is commonly used to prepare code for execution on embedded software applications.<ref>{{Cite web |last=Chandrasekaran |first=Siddharth |date=2018-01-26 |title=Cross Compilation Demystified |url=https://embedjournal.com/cross-compilation-demystified/ |access-date=2023-03-05 |website=embedjournal.com |language=en}}</ref>{{better source|date=March 2023}}
* A program that rewrites object code back into the same type of object code while applying optimisations and transformations is a [[binary recompiler]].
 
''Assemblers'' which translate human readable [[assembly language]] to the [[machine code]] instructions executed by hardware, are not considered compilers.<ref>Calingaert and Horowitz 1979, pp. 186-187</ref>{{efn|"The many source-language features described in the preceding section result in a number of salient differences between compilers and assemblers. On any one item the distinction may not be clear-cut. Moreover, it may be difficult to distinguish a simple compiler from a powerful macro assembler. Nevertheless, the differences are usually substantial enough that there remains a qualitative distinction between assemblers and compilers."}} (The inverse program that translates machine code to assembly language is called a [[disassembler]].)
 
== See also ==