Dynamic Language Runtime
   HOME

TheInfoList



OR:

The Dynamic Language Runtime (DLR) from
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washin ...
runs on top of the Common Language Runtime (CLR) and provides
computer language A computer language is a formal language used to communicate with a computer. Types of computer languages include: * Construction language – all forms of communication by which a human can specify an executable problem solution to a comput ...
services for
dynamic language In computer science, a dynamic programming language is a class of high-level programming languages, which at runtime execute many common programming behaviours that static programming languages perform during compilation. These behaviors cou ...
s. These services include: * A dynamic
type system In computer programming, a type system is a logical system comprising a set of rules that assigns a property called a type to every "term" (a word, phrase, or other set of symbols). Usually the terms are various constructs of a computer progr ...
, to be shared by all languages using the DLR services * Dynamic method dispatch * Dynamic code generation * Hosting API The DLR is used to implement dynamic languages on the
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
, including the IronPython and
IronRuby IronRuby is an implementation of the Ruby programming language targeting Microsoft .NET Framework. It is implemented on top of the Dynamic Language Runtime (DLR), a library running on top of the Common Language Infrastructure that provides dynam ...
projects. Because the dynamic language implementations share a common underlying system, it should be easier for them to interact with one another. For example, it should be possible to use libraries from any dynamic language in any other dynamic language. In addition, the hosting API allows interoperability with statically typed
CLI languages CLI languages are computer programming languages that are used to produce libraries and programs that conform to the Common Language Infrastructure (CLI) specifications. With some notable exceptions, most CLI languages compile entirely to the Comm ...
like C# and
Visual Basic .NET Visual Basic, originally called Visual Basic .NET (VB.NET), is a multi-paradigm, object-oriented programming language, implemented on .NET, Mono, and the .NET Framework. Microsoft launched VB.NET in 2002 as the successor to its original Visua ...
.


History

Microsoft's Dynamic Language Runtime project was announced by Microsoft at MIX 2007. Microsoft shipped .NET DLR 0.9 beta in November 2008, and final 0.9 in December 2008. Version 1.0 shipped in April 2010. In July 2010, Microsoft changed the license of the DLR from the Microsoft Public License to the Apache License 2.0. With the release of .NET 4, also in April 2010, DLR was incorporated into the .NET Framework itself. The open source DLR project hosted on
GitHub GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continu ...
has a few additional features for language implementers. After the July 2010 release, there was little activity on the project for some years. This was interpreted by a Microsoft developer who worked on
IronRuby IronRuby is an implementation of the Ruby programming language targeting Microsoft .NET Framework. It is implemented on top of the Dynamic Language Runtime (DLR), a library running on top of the Common Language Infrastructure that provides dynam ...
as a lack of commitment from Microsoft to dynamic languages on the .NET Framework. However, there has been regular activity since 2016/17, leading to a number of improvements and upgrades.


Supported languages

The DLR services are currently used in the development version of
IronRuby IronRuby is an implementation of the Ruby programming language targeting Microsoft .NET Framework. It is implemented on top of the Dynamic Language Runtime (DLR), a library running on top of the Common Language Infrastructure that provides dynam ...
, a .NET implementation of the
Ruby A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called ...
language, and for IronPython. In 2007, Microsoft planned to use the DLR for the upcoming Visual Basic 2010 (VB 10.0) and Managed JScript (
ECMAScript ECMAScript (; ES) is a JavaScript standard intended to ensure the interoperability of web pages across different browsers. It is standardized by Ecma International in the documenECMA-262 ECMAScript is commonly used for client-side scripting o ...
3.0). However, as of August 2009, Microsoft has no more plans to implement Managed JScript on the DLR. Like C#, Visual Basic can access objects from dynamic languages built on the DLR such as IronPython and
IronRuby IronRuby is an implementation of the Ruby programming language targeting Microsoft .NET Framework. It is implemented on top of the Dynamic Language Runtime (DLR), a library running on top of the Common Language Infrastructure that provides dynam ...
.
PowerShell PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-sou ...
3.0, released in
Windows 8 Windows 8 is a major release of the Windows NT operating system developed by Microsoft. It was released to manufacturing on August 1, 2012; it was subsequently made available for download via MSDN and TechNet on August 15, 2012, and later to ...
, was updated to use the DLR.
IronScheme IronScheme is an implementation of the Scheme programming language targeting the Microsoft .NET Framework. IronScheme is a complete rewrite of IronLisp, incorporating lessons learnt while developing IronLisp. IronScheme was planning to build upon ...
, a Scheme implementation, was planning to build upon the DLR. This idea was abandoned because the DLR
branch A branch, sometimes called a ramus in botany, is a woody structural member connected to the central trunk of a tree (or sometimes a shrub). Large branches are known as boughs and small branches are known as twigs. The term ''twig'' usually ...
used by the project became out of sync with the trunk, and also because (according to the project coordinator) the current version of the DLR at that time could not support the majority of Scheme's requirements.


Architecture

The Dynamic Language Runtime is built on the idea that it is possible to implement language specificities on top of a generic
language-agnostic Language-agnostic programming or scripting (also called language-neutral, language-independent, or cross-language) is a software paradigm in which no particular language is promoted. In introductory instruction, the term refers to teaching princip ...
abstract syntax tree In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language. Each node of the tree denotes a construct occurr ...
, whose nodes correspond to a specific functionality that is common to many dynamic languages. This architecture is backed by the idea that the number of elementary language constructs that would have to be implemented on the generic stack should be inherently limited. The DLR dynamically generates code corresponding to the functionality expressed by these nodes. The compiler for any dynamic language implemented on top of the DLR has to generate DLR abstract trees, and hand it over to the DLR libraries. The DLR provides dynamically-updated DynamicSite objects that cache the task of binding methods to objects. Since the type of an object—as well as the members it contains—in dynamic languages can change during a program lifetime, a method invocation must check the method list to see if the invocation is a valid one. DynamicSite objects represent and cache the state of the object and its methods; any update to the object is reflected in the DynamicSite objects as well. DLR routes all method invocations via the DynamicSite objects, which then performs a fast lookup and binding of the method with the actual implementation. In contrast to other efforts like the
Parrot virtual machine Parrot was a register-based process virtual machine designed to run dynamic languages efficiently. It is possible to compile Parrot assembly language and Parrot intermediate representation (PIR, an intermediate language) to Parrot bytecode an ...
(with no dependencies) or
Da Vinci Machine The Da Vinci Machine, also called the Multi Language Virtual Machine, was a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine (JVM) to add support for dynamic languages. It was already possible to run dynami ...
(built on Java's
JVM A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes ...
by adding new bytecodes in the JVM instruction set), the DLR is built on top of the existing Common Language Runtime, the
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
virtual machine.


See also

*
Da Vinci Machine The Da Vinci Machine, also called the Multi Language Virtual Machine, was a Sun Microsystems project aiming to prototype the extension of the Java Virtual Machine (JVM) to add support for dynamic languages. It was already possible to run dynami ...
– a project starting at Sun Microsystems which brought support for dynamic languages to the Java Platform at the Java virtual machine (JVM) level *
Parrot virtual machine Parrot was a register-based process virtual machine designed to run dynamic languages efficiently. It is possible to compile Parrot assembly language and Parrot intermediate representation (PIR, an intermediate language) to Parrot bytecode an ...


References

* * * * * *


External links

* * {{Microsoft FOSS .NET terminology Free and open-source software Microsoft application programming interfaces Microsoft free software Software using the Apache license 2010 software