April 27, 2009
Compiler Tools for the Rest Us, or CCI Goes Open Source

I can probably get away with referring to the "Common Compiler Infrastructure" as a modern day "Rosetta Stone" -- but "silver bullet"? No way. By whatever description, however, the Common Compiler Infrastructure (CCI) is a very interesting project.
CCI is a set of tools and components that are useful for building compilers by providing some of the functionality that compilers and related programming tools tend to have in common. The metadata components provide functionality for reading, writing, and manipulating Microsoft Common Language Runtime (CLR) assemblies and debug files. The functionality provided by these components subsumes the functionality provided by System.Reflection and System.Reflection.Emit. And here's another cool part. CCI is now an open source project hosted on codeplex.
Spearheading the CCI project is Herman Venter, a Principal Software Development Engineer at Microsoft who works on programming language design and compiler front ends. Past projects include JScript .NET, CCI and X#/Xen/Comega. Herman, a self-described "programming language enthusiast," currently works in Microsoft Research. He's involved in projects such as Spec#, a formal language for API contracts (influenced by JML, AsmL, and Eiffel), which extends C# with constructs for non-null types, preconditions, postconditions, and object invariants. Spec# is a research vehicle that has been used to explore specifications and the dynamic/static tools that make use of them.
In some ways, Herman reminds me of former Dr. Dobb's technical editor David Betz, whose pastime was creating little languages -- XLisp, XScheme, Bob, and ZIL, among others. In Herman's case, according to his blog, he "writes compiler after compiler. Somewhat like old king Midas, everything I touch turns into a compiler."
Along the way, he adds, "I've harvested pieces of code that I use frequently and I've packaged them up in a mostly incomplete, but still useful, set of libraries that help with writing compilers and compiler-like tools."
If you are interested in building compilers or such, take a look at CCI.
-- Jonathan Erickson
jerickson@ddj.com
Posted by Jon Erickson at 05:15 PM Permalink
|