Skip to main content

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

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

 

 

 

Attachment: cd2_different.uml
Description: cd2_different.uml

Attachment: cd2_test2.henshin
Description: cd2_test2.henshin

Attachment: cd2_test2.henshin_diagram
Description: cd2_test2.henshin_diagram


Back to the top