UPDATED 16:31 EDT / DECEMBER 25 2013

NEWS

Microsoft’s ‘compiler as a service’ project Roslyn emerges from stealth

Most compilers currently are black boxes–they make the source code into object files or assemblies in a sort of “code goes in, executable comes out” fashion. The purpose of “Roslyn Project” from Microsoft is to open the Visual Basic compiler and C#, giving developers the ability to use the API. Roslyn can be used for code generation, analysis and optimization, as well as support for scripting and interactive use of VB and C#. The new compiler for the two languages are like the predecessor as classic command-line programs.

Microsoft has presented a preliminary version of the compiler at the last build conference last year and offered the beta for public download. In the current version it can be integrated and thus accessible to interested parties as an extension in Visual Studio 2010 SP1.

But after more than a year of silence on the subject, Microsoft’s Managed Languages team has started talking about the project again. In a blog post, Microsoft manager Matt Gertz said that not only has work on Roslyn been progressing, but the new compilers are now in a mature enough state that Microsoft has begun using them internally for some of its own projects.

“Specifically, I’m pleased to announce that everyone in the Visual Studio organization is using Roslyn in their daily work now,” Gertz wrote. “In fact, the daily builds of VS are now compiled using Roslyn, all as part of a process that we refer to in the biz as ‘dogfooding.’”

A replacement for VB & C# compilers

Microsoft’s most recent Roslyn description is that the compiler is a replacement for VB & C# compilers (and certain IDE pieces that leverage them). The technology will allow developers to reach inside the compiler itself, which according to Microsoft will lead to far richer IDE (integrated development environment) and diagnostics being able to be developed at considerably reduced effort and cost.

Roslyn said Visual Studios team compiled and assessed over 60,000 projects, large and small, both internal and external to Microsoft (including flagship Microsoft products). ‘Dogfooding’ is a prelude to being done, but there’s still a bit of polish to put on before the new code is truly complete.

The basic idea of Microsoft’s Roslyn project is to look at the compiler as a service, which performs all steps from source code analysis to generate the. Net bytecode (CIL) code. Each phase is independently controlled, so you can always retrieve information. The aim is to provide the analysis of the source code and the program semantics by. Net APIs.

Roslyn is currently still at an early stage and supported only by C # and VB.Net language, but Microsoft plans is to integrate into the official Visual Studio (in fact they are using it internally) and replace the existing compiler for public use.

The compiler

Roslyn provides APIs for the following areas: compilers, scripting, Workspace and services. The first two do not depend on the IDE, so that developed software does not require installed Visual Studio. The third is for code analysis and refactoring, and the last for IDE features such as IntelliSense of the editor and to extend the provided Visual Studio.

In the procedure itself Roslyn does not differ from a classic compiler, as it is also based on a scanner for decomposing the source code and a parser for processing the program structure. While many additional information is retained, compiler discard the other compiler during processing. Compiler usually remember only the name and line number of the source file to output error.

Infinite possibilities

There are a variety of internal projects, which can be realized with it, because complex program not only needs the compiler detailed knowledge of the code, but also the debugger for code flow analysis and the development environment. Even more tools benefit from it such as the analysis tool PREsharp that uses Microsoft C++ to make comparable static error analysis of source code.

Roslyn architecture makes dynamic languages that can generate and execute code at runtime. Thus, the disadvantage of a compiler language over interpreted scripting languages is omitted, and the source can be run immediately without further processing steps. Own programs also can be extended to a scripting language for macro functions, just as browser to expand their opportunities.

For tool manufacturers Roslyn will be interesting to offer extensions for the Visual Studio, such as in resource and performance analysis, source beautifier and integration of tRACE output.

It appears that the opening of the compiler is important for modularity and extensibility. For example, developers can access the parse tree of the code and thus the change directly. Microsoft does not indicate a timetable for the deployment of Roslyn and its actual availability, but we can expect Microsoft will unveil the compiler at their developer event mid of next year. Developers should therefore be able to access grinds test throughout next year.


A message from John Furrier, co-founder of SiliconANGLE:

Your vote of support is important to us and it helps us keep the content FREE.

One click below supports our mission to provide free, deep, and relevant content.  

Join our community on YouTube

Join the community that includes more than 15,000 #CubeAlumni experts, including Amazon.com CEO Andy Jassy, Dell Technologies founder and CEO Michael Dell, Intel CEO Pat Gelsinger, and many more luminaries and experts.

“TheCUBE is an important partner to the industry. You guys really are a part of our events and we really appreciate you coming and I know people appreciate the content you create as well” – Andy Jassy

THANK YOU