Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Troubles with xmiIDs, rule inheritance(can't get xmiID)
[ATL] Troubles with xmiIDs, rule inheritance [message #698304] Tue, 19 July 2011 08:37 Go to next message
A Vernotte is currently offline A VernotteFriend
Messages: 21
Registered: June 2011
Junior Member
Hi,

I'm currently trying to perform a UML to "my UML-like metamodel" transformation. To accomplish that I need to extract xmiIDs from UML elements, and assign them to each created target element. As you may have figured out, I'm stuck.

First, as mentioned in a previous topic (eclipse.org/forums/index.php/t/210173/), it seems impossible to export xmiIDs using EMF-specific VM. Well, I found two cases where I could get them properly : either by storing them into String Attributes, or by removing every link of the element with others (for instance, my root Element "Model", has a xmiID). Those are not solutions however.

Also, I'm using rule inheritance since I have in my metamodel an abstract Element, which every other elements inherit from. While I can access xmiIDs (well, at least there is no error) with the simple assignment "__xmiID__ -> uml.__xmiID__" in any matched rule, I can't extend an abstract rule that uses this assignment because I get an error as soon as I save the ATL file :
org.eclipse.m2m.atl.engine.emfvm.VMException: Unable to access __xmiID__ on OclUndefined
	at process_checkSubRules#31(ATLCompiler.atl[685:5-685:33])
		local variables: self=IN!abstractElt, forEach=Sequence {IN!Package, IN!Class, IN!Operation}, subRule=IN!Operation, forEach=Sequence {IN!<unnamed>}, ipe=IN!<unnamed>
	at process_matcher#188(ATLCompiler.atl[597:7-597:38])
		local variables: self=IN!abstractElt, forEach=Sequence {IN!<unnamed>}, ipe=IN!<unnamed>
	at process#6(ATLCompiler.atl[552:3-552:28])
		local variables: self=IN!abstractElt
	at process#2066(ATLCompiler.atl[463:3-463:24])
		local variables: self=IN!uml2uml4tst
	at main#37(ATLCompiler.atl)


I'm very new to this tool/language. Maybe I'm doing it all wrong ?

Thank you,
A. Vernotte.
Re: [ATL] Troubles with xmiIDs, rule inheritance [message #698325 is a reply to message #698304] Tue, 19 July 2011 09:17 Go to previous message
A Vernotte is currently offline A VernotteFriend
Messages: 21
Registered: June 2011
Junior Member
I found why it wasn't working with rule inheritance...

"ATL guide"

  • input pattern variables names have to be the same in super and sub rules.
  • output pattern variables names have to be the same in super and sub rules for output pattern you want the union.



I can now use inheritance properly, sorry for posting before looking in the manual...
I still have xmiID problems though.

A.Vernotte.
Previous Topic:[QVTO]Remove attributes from classes in a UML
Next Topic:[ATL] Calling methods defined in Java in ATL transformations
Goto Forum:
  


Current Time: Mon Dec 22 07:16:28 GMT 2014

Powered by FUDForum. Page generated in 0.08708 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software