[great-users] Need to compile only the relevant partsinmodeltransformations
Gürkan Özhan
gurkanozhan at gmail.com
Mon May 4 18:22:15 CDT 2009
Daniel,
Thankyou very much, your advice worked fine. Let me add some
practical details. In order to see the "Run Interpreter" menu item
under the File menu, there must be at least one model element (rule,
package, etc.) opened in GME. Alternatively, even if nothing is open,
one can right click on any element on the browser tree and select
Interpret. Then a dialog opens, you select the "Generate GR"
interpreter, and click the Interpret... button. I think I've done this
before I wrote my first mail to the group, but since the
interpretation does not notify the user with a message box (may be you
should consider doing so in the next release), I thought it did
nothing. (Well, only a sand box timer appears for a moment, that's it)
The only way to understand that it actually did the interpretation is
to check the new modification date of the <YourModelTrans>-gr.xml file
in the directory. After that invoking the GR Engine executes the newly
modified rules as expected. This really saves time!
I did not try the code generation and running that code from VS2008
this time. I tried that some time ago, but quit spending more effort
after receiving compile time and/or runtime errors. May be in the
future when my transformation rules takes too much time to execute, I
will have to go for that as well. Just for the time being, the first
solution mentioned above is fine for me. I might disturb you some time
later if I have any further issues.
I thankyou again for your quick cooperation and help. Best regards,
Gurkan Ozhan
On Sun, May 3, 2009 at 7:50 AM, Daniel Balasubramanian
<daniel at isis.vanderbilt.edu> wrote:
> Gurkan,
>
> I should mention one more thing: whenever you run the GReAT Master Interpreter, it always re-generates all of the .h and .cpp files for all of the meta-models, and if this happens, they will have to be re-compiled if you're using the GR-Engine. The best way to avoid always re-generating all of the files is to only run the necessary interpreters by going to File > Run Interpreter...
>
> Hope this helps,
> Daniel
>
>
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu on behalf of Daniel Balasubramanian
> Sent: Sat 5/2/2009 11:49 PM
> To: great-users
> Subject: Re: [great-users] Need to compile only the relevant partsinmodeltransformations
>
> Hi Gurkan,
>
>>1. How can I only run the GenerateGR interpreter? Is it through the
> CodeGenerator or the GReAT Master Interpreter? I could not see an icon
> or a way to solely invoke the GenerateGR intrepreter
>
> >From the GME window, if you File > Run Interpreter, you should see an option such as "Generate GR Transformation Rules" -- if you run only this interpreter, it should generate only the transformation rules.
>
>>2. I tried my best to understand your second recommendation, but
> could not adequately understand it. Could you elaborate on that a
> little more? With IDE dou you mean VisualStudio?
>
> When you run your transformations using the GReAT Master Interpreter, you're using what we call the "GR-Engine", which is an interpreted way of running the transformation. If you use the Code Generator (for steps on how to do this, look in the /doc directory at either the GReAT Manual or the Step-by-step-guide.pdf), then you get a visual studio project and code that you can compile. Compiling this code gives you an executable that you can then use to run your transformations (and this .exe is usually ~10x faster than the GR-Engine with tests run in the past). If you use the code generator, then part of what gets generated includes the .h and .cpp files for the meta-model(s). By keeping all of these generated files in an external directory, you can control when they get reloaded into the IDE (Visual Studio in this case). This way, if you need to re-generate your transformation (for instance, because the rules changed, but not the meta-models) then the .h and .cpp files for the meta-model(s) don't get reloaded automatically by the GReAT Master Interpreter, and you can simply reload only the .h and .cpp files for the transformation rules inside Visual Studio, and only they will get re-compiled.
>
> Please let me know if you need more help with any of this, I'm glad to assist you.
>
> Thanks,
> Daniel
>
> -----Original Message-----
> From: great-users-bounces at list.isis.vanderbilt.edu on behalf of Gürkan Özhan
> Sent: Sat 5/2/2009 6:57 PM
> To: great-users
> Subject: Re: [great-users] Need to compile only the relevant parts inmodeltransformations
>
> Hello Daniel,
> Unfortunately I could not try either of your proposed methods.
> 1. How can I only run the GenerateGR interpreter? Is it through the
> CodeGenerator or the GReAT Master Interpreter? I could not see an icon
> or a way to solely invoke the GenerateGR intrepreter
> 2. I tried my best to understand your second recommendation, but
> could not adequately understand it. Could you elaborate on that a
> little more? With IDE dou you mean VisualStudio?
>
> I am currently trying the GReAT master interpreter in running my
> transformations.
>
> Thanks in advance,
>
> Gurkan
>
> On Sun, May 3, 2009 at 12:09 AM, Daniel Balasubramanian
> <daniel at isis.vanderbilt.edu> wrote:
>> Hi Gurkan,
>>
>> For a quick solution, you can try one of the following.
>>
>> (1) Only run the GenerateGR interpreter so that the metamodels are not regenerated by UDM and subsequently recompiled, or if that doesn't work,
>> (2) Use the code generator, and instead of keeping the files in the default directory (/gen), keep all the files in a separate directory and have a script which copies *only* the generated transformation rules from /gen to the new directory and that way the IDE will see the metamodels haven't changed and won't try to recompile them.
>>
>> Are you currently using the GR-Interpreter or the Code Generator to run your transformations?
>>
>> Thanks,
>> Daniel
>>
>> -----Original Message-----
>> From: great-users-bounces at list.isis.vanderbilt.edu on behalf of Gürkan Özhan
>> Sent: Sat 5/2/2009 6:46 AM
>> To: great-users
>> Subject: [great-users] Need to compile only the relevant parts in modeltransformations
>>
>> Dear All,
>> I am not sure, but a similar mail might have been posted to the
>> list before. Therefore my apologies if the same question was arised,
>> but I am really frustrated with the time it takes in my model
>> transformations. My source and target metamodels are quite big (each
>> about 4-5 Mbytes of mga files). Moreover my transformation definitions
>> are also considerably large, and seem to grow even further. For the
>> time being, only the compilation of the metamodels and the model
>> transformation definitions when executing the GReAT master interpreter
>> on my computer takes roughly about 10 minutes. I am desperately
>> seeking to shorten this painful process. The most obvious efficiency
>> to achieve is to avoid the re-compilation of the source and target
>> metamodels each time a change pertaining to the rule definitions is
>> made. I would be grateful if somebody provides me an advice on this.
>> Any other hints and tips to reduce model-to-execution time is
>> appreciated
>> Best regards.
>>
>> Gurkan Ozhan
>> _______________________________________________
>> great-users mailing list
>> great-users at list.isis.vanderbilt.edu
>> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
>>
>>
>>
>>
>> _______________________________________________
>> great-users mailing list
>> great-users at list.isis.vanderbilt.edu
>> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
>>
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
>
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
>
> _______________________________________________
> great-users mailing list
> great-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/great-users
>
More information about the great-users
mailing list