Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M2T Usage #16

Open
LeeYufang opened this issue Aug 3, 2017 · 3 comments
Open

M2T Usage #16

LeeYufang opened this issue Aug 3, 2017 · 3 comments

Comments

@LeeYufang
Copy link

Hi,
Sorry to disturb you again.
I have leart cps benchmark m2t for a long time and I have implemented m2t for another sample model with your means in cps benchmark. But It seems that your means is a little difficult.
Do you have a tutorial or more related materials for m2t?

@abelhegedus
Copy link
Member

We don't have a specific M2T tutorial, but if you would like to see a more complex example of a (partially) incremental M2T implementation, you could dive into the EMDW-MC code.
I suggest you read the wiki and then start exploring the code related to the M2T part:

@LeeYufang
Copy link
Author

I have read the wiki and codes of EMDW-MC M2T part. For my understanding, end-user right clicks the menu "Generate CPP code for selected UML model" in model explore, the execution will go into "com.incquerylabs.emdw.cpp.ui.UmlHandler" , the M2M and M2T transformation will be executed. Am I right? If so , why the "toolchain.startChangeMonitor" task is put after the "toolchain.executeDeltaCodeAndFileGeneration" ? Sorry, I am not completely understanding your work flow.
And if M2M and M2T both can be implemented by the incremental way with explicit traceability, can they use the same implementation process?
Thanks and hope for your reply.

@abelhegedus
Copy link
Member

I have read the wiki and codes of EMDW-MC M2T part. For my understanding, end-user right clicks the menu "Generate CPP code for selected UML model" in model explore, the execution will go into com.incquerylabs.emdw.cpp.ui.UmlHandler , the M2M and M2T transformation will be executed. Am I right?

Yes, that is correct. The generation itself can be observed in the GeneratorJob

If so , why the "toolchain.startChangeMonitor" task is put after the "toolchain.executeDeltaCodeAndFileGeneration" ? Sorry, I am not completely understanding your work flow.

The same GeneratorJob is used for transforming the complete model and to incrementally update the generated code later. The first time we will go through the complete code generation, then start the change monitor to identify components that change later and use this information to run the code generation on the delta only.

And if M2M and M2T both can be implemented by the incremental way with explicit traceability, can they use the same implementation process?
Thanks and hope for your reply.

The explicit traceability approach can be used if you can use a proper EMF model for traceability, while in an M2T usage, it is usually hard to create traceability to text artifacts. It is probably possible to use the same "process" if you create some kind of detailed traceability information, but for the EMDW-MC toolchain, we opted to create a "dirty incremental" M2T step, where the change monitor examines model modifications on the source model to identify affected high-level elements (Components) and the code generation can be re-executed on those elements (instead of the complete model).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants