Friday, April 30, 2010

Acceleo 3.0 : a pragmatic implementation of an OMG specification

With Acceleo 3.0 included in Eclipse 3.6, our goal is to provide the de facto or reference implementation of the MTL code generation standard. Yet some parts of the specification are still quite vague and ambiguous and collaboration with OMG isn't smooth ... We follow as much as possible the standard but sometimes we need to introduce some deflections with the specification because we would like to keep the exemplary pragmatism of the Acceleo.org 2.x version.

For instance, we sometimes need to wrap Java services. It is useful to invoke some java code from inside an Acceleo template. The acceleo non-standard library provides a service "invoke" which allows just that. The invoked java service is wrapped in an Acceleo query. Such a service isn't defined in the specification but it is necessary in an Eclipse pragmatic implementation. For this reason, we decided to define 2 compilation modes in the Acceleo Compiler properties page. The default value is "false" for the "Strict MTL compliance" property. "unchecked" means that we allow to use the pragmatic non-standard library. When you check this value, some syntax errors could appear on your MTL files (each time you use the non-standard library) but the code generation execution still works...