[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[oaw-wg] New execution backend for M2T
|
Hi all,
as some of you may know, Arno and I have been working on a new execution
backend for M2T. The initial goal was to build a compiler for Xtend and Xpand.
It became evident, that it would be better to spilt the compilation process
into two parts:
- transforming the language dependent frontend AST into a language independent
AST
- and finally compile this language indepentent backend AST to optimized
executable code
This would result in a more generic compiler that is language independent. I
would be possible to mix M2M ans M2T code of various languages like Xpand,
Xtend and OCL. Only a component to transform the AST of the frontend language
to the backend AST would be needed.
I already implemented middleend components for Xpand and Xtend that perform
this transformation into the backend AST.
I assembled a simple example based on an EMF metamodel, that shows that even
though the backend AST is still interpreted, performance could be improved for
large models. Once the compiler is implemented, this should also apply to
smaller models.
The workflow looks similar to workflows using the existing Xpand and Xtend
components. Only the middleends for the languages Check, Xtend and Xpand need
to be declared. Of cause new components have been introduced replacing the
existing CheckComponent, XtendComponent and Generator.
Before running the example, you need to checkout from CVS, build and install
the features/plugins:
- org.eclipse.xtend.backend
- org.eclipse.xtend.backend.uml2types
- org.eclipse.xtend.middleend.xpand
- org.eclipse.xtend.middleend.xtend
Alternatively, you may use the attached plugins.
I would be glad, if you could have look at the example and give me your
feedback. I would be also interested in test results especially with large
models that you have been working with.
I will also provide an example that uses the UML2 typesystem.
Cheers
André
Attachment:
test.generator.project.zip
Description: Zip archive
Attachment:
plugins.zip
Description: Zip archive