[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.gmt.amw] Re: Bridge between Domain Specific Languages (DSLs) and UML profiles

dear marcos,

thanks for your interesting reply ... I -suprisingly- still have a bunch of questions.

re 1. great ;)

re 2.
So with the auxiliary model in the back transformation this means I would have the problem of weaving 2 models together or refering Objects from my help-model in my dsl-model? Another option would be using IDs in both, right?


Is it possible and wouldn't it be easier to update the uml model?


re 3. > If I understood well, the event-based approach means that when you > modify one element in the UML model, the equivalent element is > automatically updated in the DSL, right? right.

All EMF Elements are notifiers, so I could imagine starting a mini-transformation for the modified element from the source to the target model.

This would also make 2. obsolete, since I would always be working on a main(UML) model.


> An alternative would be to create a weaving model with the mapping
> links and to create a component that interprets these links (and that > does the event-based modifications).


Q1: What do you mean by creating a component that interprets these links ... this sounds like a bunch of work.
Q2: Can I call transformations individual? e.g. Like in the "UML profile use case" of AMW just call the transformation of "profile element" or just "name" of it?
Q2.1: Again, is there a model update which I can use to update just the differences?
Q2.2: If they are callable individal transformations (maybe to create more weaving models can help), what kind of information to they need to fullfil the transformation for an event?



I looked at a setName method of an ecore class named UI_Control to observe the standard notification mechanism of every ecore class.
I saw it provides the notification with a bunch of information:


public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired())
// the information >>
eNotify(new ENotificationImpl(this, Notification.SET, GUIModelPackage.UI_CONTROL__NAME, oldName, name));
//<<
}


I guess I have to provide the matcher with more model information like the container classes of the class fired the notification. e.g. the packackage in which a new element is added.

Maybe EObject eContainer(); can deliver this for me (recusive).

What do you guys think? I could spend max. one week (over 2 month) working on that.

cheers
	stefan



Marcos Didonet Del Fabro schrieb:
Hello,


Some comments about your issues:

1.

AMW is a workbench that supports generic mapping management. The workbench is stable. It can be extended to be used for different mapping tasks, for instance to map between DSLs and UML profiles.

In the DSL2Profile use case, we develop a weaving model which is a mapping between a UML profile and a DSL for MOF.

This mapping table is equivalent to the situation illustrated in your figure in the "Connecting DSL-eCore w/ UML2" post. This means AMW could be used to develop such mappings.

2.

In this use case we do not handle possible data loss issues. One possibility would be to create an auxiliary model that is generated in the same time you transform a Profile into a DSL. The transformation that translates the model back should handle this auxiliary model as well.

3.

If I understood well, the event-based approach means that when you modify one element in the UML model, the equivalent element is automatically updated in the DSL, right?
The transformations are typically developed to translate a whole input model into a whole output model. So, even if you have an event that triggers one transformation, it would regenerate the output model entirely.
An alternative would be to create a weaving model with the mapping links and to create a component that interprets these links (and that does the event-based modifications).



Regards,

Marcos.


SKuhn wrote:
hi folks,

I have a similar use case as described in http://www.eclipse.org/gmt/amw/usecases/umlprofiles/.

In short terms I want to work on an UML Model, translating every DSL-Class to an UML Class with a stereotype of a self-defined UML-profile (lightweight) and back. It should look for my GMF-DSL Editor that he's working on his DSL-Metamodel (described in ecore).

Now I have some concerns using AMW:

1. Is AMW ready for productive use?
2. How can I handle possible data loss for UML Elements that are not representable in MyDSL-MM? I still want to read/write UML Models (or UML conform XMI files) leaving unrecongnized uml-elements unchanged.
3. Is it possible to run the corresponding transformations (EMF) event based? Thereby I could have both models in sync resulting in the option to open Eclipse UML2 editor and my own GMF-DSL-Editor at the same time and work on the same model without versioning conflicts. (optional)


Right now I'm not sure if AMW is the right way. If you want to take a closer look on my set-up / point-of-view, I already described my problem in detail in "Connecting DSL-eCore w/ UML2" at
eclipse.tools.emf as well as
eclipse.modeling.gmt as well as
eclipse.modeling.mdt.uml2tools as well as
eclipse.modeling.mdt.uml2.



Yours sincerly stefan