SV: [gme-users] Transforming models into source code (e.g. C)

Jesper Berthing jbe at cfsi.dk
Fri Feb 3 01:33:32 CST 2006


Hi Attila,

Thanks. I will try and se how far I get, it seems resonable "simple". :-)

Jesper

-----Original Message-----
From: gme-users-bounces at list.isis.vanderbilt.edu on behalf of Attila Vizhanyo
Sent: Wed 2/1/2006 5:41 PM
To: gme-users
Subject: Re: SV: [gme-users] Transforming models into source code (e.g. C)
 
>
> I have installed GReAT and looked into the samples included in the 
> distribution. It is difficult for me to see the big picture of how to 
> construct and separate the transformation rules in the right way 
> (where should I start). I will try to run the samples in the GReAT 
> debugger.

Please have a look at our tutorial to get started 
(GReAT\doc\Step-by-step GReAT Guide.pdf)

>  
> I have read your paper (Model-Driven Software Development of 
> Model-Driven Tools: A Visually-Specified Code Generator for 
> Simulink/Stateflow), that describes how a SF model is transformed into 
> source code, this is actually what I am looking for.
>  
> From the paper I understand that the source code is generated 
> directly using GReAT, could you describe the workflow of the tool 
> implemented in GReAT? how you generate source code directly, if I 
> understand the paper correctly.

The catch is that we created a metamodel for a stylized subset of C, 
called SFC. During the transformation, various SFC model objects are 
created upon finding various patterns of objects in the input StateFlow 
model. The GReAT code generator creates C++ code out of the GReAT 
transformation; this code is embedded into a Visual Studio C++ project, 
that contains (aside from the generated transformation code) a very 
straigtforward printer module, that traverses the SFC model, and prints 
out C code into a text file.

>  
> From looking at the interpreter and GReAT approach, I think that 
> building an interpreter is the fastest approach right now. But I 
> expect the source model to be extended through the development, so 
> GReAT would probably be the right solution for us in the end. What you 
> said in your recommendations.

As I said, if you need to write a simple transformation only, BON 
interpreters suffice.
If you plan to extend the metamodels, or add complexity to the 
transformation, then going with GReAT will certainly help you to manage 
and maintain the transformation.

HTH,
Attila

_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3978 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20060203/f20bb723/attachment.bin


More information about the gme-users mailing list