Common Language Infrastructure

Last updated
Common Language Infrastructure
ISO/IEC 23271:2012(E)
AbbreviationCLI
StatusPublished
Year started2000;23 years ago (2000)
First published2001;22 years ago (2001) (Ecma) and 2003;20 years ago (2003) (ISO/IEC)
Latest versionSixth edition
June 2012;11 years ago (2012-06)
OrganizationDeveloped by: Microsoft, Hewlett-Packard, Intel, and others
Standardized by: Ecma, ISO/IEC
Committee ISO/IEC JTC 1/SC 22
DomainCommon Language (Cross-platform)
License RAND
Website ECMA-335 ,
ISO/IEC 23271

The Common Language Infrastructure (CLI) is an open specification and technical standard originally developed by Microsoft and standardized by ISO/IEC (ISO/IEC 23271) and Ecma International (ECMA 335) [1] [2] that describes executable code and a runtime environment that allows multiple high-level languages to be used on different computer platforms without being rewritten for specific architectures. This implies it is platform agnostic. The .NET Framework, .NET and Mono are implementations of the CLI. The metadata format is also used to specify the API definitions exposed by the Windows Runtime. [3] [4]

Contents

Overview

Visual overview of the Common Language Infrastructure (CLI) Overview of the Common Language Infrastructure 2015.svg
Visual overview of the Common Language Infrastructure (CLI)

Among other things, the CLI specification describes the following five aspects:

The Common Type System (CTS)
A set of data types and operations that are shared by all CTS-compliant programming languages.
The Metadata
Information about program structure is language-agnostic, so that it can be referenced between languages and tools, making it easy to work with code written in a language the developer is not using.
The Common Language Specification (CLS)
The CLS, a subset of the CTS, are rules to which components developed with/for the supported languages must adhere.
They apply to consumers (developers who are programmatically accessing a component that is CLS-compliant), frameworks (developers who are using a language compiler to create CLS-compliant libraries), and extenders (developers who are creating a tool such as a language compiler or a code parser that creates CLS-compliant components).
The Virtual Execution System (VES)
The VES loads and executes CLI-compatible programs, using the metadata to combine separately generated pieces of code at runtime.
All compatible languages compile to Common Intermediate Language (CIL), which is an intermediate language that is abstracted from the platform hardware. When the code is executed, the platform-specific VES will compile the CIL to the machine language according to the specific hardware and operating system.
In the CLI standard initially developed by Microsoft, the VES is implemented by the Common Language Runtime (CLR).
The Standard Libraries
A set of libraries providing many common functions, such as file reading and writing. Their core is the Base Class Library (BCL).

Standardization and licensing

In August 2000, Microsoft, Hewlett-Packard, Intel, and others worked to standardize CLI. By December 2001, it was ratified by the Ecma, with ISO/IEC standardization following in April 2003.

Microsoft and its partners hold patents for CLI. Ecma and ISO/IEC require that all patents essential to implementation be made available under "reasonable and non-discriminatory (RAND) terms." It is common for RAND licensing to require some royalty payment, which could be a cause for concern with Mono. As of January 2013, neither Microsoft nor its partners have identified any patents essential to CLI implementations subject to RAND terms.

As of July 2009, [5] Microsoft added C# and CLI to the list of specifications that the Microsoft Community Promise applies to, [6] so anyone can safely implement specified editions of the standards without fearing a patent lawsuit from Microsoft. To implement the CLI standard requires conformance to one of the supported and defined profiles of the standard, the minimum of which is the kernel profile. The kernel profile is actually a very small set of types to support in comparison to the well known core library of default .NET installations. However, the conformance clause of the CLI allows for extending the supported profile by adding new methods and types to classes, as well as deriving from new namespaces. But it does not allow for adding new members to interfaces. This means that the features of the CLI can be used and extended, as long as the conforming profile implementation does not change the behavior of a program intended to run on that profile, while allowing for unspecified behavior from programs written specifically for that implementation.

In 2012, Ecma and ISO/IEC published the new edition of the CLI standard. [1] [2]

Implementations

See also

Notes

  1. 1 2 "ISO/IEC 23271:2012 - Information technology -- Common Language Infrastructure (CLI)".
  2. 1 2 "Standard ECMA-335 - 6th edition (June 2012)".
  3. "Introduction to Advanced Windows Store App Development using HTML5 and JavaScript | Microsoft Press Store".
  4. "WinRT demystified - Miguel de Icaza".
  5. "The Ecma C# and CLI Standards - Port 25: The Open Source Community at Microsoft". July 6, 2009. Archived from the original on July 9, 2009. Retrieved September 26, 2009.
  6. v-alje (March 16, 2023). "[MS-DEVCENTLP]: Microsoft Community Promise". learn.microsoft.com. Retrieved May 1, 2023.

Related Research Articles

The Common Language Runtime (CLR), the virtual machine component of Microsoft .NET Framework, manages the execution of .NET programs. Just-in-time compilation converts the managed code into machine instructions which are then executed on the CPU of the computer. The CLR provides additional services including memory management, type safety, exception handling, garbage collection, security and thread management. All programs written for the .NET Framework, regardless of programming language, are executed in the CLR. All versions of the .NET Framework include CLR. The CLR team was started June 13, 1998.

