Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Question on matching a UML model

Hi Vlad,

you should specify only one :Type node in your rule. Both :Property nodes should point to this :Type node. This make sure that it is really the same type, independently from its name.

Cheers,
Christian

2014-12-17 10:59 GMT+01:00 Vlad Acretoaie <rvac@xxxxxx>:

Hi,

 

I routinely use Henshin to transform UML models, and I sometimes come across tricky situations such as the one I describe below. It is not really a Henshin issue – it is more likely caused by how UML is implemented in Ecore. Still, I am running out of ideas, so I thought I could ask here.

 

I have a source model containing two Classes, each having one attribute. The attributes have different types. I would like to write a Henshin transformation that matches two Classes only if they have an attribute of the same time. So, my Henshin transformation should not match my source model. However, it does.

 

The problem lies with the Type nodes in the Henshin transformation. It is, as far as I can tell, impossible to state which UML PrimitiveType they represent. Their name meta-attribute is blank (even though according to the UML standard it should not be), and by looking at the UML file in text mode I can see that the “type” tags only contain a “href” attribute as identification. However, no href Attribute is available in the Henshin transformation.

 

In this case, how could I write the Henshin transformation such that it fails to match my source model?

 

The source model and the Henshin transformation are attached.

 

Cheers,

Vlad

 

Vlad Acretoaie

PhD student

DTU Compute

 

Technical University of Denmark

Department of Applied Mathematics and Computer Science

Matematiktorvet

Building 303B, Room 055

DK - 2800 Kgs. Lyngby

Denmark

Direct +45 45253645

rvac@xxxxxx

www.compute.dtu.dk/~rvac

 

 

 


_______________________________________________
henshin-dev mailing list
henshin-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/henshin-dev


Back to the top