Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Compiler
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Computer program which translates code from one programming language to another}} {{About|software to translate computer languages|the manga|Compiler (manga)}} {{Redirect2|Compile|Compiling|the software company|Compile (company)|other uses|Compilation (disambiguation){{!}}Compilation}} {{Use dmy dates|date=October 2020}} {{Program execution}} In [[computing]], a '''compiler''' is a [[computer program]] that [[Translator (computing)|translates]] computer code written in one [[programming language]] (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that translate [[source code]] from a [[high-level programming language]] to a [[lower level language|low-level programming language]] (e.g. [[assembly language]], [[object code]], or [[machine code]]) to create an [[executable]] program.<ref>{{cite web |author= |date= |title=Encyclopedia: Definition of Compiler |url=https://www.pcmag.com/encyclopedia/term/compiler |access-date=2 July 2022 |work=PCMag.com}}</ref><ref name="dragon">[[Compilers: Principles, Techniques, and Tools]] by Alfred V. Aho, Ravi Sethi, Jeffrey D. Ullman - Second Edition, 2007</ref>{{rp|p1}}<ref name="SUDARSANAM MALIK FUJITA 2002 pp. 506β515">{{cite book | last1=Sudarsanam | first1=Ashok | last2=Malik | first2=Sharad | last3=Fujita | first3=Masahiro | title=Readings in Hardware/Software Co-Design | chapter=A Retargetable Compilation Methodology for Embedded Digital Signal Processors Using a Machine-Dependent Code Optimization Library | publisher=Elsevier | date=2002 | doi=10.1016/b978-155860702-6/50045-4 | pages=506β515 | isbn=9781558607026 | quote=A compiler is a computer program that translates a program written in a high-level language (HLL), such as C, into an equivalent assembly language program [2]. }}</ref> There are many different types of compilers which produce output in different useful forms. A ''[[cross-compiler]]'' produces code for a different [[Central processing unit|CPU]] or [[operating system]] than the one on which the cross-compiler itself runs. A ''[[bootstrap compiler]]'' is often a temporary compiler, used for compiling a more permanent or better optimised compiler for a language. Related software include ''[[decompiler]]s'', programs that translate from low-level languages to higher level ones; programs that translate between high-level languages, usually called ''[[source-to-source compiler]]s'' or ''transpilers''; language ''[[rewriting|rewriter]]s'', usually programs that translate the form of [[Expression (computer science)|expressions]] without a change of language; and ''[[compiler-compiler]]s'', compilers that produce compilers (or parts of them), often in a generic and reusable way so as to be able to produce many differing compilers. A compiler is likely to perform some or all of the following operations, often called phases: [[Preprocessor|preprocessing]], [[lexical analysis]], [[parser|parsing]], [[Semantic analysis (compilers)|semantic analysis]] ([[syntax-directed translation]]), conversion of input programs to an [[intermediate representation]], [[code optimization]] and [[code generation (compiler)|machine specific code generation]]. Compilers generally implement these phases as modular components, promoting efficient design and correctness of [[program transformation|transformation]]s of source input to target output. Program faults caused by incorrect compiler behavior can be very difficult to track down and work around; therefore, compiler implementers invest significant effort to ensure [[compiler correctness]].<ref name="Sun2016">{{cite book |last1=Sun|first1=Chengnian|last2=Le|first2=Vu|last3=Zhang|first3=Qirun|last4=Su|first4=Zhendong|title=Proceedings of the 25th International Symposium on Software Testing and Analysis |chapter=Toward understanding compiler bugs in GCC and LLVM |date=2016|chapter-url=http://dl.acm.org/citation.cfm?doid=2931037.2931074|publisher=ACM|series=ISSTA 2016|pages=294β305|doi=10.1145/2931037.2931074|isbn=9781450343909|s2cid=8339241}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)