Unable to resolve OCL pivot variable types in standalone mode during an ATL transformation [message #1706844] |
Mon, 31 August 2015 13:04 |
Mathias K Messages: 16 Registered: March 2014 |
Junior Member |
|
|
Hello,
I have developped an ATL transformation using the OCL pivot abstract syntax metamodel as input.
Since I don't know if my problem (below) is related to ATL or OCL's standalone initialization, or some interaction mechanics, I have posted this in both forums.
The transformation runs without troubles when running the transformation directly inside Eclipse Modelling (using ATL's launch configuration for instance).
It also works when invoking programmatically the ATL transformation inside an Eclipse environment with the OCL/ATL plugins loaded.
However when I try to run the transformation standalone, the references "type" of OCL variables seems to be only partially defined (at least for ATL).
Concretely, a rule like the following one (the target object, here an ecore eclass, is only for the example and is not relevant to my problem, only the ATL debug messages on the input model matter) :
rule Variable2Debug {
from
s : OCL!Variable
to
t : ECORE!EClass (
name <- s.debug('Variable: ').type.debug('Variable type: ' + s.type.oclType()).name.debug('Variable type name: ')
)
}
will output the following when run directly (aka with OCL plugins loaded), which is OK :
Variable: : IN!self
Variable type: org.eclipse.emf.ecore.impl.EClassImpl@2753fdcc (name: Class) (instanceClassName: null) (abstract: false, interface: false): <unknown>!A
Variable type name: : 'A'
and will output this when trying to run it standalone :
Variable: : IN!self
Variable type: org.eclipse.emf.ecore.impl.EClassImpl@75487cd2 (name: Type) (instanceClassName: null) (abstract: false, interface: false): <unknown>!<unnamed>
Variable type name: : OclUndefined
In short, in this configuration I cannot access the name of the variable's type, which comes from the merged metamodel on which the constraints apply. The OCL reference target object is also different for some reason: "Class" / "Type".
I have created 2 small test projects, which I attach to this post, for reproducing the problem. One project is the ATL transformation plugin (and a saved ATL launch config), the other one is the standalone java application with the example OCL model (and a short README).
I believe I am missing something in the initialization or the ATL runner, and there's probably more involved in the OCL/ATL mechanics that I don't understand.
Any help or hints on the problem and what to try would be appreciated. I can of course provide more input or clarifications if needed.
I am using Eclipse Luna, and the according latest versions of OCL and ATL.
I have also tried with Eclipse Mars and according OCL/ATL versions.
Thank you,
MK
|
|
|
|
Powered by
FUDForum. Page generated in 0.03186 seconds