Explain the different services provided by DLR to CLR.
The services provided by DLR to CLR are used for supporting dynamic languages. These services include the following:
* Expression Trees - Refers to the representation of code in a data structure similar to a tree. However, expression trees in DLR are the advanced version of the expression trees that were introduced with LINQ in .NET 3.5. Therefore, DLR has extended the functionalities of Language Integrated Query (LINQ) expression trees, such as control flow, assignment, and other language-modeling nodes to a dynamic language. These expression trees define the semantics of a language in form of an abstract syntax tree (AST). AST enables the DLR to dynamically generate code, which the CLR executes at runtime.
* Call Site Caching - Enables the DLR to store the information of the operations and characteristics of the variables, such as their data type. The call site caching services also enables to check whether such operations have been performed previously to retrieve all the information about the variable. The place where DLR stores these values is called a call site.
* Dynamic Object Interoperability - Enables the DLR to provide a set of classes and interfaces that represent dynamic objects and operations. These classes and interfaces can be used to create classes for dynamic libraries, which can be used in static and dynamic type languages.