Sunday, August 31, 2008

Using The Meta-Environment for Model Driven Engineering

During the last week of August, the 16th Joint Smalltalk Conference of the European Smalltalk User Group (ESUG) was held in Amsterdam, at CWI. As part of the "meta-modelling" day (Tuesday) I gave a talk on how the ASF+SDF Meta-Environment could be used for Model Driven Engineering (MDE).
During the discussion there seemed to be some interest as to how the Meta-Environment relates to OMeta, developed by Alessandro Warth. In this post I would like to clarify some of the distinctions.
First of all OMeta uses a grammar formalism that is based on parsing expression grammars (PEGs), whereas the Meta-Environment is based on the syntax definition formalism (SDF), which allows the specification of arbitrary context-free grammars (CFGs). As a result, in Ometa, you won't risk writing ambiguous grammars (that is, grammars which allow multiple derivations for the same string). However, you will have to mould your language's grammar until it fits the PEG framework. In SDF you can write your grammar much more declaratively, and use the full power of CFGs to describe your language. As a consequence, there is a risk of ambiguity. SDF provides a number of disambiguation constructs to amend this situation (follow restrictions, priorities, rejects).
Another difference between OMeta and the Meta-Environment is how languages are given semantics. In the Meta-Environment, all computation is done using (source-to-source) transformation. This means that grammars do not have semantic actions that are executed during parsing. Instead, a transformation engine can be provided with a set of rewrite rules that transforms one language to another. Interpretation, compilation, type checking etc. are all implemented as source-to-source transformations. In OMeta, on the other hand, grammar rules are decorated with semantic actions that are executed during parsing. These actions are written in an (general purpose) OMeta host language (which is a parameter of OMeta).
If you look at these distinctions, one could say that OMeta is better at defining (small) interpreters that require a general purpose language and a full-fledged host environment. On the other hand, the Meta-Environment is better fit for constructing compilers and code generation because compilers are essentially (source-to-source) transformations. In addition, the generality of the parsing technology behind the Meta-Environment allows it to be used for other task as well: analysis and transformation of legacy systems. Currently, when implementing a Domain Specific Language (DSL) using the Meta-Environment one has to resort to code generation for integration with the environment (e.g. for dealing with stuff like files, databases, GUI libraries, sockets etc. — anything that cannot be easily expressed as source-to-source transformation...). It would be interesting to see if the parsing power of SDF could be combined with the(much more dynamic and late-bound) interpretation model of OMeta to make the development of DSLs more light-weight.

Thursday, August 28, 2008

LDTA 2009

http://www.ldta.info publishes call for papers for LDTA 2009

Thursday, August 21, 2008

New webserver for www.meta-environment.org

http://www.meta-environment.org moved to its own server hardware. To facilitate future growth and to bundle the web servers for The Meta-Environment open source project a new server was installed. The first site to move was www.meta-environment.org itself. Later bugzilla and sisyphus will follow.