<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Programming_language_implementation</id>
	<title>Programming language implementation - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Programming_language_implementation"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Programming_language_implementation&amp;action=history"/>
	<updated>2026-05-03T18:04:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Programming_language_implementation&amp;diff=2957164&amp;oldid=prev</id>
		<title>37.154.166.127: /* Multiple implementations */</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Programming_language_implementation&amp;diff=2957164&amp;oldid=prev"/>
		<updated>2025-05-16T12:53:11Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Multiple implementations&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{short description|System for executing computer programs}}&lt;br /&gt;
&lt;br /&gt;
In [[computer programming]], a &amp;#039;&amp;#039;&amp;#039;programming language implementation&amp;#039;&amp;#039;&amp;#039; is a system for executing [[computer programs]]. There are two general approaches to programming language implementation:&amp;lt;ref name=&amp;quot;RantaBook&amp;quot;&amp;gt;{{cite book |last1=Ranta |first1=Aarne |title=Implementing Programming Languages |date=February 6, 2012 |publisher=College Publications |isbn=9781848900646 |pages=16–18 |url=http://www.cse.chalmers.se/edu/year/2012/course/DAT150/lectures/plt-book.pdf#page=16 |access-date=22 March 2020 |url-status=live |archive-url=https://web.archive.org/web/20201107224313/http://www.cse.chalmers.se/edu/year/2012/course/DAT150/lectures/plt-book.pdf#page=16 |archive-date= Nov 7, 2020 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
*&amp;#039;&amp;#039;[[Interpreter (computing)|Interpretation]]:&amp;#039;&amp;#039; The program is read as input by an interpreter, which performs the actions written in the program.&amp;lt;ref name=&amp;quot;LanguageGreg&amp;quot;&amp;gt;{{cite web |last1=Baker |first1=Greg |title=Language Implementations |url=https://www2.cs.sfu.ca/~ggbaker/prog-langs/content/lang-implement.html |website=Computing Science - Simon Fraser University |access-date=22 March 2020 |url-status=live |archive-url= https://web.archive.org/web/20190308033517/http://www.cs.sfu.ca/~ggbaker/prog-langs/content/lang-implement.html |archive-date= Mar 8, 2019 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
*&amp;#039;&amp;#039;[[Compiler|Compilation]]:&amp;#039;&amp;#039; The program is read by a compiler, which translates it into some other language, such as [[bytecode]] or [[machine code]]. The translated code may either be directly [[Execution (computing)|executed]] by hardware or serve as input to another interpreter or another compiler.&amp;lt;ref name=&amp;quot;LanguageGreg&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Interpreter==&lt;br /&gt;
{{Main|Interpreter (computing)}}&lt;br /&gt;
An [[interpreter (computing)|interpreter]] is composed of two parts: a [[parser]] and an [[evaluator]]. After a program is read as input by an interpreter, it is processed by the parser. The parser breaks the program into [[Syntax (programming languages)|language components]] to form a [[parse tree]]. The evaluator then uses the parse tree to execute the program.&amp;lt;ref name=&amp;quot;IntroToComputing&amp;quot;&amp;gt;{{cite book |last1=Evans |first1=David |title=Introduction to Computing |date=19 August 2011 |publisher=University of Virginia |page=211 |url=https://computingbook.org/FullText.pdf#page=221 |access-date=22 March 2020}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Virtual machine===&lt;br /&gt;
A [[virtual machine]] is a special type of interpreter that interprets bytecode.&amp;lt;ref name=&amp;quot;LanguageGreg&amp;quot; /&amp;gt; Bytecode is a [[Cross-platform software|portable]] low-level code similar to machine code, though it is generally executed on a virtual machine instead of a physical machine.&amp;lt;ref name=&amp;quot;MakeUseOfVM&amp;quot;&amp;gt;{{cite web |last1=Sridhar |first1=Jay |title=Why the Java Virtual Machine Helps Your Code Run Better |url=https://www.makeuseof.com/tag/why-java-virtual-machine-code-run-better/ |date=Aug 29, 2017 |website=MakeUseOf |access-date=22 March 2020}}&amp;lt;/ref&amp;gt; To improve their efficiencies, many programming languages such as [[Java (programming language)|Java]],&amp;lt;ref name=&amp;quot;MakeUseOfVM&amp;quot; /&amp;gt; [[Python (programming language)|Python]],&amp;lt;ref name=&amp;quot;PythonBytecode&amp;quot;&amp;gt;{{cite web |last1=Bennett |first1=James |title=An introduction to Python bytecode |url=https://opensource.com/article/18/4/introduction-python-bytecode |date=April 23, 2018 |website=Opensource.com |access-date=22 March 2020}}&amp;lt;/ref&amp;gt; and [[C Sharp (programming language)|C#]]&amp;lt;ref name=&amp;quot;CLR&amp;quot;&amp;gt;{{cite web |last1=Ali |first1=Mirza Farrukh |title=Common Language Runtime(CLR) DotNet |url=https://medium.com/@mirzafarrukh13/common-language-runtime-dotnet-83e0218edcae |date=Oct 12, 2017 |website=Medium |access-date=22 March 2020}}&amp;lt;/ref&amp;gt; are compiled to bytecode before being interpreted.&lt;br /&gt;
&lt;br /&gt;
===Just-in-time compiler===&lt;br /&gt;
Some virtual machines include a [[just-in-time compilation|just-in-time (JIT) compiler]] to improve the efficiency of bytecode execution. While the bytecode is being executed by the virtual machine, if the JIT compiler determines that a portion of the bytecode will be used repeatedly, it compiles that particular portion to machine code. The JIT compiler then stores the machine code in [[Random-access memory|memory]] so that it can be used by the virtual machine. JIT compilers try to strike a balance between longer compilation time and faster execution time.&amp;lt;ref name=&amp;quot;LanguageGreg&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Compiler==&lt;br /&gt;
{{Main|Compiler}}&lt;br /&gt;
A [[compiler]] translates programs written in one language into another language. Most compilers are organized into three stages: a [[Compiler#Front end|front end]], an [[Compiler#Middle end|optimizer]], and a [[Compiler#Back end|back end]]. The front end is responsible for understanding the program. It makes sure a program is valid and transforms it into an [[intermediate representation]], a data structure used by the compiler to represent the program. The optimizer improves the intermediate representation to increase the speed or reduce the size of the [[executable]] which is ultimately produced by the compiler. The back end converts the optimized intermediate representation into the output language of the compiler.&amp;lt;ref name=&amp;quot;EngineeringCompiler&amp;quot;&amp;gt;{{cite book |last1=Cooper |first1=Keith |last2=Torczon |first2=Linda |title=Engineering a Compiler |url=https://archive.org/details/engineeringcompi00coop_143 |url-access=limited |date=7 February 2011 |publisher=Morgan Kaufmann |isbn=9780120884780 |pages=[https://archive.org/details/engineeringcompi00coop_143/page/n238 6]-9 |edition=2nd}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a compiler of a given [[high level language]] produces another high level language, it is called a [[Source-to-source compiler|transpiler]]. Transpilers can be used to extend existing languages or to simplify compiler development by exploiting [[Software portability|portable]] and well-optimized implementations of other languages (such as [[C (programming language)|C]]).&amp;lt;ref name=&amp;quot;LanguageGreg&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Many combinations of interpretation and compilation are possible, and many modern programming language implementations include elements of both. For example, the [[Smalltalk]] programming language is conventionally implemented by compilation into [[bytecode]], which is then either interpreted or compiled by a [[virtual machine]]. Since Smalltalk bytecode is run on a virtual machine, it is portable across different hardware platforms.&amp;lt;ref name=&amp;quot;SmalltalkBook&amp;quot;&amp;gt;{{cite book |last1=Lewis |first1=Simon |title=The Art and Science of Smalltalk |date=May 11, 1995 |publisher=Prentice Hall |isbn=9780133713459 |pages=20–21 |url=http://sdmeta.gforge.inria.fr/FreeBooks/Art/artAdded174186187Final.pdf#page=32 |access-date=23 March 2020}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Multiple implementations==&lt;br /&gt;
Programming languages can have multiple implementations. Different implementations can be written in different languages and can use different methods to compile or interpret code. For example, implementations of [[Python (programming language)|Python]] include:{{thinsp}}&amp;lt;ref name=&amp;quot;AltPython&amp;quot;&amp;gt;{{cite web |title=Alternative Python Implementations |url=https://www.python.org/download/alternatives/ |website=Python.org |access-date=23 March 2020}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[CPython]], the [[reference implementation]] of Python&lt;br /&gt;
* [[IronPython]], an implementation targeting the [[.NET Framework]] (written in [[C Sharp (programming language)|C#]])&lt;br /&gt;
* [[Jython]], an implementation targeting the [[Java virtual machine]]&lt;br /&gt;
* [[PyPy]], an implementation designed for speed (written in RPython)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
*{{Commons category-inline|Compiling and linking}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Programming Language Implementation}}&lt;br /&gt;
[[Category:Programming language implementation| ]]&lt;br /&gt;
[[Category:Programming language topics|Implementation]]&lt;/div&gt;</summary>
		<author><name>37.154.166.127</name></author>
	</entry>
</feed>