Skip to main content



      Home
Home » Modeling » ATL » Some created elements are not serialized(What can prevent it?)
Some created elements are not serialized [message #1863518] Wed, 07 February 2024 08:27 Go to next message
Eclipse UserFriend
The attached archive contains a modified version of the "UML2OWL" transformation initially written by Guillaume Hillairet. It has been adapted to work with EMFTVM plus other miscellaneous changes.

The launcher provided executes this transformation on the UML PrimitiveTypes Library of Eclipse. According to the traces generated by the execution, the RDFSDataypes corresponding to the primitive types defined in the library are actually created but they are not visible in the resulting ecore file. Instead, only the corresponding URI are, while they are a secondary target of the matching rule that
should transform the primitive type (i.e. PrimitiveType2RDFSDataType).

I created a lazy version of that matching rule (PrimitiveType2RDFSDataType_lazy). If the transformation is modified in order to executed it for all the primitive type instances. The corresponding RDFSDataType are serialized in the resulting ecore file.

How can we explain this behavior and how can I fix it so that the matching rule works as expected?
Re: Some created elements are not serialized [message #1863533 is a reply to message #1863518] Wed, 07 February 2024 15:49 Go to previous messageGo to next message
Eclipse UserFriend
The rules are firing correctly, but something goes wrong in serialization, because elements that end up outside the output EMF Resource do not get included in the output file. I'm suspecting lots of elements are created twice, but that doesn't explain why some elements end up outside the EMF Resource. EMFTVM checks for each output element whether it is contained by another element or not. When it is not contained, the element is added to the output Resource explicitly. OWL.ecore is a plain Ecore metamodel, without any special behaviour.

When removing everything from your transformation module except the PrimitiveType2RDFSDataType rule, everything works. You could try to reconstruct the transformation rule by rule, until it stops working...
Re: Some created elements are not serialized [message #1863584 is a reply to message #1863533] Tue, 13 February 2024 11:23 Go to previous message
Eclipse UserFriend
Hi Dennis,

Thank you.

Actually I discovered can fix it by changing the order in which the target are specified in the rule PrimitiveType2RDFSDataType:
	to
		x_uri : OWL!UniformResourceIdentifier ( 
			name <- p.name--thisModule.primitiveTypeMap.get(p.name) 
		),
		x : OWL!RDFSDataType (
			uriRef <- Set{x_u}
		),
		x_u : OWL!URIReference (
			uri <- x_uri
		)

Works (i.e. RDFSDataTypes are serialized in the file together with the URIs)...

While
	to
		x : OWL!RDFSDataType (
			uriRef <- Set{x_u}
		),
		x_u : OWL!URIReference (
			uri <- x_uri
		),
		x_uri : OWL!UniformResourceIdentifier ( 
			name <- p.name--thisModule.primitiveTypeMap.get(p.name) 
		)

Does not works (i.e. RDFSDataTypes are NOT serialized in the file)!

Yves
Previous Topic:How do I get the runtime of a model transformation?
Next Topic:Bug in the ATL editor?
Goto Forum:
  


Current Time: Fri Jul 04 10:40:38 EDT 2025

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

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

Back to the top