My impressions about Code Generation 2009

Code Generation 2009
Once a year I flew to Cambridge, on the United Kingdom. It is the place for my favorite conference in the last three years: Code Generation!

In this last edition I am especially happy to see again a lot of well-know faces working in the same stat-of-the art topics. Everyone coming to CG believes on it, so it easy to jump and talk directly about the core and heavy issues: you don’t need to make any additional effort to convince your audience about the goodness of modeling and code gen.

To me, it is remarkable important to have the chance to meet with MDD, DSL and MDA practitioners and interchange ideas, comment on latest new tools & breakthroughs, and give and receive first-class feedback!

I want to share some of the main shared ideas I got back home in my luggage. So, if you are interested in it, please keep reading.

Model Discovery

I meet Stuart Kent (Microsoft) and I was surprised by his tools for Visual Studio 2010 Team Edition designed for model discovery. These tools are capable of selecting the source code of a solution and search for all the dependencies in the code. The tools produces an XML graph with the dependences and Visual Studio is able to draw them (a la Graphviz) and do drilldown from assemblies to namespaces, classes & methods. Nice to tool to have to check the real architecture of your production code.

I had to do this manually once: looking for cross references in more than 2.500 mini-applications of legacy code and finished it finally doing some kind of regex searching for the references, creating a text based graph and display it all with the quoted library GraphViz and some clustering techniques.

Microsoft OSLO

Stills on CTP stage. we need to await a further more to see the full features of the final version of OSLO. But it is a really needed approach on the Microsoft side to have tools to create text DSL as the Eclipse guys have with XText or openArchitectuware. In this way, my lab tests with MGrammar looks promising.
It was a pity not to have the Redmon guys presenting their tools in first person. They will have received quality feedback for sure. May be in the next edition?

Microsoft DSL Tools

The team of Microsoft Cambridge Research is loyal to the CG conference, and every year they bring us the new features planed for the next edition. I have to said that Jean-Marc Prieur convinced me to download and test the VS2010 Beta 1 to test the new DSL tools we were awaiting for so long!

I took the opportunity to ask Jean-Marc for more integration between DSL Tools and OSLO because having such level of integration should be wonderful for integrating visual and textual DSL in the same model! Later on in the bar, we had a productive discussion about it with Jean-Marc and Stuart Kent.

There was general consensus with my java colleagues in the problems when creating GMF based diagramming. More work should be done on it to improve the maintainability of visual DSL created with Eclipse GMF. Fortunately, DSL Tools is better polished in this aspect.

Partitioning Models for Scalability

This year lots of us came for solutions for making model edition scalable. I am specially happy to see this happen:

  • Markus Völter (Independent/Itemis) & Steven Kelly (Metacase) discuss in their great keynote the need for modulable, partitionable and composable models.
  • Jos Warmer (Ordina) presented us the implementation of the CrossX Broker for the Eclipse environment allowing to partition models inside Eclipse and still having the possibility to have references to external defined parts. To be honest, he had already implemented this a year before in Visual Studio.
  • Jean-Marc (Microsoft) explained about the same similar feature we were demanding from so long in Microsoft DSL Tools: the Model Bus for allowing references between DSL Models.
  • Also I presented a technique and a tool demo for partitioning models in chunks and allow applying Separation of Concerns using partials definitions of models and a merge engine.
Amazing!: all of us so well aligned and without preparing it!


Jos Warmer & Johan Vogelzang (Ordina) presented also their current work on modeling with textual languages, small DSL and Eclipse integration for business applications. Still work in progress on mod4j but more its going to come.

XText & openArchitectuware

The guys from Itemis presented a lot of work in the conference around XText (a Hands-On Workshop), openArchitectuware and their industrial experience with the Germany Stock Exchange (Deutsche Boerse AG).


Martin Thiede presented a fresh approach to code generation based on Ruby (RGen) and the natural meta-programming features of the Japanesse gem. Martin applies his work to create embedded C software for the automotive industry. Our session collided in the time slot (parallel tracks), but he was so kind to show me his material in the BoF time slot. Thank for your kind demonstration Martin! Take a look also to a nice article on InfoQ.

Templates engines

Kathleen Dollard (AppVenture) presented a nice session about Template Specialization comparing XSLT, ASP based templates engines and Microsoft T4 templates. We all agreed in never come back to XSLT due to maintainability issues. I suggested Kathleen to include in the comparison other approaches like StringTemplate. That helps a lot when generating code to keep ourselves focused in the complexity of the transformation and not in the complexity of the template engine.

The T4 engine (included in MS DSL Tools) is a powerfull dark-beast: it can be lots of things, but may be too much for me, indeed. So, I preffer to take a different and more simplier and disciplined approach to code generation using the StringTemplate way. Also discussing about T4 with Jean-Marc, he agreed that providing best practices when dealing with templates for code generation can help T4 users.

Jetbrain’s Meta Programming System (MPS)

Presented by Markus & Konstantin Solomatov (Jet Brains), MPS was the surprise of the conference. MPS provides a new way of editing code (or models, the barrier starts to blur) based in trees forms (non linear text). The code (or model) is created as a tree in the toll. Can not be edited with a traditional editor anymore, however makes unnecessary the usage of parsers. Quite, quite interesting and a future line for language workbenches investigation! There are some usability problems and you can notice it when some tree refactoring in ongoing (for example when changing your input from (1+2)*3 to 1+2*3 .

Still an ongoing work, but quite promising. Some people in the audience said “it’s like the Intentional sw, but working”. I don’t know, really: we will see it when Intentional finally show its product.

Better tools for M2M

Model to Text (M2T) technology is good enough for the mayority of the uses cases you will find.

However Model to Model transformations (M2M) are a hot topic and will continue be till find more natural formalisms to declare, test, debug & eficiently execute as simple as posible the mapping for our desired transformations.

The role of OMG, MDA and the standarization

Is also nice to have in this conferece people like Andrew Watson (OMG) and Steve Cook (OMG expert, first on the IBM side and now at the Microsoft side) to see how the organization evolves MDA and related standards.

Lot’s of us recognized the value of UML, although the so big espefications, sometimes ambiguous semantics and the overloading of the profiles are always a problem for people to fully-understand the semantics behind the pictograms.
For that reason, whenever our domain is out of the scope of the UML (let say User Interfaces to cite one quite clear) some of us prefer to create a custom DSL to deal with it instead of extending and forcing UML.

Some open problems for further investigation

  • Formalism and efficient technology for M2M transformations
  • Debugger capability on models
  • Schema evolution / Model versioning
  • DSL integration / composition
  • Better integration of visual, textual, tabular, form based representation in model editors when needed
  • Standarization of models and tool chains
  • And more…
Of course, there were much more, but four tracks in parallel only allows me to attend to one quarter of the content that was presented. More than once, I wanted to be in four sessions at the same time, but was not possible for me, not yet. 🙂

To sum up, if MDD/MDA/DSL/code generation is on your mind, don’t forget to take a look to Code Generation on the next edition!

Thanks to all participants for making it possible!

And specials thanks goes to Mark Dalgarno, Magg & Andy Moorley for their work on the organization to make this a total success.

Post a comment.