Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Modular code generation?
[Xpand] Modular code generation? [message #521264] Tue, 16 March 2010 23:39 Go to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Hi there,

are there any attempts in Xpand to get modular code generation?

By that I mean two things:

* Generate only parts of the model, e.g. to speedup codegen if only
parts have changed.
* Support Multiple Targets, e.g. for embedded applications, e.g. to
switch easily the templates or even only small parts of them. Rationale:
in embedded applications the generated code (often C) looks quite
similar for different platforms. Only very specific parts, e.g. I/O, is
different.

Cheers,
Hauke
Re: [Xpand] Modular code generation? [message #521305 is a reply to message #521264] Wed, 17 March 2010 08:39 Go to previous messageGo to next message
MaximeLecourt  is currently offline MaximeLecourt Friend
Messages: 108
Registered: February 2010
Location: France
Senior Member
To generate only parts of the models, you can use use Globalvars in your workflow. You still have to set or unset them, but you only have to modify that each time you want to generate anything. There might be other ways, but I'm still new to Xpand.

For your second point, define your templates in different files. Then you just load the one you need, via Xpand or via the workflow.


One day I shall master M2T, but that day has yet to come...
Re: [Xpand] Modular code generation? [message #521310 is a reply to message #521264] Wed, 17 March 2010 08:47 Go to previous messageGo to next message
Darius Jockel is currently offline Darius JockelFriend
Messages: 63
Registered: July 2009
Member
Hauke Fuhrmann

Hi there,

are there any attempts in Xpand to get modular code generation?


Yes, there are a lot.
But every good MDSD Framework should have Smile

Quote:

By that I mean two things:

* Generate only parts of the model, e.g. to speedup codegen if only
parts have changed.


Since 0.8.0 Xpand provide a incremental generation facility.
The function is the same like the one you described.
Quote:

* Support Multiple Targets, e.g. for embedded applications, e.g. to
switch easily the templates or even only small parts of them. Rationale:
in embedded applications the generated code (often C) looks quite
similar for different platforms. Only very specific parts, e.g. I/O, is
different.


Xpand provide different features to support different plattforms or customizing of generators.
Inside a MWE workflow you can define several generators for different plattforms.
The generators can be configured easily by property files.
Another way for changing only snippets of generated code is to use AOP to override several templates or extensions.

Regards
Darius
Re: [Xpand] Modular code generation? [message #521455 is a reply to message #521310] Wed, 17 March 2010 11:16 Go to previous messageGo to next message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Darius Jockel schrieb:
>> are there any attempts in Xpand to get modular code generation?
> Yes, there are a lot.
> But every good MDSD Framework should have :)

Thanks for the answer, Darius. But I guess a full documentation of these
approaches will only be available with the 0.8 release?

Hauke
Re: [Xpand] Modular code generation? [message #521506 is a reply to message #521310] Wed, 17 March 2010 20:02 Go to previous message
Hauke Fuhrmann is currently offline Hauke FuhrmannFriend
Messages: 333
Registered: July 2009
Senior Member
Darius Jockel schrieb:
>> are there any attempts in Xpand to get modular code generation?
> Yes, there are a lot.
> But every good MDSD Framework should have :)

Thanks for the answer, Darius. But I guess a full documentation of these
approaches will only be available with the 0.8 release?

Hauke
Previous Topic:[Xpand] Affectation problem
Next Topic:[Xpand] assignement in Xpand
Goto Forum:
  


Current Time: Fri Apr 26 03:44:37 GMT 2024

Powered by FUDForum. Page generated in 0.03267 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top