Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Modular code generation?
[Xpand] Modular code generation? [message #521264] Tue, 16 March 2010 19:39 Go to next message
Eclipse UserFriend
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 04:39 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: [Xpand] Modular code generation? [message #521310 is a reply to message #521264] Wed, 17 March 2010 04:47 Go to previous messageGo to next message
Eclipse UserFriend
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 07:16 Go to previous messageGo to next message
Eclipse UserFriend
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 16:02 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 20:02:18 EDT 2025

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

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

Back to the top