Common Intermediate Language (CIL), formerly called Microsoft Intermediate Language (MSIL) or Intermediate Language (IL), is the intermediate language binary instruction set defined within the Common Language Infrastructure (CLI) specification. CIL instructions are executed by a CLI-compatible runtime environment such as the Common Language Runtime. Languages which target the CLI compile to CIL. CIL is object-oriented, stack-based bytecode. Runtimes typically just-in-time compile CIL instructions into native code.

DotGNU is a decommissioned part of the GNU Project that started in January 2001. DotGNU aims to provide a free software replacement for Microsoft's .NET Framework by Free Software Foundation. Other goals of the project are better support for non-Windows platforms and support for more processors.

The Shared Source Common Language Infrastructure (SSCLI), previously codenamed Rotor, is Microsoft's shared source implementation of the CLI, the core of .NET. Although the SSCLI is not suitable for commercial use due to its license, it does make it possible for programmers to examine the implementation details of many .NET libraries and to create modified CLI versions. Microsoft provides the Shared Source CLI as a reference CLI implementation suitable for educational use.

Managed code is computer program code that requires and will execute only under the management of a Common Language Infrastructure (CLI); Virtual Execution System (VES); virtual machine, e.g. .NET, CoreFX, or .NET Framework; Common Language Runtime (CLR); or Mono. The term was coined by Microsoft.

Metadata, in the Common Language Infrastructure (CLI), refers to certain data structures embedded within the Common Intermediate Language (CIL) code that describes the high-level structure of the code. Metadata describes all classes and class members that are defined in the assembly, and the classes and class members that the current assembly will call from another assembly. The metadata for a method contains the complete description of the method, including the class, the return type and all of the method parameters.

<span class="mw-page-title-main">C Sharp (programming language)</span> Programming language

C# is a general-purpose high-level programming language supporting multiple paradigms. C# encompasses static typing, strong typing, lexically scoped, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines.

Office Open XML is a zipped, XML-based file format developed by Microsoft for representing spreadsheets, charts, presentations and word processing documents. Ecma International standardized the initial version as ECMA-376. ISO and IEC standardized later versions as ISO/IEC 29500.

In Microsoft's .NET Framework, the Common Type System (CTS) is a standard that specifies how type definitions and specific values of types are represented in computer memory. It is intended to allow programs written in different programming languages to easily share information. As used in programming languages, a type can be described as a definition of a set of values, and the allowable operations on those values.

The Open Packaging Conventions (OPC) is a container-file technology initially created by Microsoft to store a combination of XML and non-XML files that together form a single entity such as an Open XML Paper Specification (OpenXPS) document. OPC-based file formats combine the advantages of leaving the independent file entities embedded in the document intact and resulting in much smaller files compared to normal use of XML.

Comparison of the Java and .NET platforms.

The Framework Class Library (FCL) is a component of Microsoft's .NET Framework, the first implementation of the Common Language Infrastructure (CLI). In much the same way as Common Language Runtime (CLR) implements the CLI Virtual Execution System (VES), the FCL implements the CLI foundational Standard Libraries. As a CLI foundational class libraries implementation, it is a collection of reusable classes, interfaces, and value types, and includes an implementation of the CLI Base Class Library (BCL).

<span class="mw-page-title-main">.NET Framework</span> Software platform developed by Microsoft

The .NET Framework 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 being superseded by the cross-platform .NET project. It includes a large class library called Framework Class Library (FCL) and provides language interoperability across several programming languages. Programs written for .NET Framework execute in a software environment named the Common Language Runtime (CLR). The CLR is an application virtual machine that provides services such as security, memory management, and exception handling. As such, computer code written using .NET Framework is called "managed code". FCL and CLR together constitute the .NET Framework.

Windows Runtime (WinRT) is a platform-agnostic component and application architecture first introduced in Windows 8 and Windows Server 2012 in 2012. It is implemented in C++ and officially supports development in C++, Rust/WinRT, Python/WinRT, JavaScript-TypeScript, and the managed code languages C# and Visual Basic .NET (VB.NET).

<span class="mw-page-title-main">Mono (software)</span> Computer software project

Mono is a free and open-source .NET Framework-compatible software framework. Originally by Ximian, it was later acquired by Novell, and is now being led by Xamarin, a subsidiary of Microsoft and the .NET Foundation. Mono can be run on many software systems.

C++/CX(C++ component extensions) is a language projection for Microsoft's Windows Runtime platform. It takes the form of a language extension for C++ compilers, and it enables C++ programmers to write programs that call Windows Runtime (WinRT) APIs. C++/CX is superseded by the C++/WinRT language projection, which is not an extension to the C++ language; rather, it's an entirely standard modern ISO C++17 header-file-based library.

The following outline is provided as an overview of and topical guide to C++:

<span class="mw-page-title-main">Standard Libraries (CLI)</span> Standard libraries of C#, the .NET Framework and Core, and related projects

The Standard Libraries is a set of libraries included in the Common Language Infrastructure (CLI) in order to encapsulate many common functions, such as file reading and writing, XML document manipulation, exception handling, application globalization, network communication, threading, and reflection, which makes the programmer's job easier. It is much larger in scope than standard libraries for most other languages, including C++, and is comparable in scope and coverage to the standard libraries of Java.

References