Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-user] delete node problem

Sorry bad-wording by the code I just meant running the transformation just by 'apply transformation' on the files. I just want it to find a match.


I cannot anyhow specify that containment edge between EReference and EPackage in the Henshin editor, it doesnt let me connect them. And if that was the problem then why does it find a match in the ecore file but not in the behavior file? Because my main problem is that it works/finds a match when run on the server2.ecore file but when adding  a 'top layer' to run it on server3.behavior :Behavior -> :MetamodelGD - > :PackageGD it doesn't find  a match anymore  but these only provide the reference to the ecore file so it doesn't make any sense.


Thank you,

Kinga



From: henshin-user-bounces@xxxxxxxxxxx <henshin-user-bounces@xxxxxxxxxxx> on behalf of Daniel Strüber <strueber@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sent: 23 June 2017 11:26:31
To: Henshin Project user discussions
Subject: Re: [henshin-user] delete node problem
 
Hello Kina,

Am 23.06.2017 um 12:06 schrieb Bojarczuk, Kinga:

Hello,


I'm working on this project on e-motions files so basically there's a .behavior file which is linked to .gcs which is linked to .ecore file and together they represent a graph transformation system. So what I'm trying to do is to delete EReference from .ecore file between the object that has some subclasses and another object. (First rule in my henshin file) This should find a match as it exists in a server2.ecore file however for some reason it doesn't.

To understand why the rule cannot be applied, it's crucial to know that Henshin aims to ensure that output models of a transformation are well-formed: in particular, it aims to ensure that rule applications never leave behind "dangling edges". In your example rule, since you do not specify the deletion of the containment edge between the :EPackage and the :EReference, this edge would be left behind as dangling, so Henshin won't apply the rule.

To make the rule applicable, it should be sufficient to specify the deletion of the aforementioned containment edge. (Another option is to the set the "checkDangling" attribute in the rule to "false", however, in this case, you may lose well-formedness guarantees.)


When I run the code straight on the server2.ecore (by starting with EPackage in my rule) file or server2.gcs (by starting with MetamodelGD in my rule) file it works and finds a match but when running on server3.behavior file something suddenly prevents it from finding a match which is really weird as .behavior file just provides a reference to the other files so since it works when run straight on them it should work on the the behavior file as well.

I can't find the code you mention in these statements. The zip file only contains the models and Henshin files.


Best regards,
Daniel

The Second rule shows the solution that we thought might work as Links in .behavior file are linked to EReferences so we thought this might prevent deleting EReferences but it doesn't work either.

The Third rule shows something that works but is a rather 'unclean solution' as it only deletes all the edges and doesn't actually delete the node.

So any idea why running my rule on .behavior file suddenly prevents it from finding a match? It seems really weird so I'd appreciate some help. I've included a zip file with my project.


Thank you,

Kinga



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


Back to the top