Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-user] How to best debug an inexectuable transformation?

Another issue may result from how you programmatically load the models and metamodels. Especially if you are using dynamic EMF, where the metamodels live in the workspace rather than the EMF registry, you have to be very careful when setting up your HenshinResourceSet and the rule and model files to make sure they do not accidentally load separate in-memory copies of the meta-model. Because Henshin matches objects by looking at the EClass object (not the EClass name) they refer to, loading two different in-memory representations of the meta-model will invariably lead to having no matches for your rules.

To avoid this, make sure the meta-model is referenced everywhere with exactly the same string (be that an absolute or relative path or a URL) and that both the model and the rules are loaded through the same resource set. This way, the resource set's registry will make sure to reuse the meta-model for both model and rules.

Best,

Steffen


On 04/10/2017 14:03, Daniel Strüber wrote:
Hi Roland,

Am 04.10.2017 um 14:04 schrieb Kluge, Roland:
Hi Daniel,

Thanks for the quick response!

        This means you're working with UML profiles?
        This makes things a bit complicated indeed, including the setup of
the 
environment.

No, indeed the similarity is that I can execute the rule without problems,
using the GUI, but fail to have the transformation run using the Java API.
A shot in the dark: Are you using the same EMF mode (static vs. dynamic) for the meta-model imports in the Henshin files and the input models? I recently learned that the GUI tolerates a certain mismatch which is not tolerated by the API: dynamic EMF (e.g., workspace paths) in the Henshin files + static EMF (NS URIs) in the models.


Best regards,
Daniel


          http://download.eclipse.org/modeling/emft/henshin/updates/nightly/
OK, great - I'll try this out!

Best,
Roland



-----Ursprüngliche Nachricht-----
Von: henshin-user-bounces@xxxxxxxxxxx
[mailto:henshin-user-bounces@xxxxxxxxxxx] Im Auftrag von Daniel Strüber
Gesendet: Mittwoch, 4. Oktober 2017 12:41
An: Henshin Project user discussions <henshin-user@xxxxxxxxxxx>
Betreff: Re: [henshin-user] How to best debug an inexectuable
transformation?

Hi Roland,


Am 04.10.2017 um 11:02 schrieb Kluge, Roland:


	Dear Henshin developers,

	I am new to using Henshin and still struggeling to get a simple
	transformation (in fact: a "match-only rule") running.
	I suspect that it could be a simliar issue as reported in
	https://dev.eclipse.org/mhonarc/lists/henshin-user/msg00036.html .

This means you're working with UML profiles? This makes things a bit
complicated indeed, including the setup of the environment.




	Therefore, I would like to debug the transformation process
(Java-code level
	is fine!).

	Is there a simple way to install the source code such that I can
debug the
	transformation process?

Coincidentally, we support such a simple way since 2 weeks: The
nightly-build update site now has a "source" feature. See
http://download.eclipse.org/modeling/emft/henshin/updates/nightly/




	Is there another way of executing the transformation that gives me,
e.g., a
	status report/a partial match/...?

For the inter-rule level, there is the concept of ApplicationMonitor - see
https://wiki.eclipse.org/Henshin_Interpreter

Unfortunately, for the intra-rule level, which seems to be the scope here,
I can't point you to anything at the moment. Debugging Henshin is actually
an active research area, and we hope to make some progress on this in the
future (CC'ing Matthias Tichy, who's working on that.)

Best regards,
Daniel






	Best,
	Roland



	_______________________________________________
	henshin-user mailing list
	henshin-user@xxxxxxxxxxx <mailto: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




_______________________________________________
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



_______________________________________________
henshin-user mailing list
henshin-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://emea01.safelinks.protection.outlook.com/?url="">

-- 
Dr. rer. nat. Steffen Zschaler AHEA
Senior Lecturer

King's College London
Department of Informatics

Email szschaler@xxxxxxx
Phone +44 (020) 7848 1513
WWW   http://www.steffen-zschaler.de/

Back to the top