Pivot's OCL and ATL's OCL compatibility [message #1755566] |
Sun, 05 March 2017 19:32 |
meriem lahr Messages: 31 Registered: March 2013 |
Member |
|
|
Hi all,
Im writing an ATL HOT transformation that transforms constraints embedded in an Ecore metamodel to equivalent ATL helpers. The input metamodel conforms to the Pivot metamodel and the output transformation conforms to the ATL metamodel.
For the moment I can generate the helpers for very simple constraints. But it seems this is a little bit complicated for general OCL Expressions since they are defined differently in Pivot and ATL metamodelsö.
Is there a way to impose that the OCL input constraints are ATL-compatible. Else, where can I find a documentation about mappings between Pivot's OCL and ATL's OCL (if it exists)?
Thank you very much
Meri
[Updated on: Mon, 06 March 2017 11:26] Report message to a moderator
|
|
|
|
Re: Pivot's OCL and ATL's OCL compatibility [message #1755789 is a reply to message #1755566] |
Wed, 08 March 2017 08:49 |
|
meriem lahr wrote on Sun, 05 March 2017 20:32Is there a way to impose that the OCL input constraints are ATL-compatible.
You can run a "checking" transformation before the actual HOT that generates errors for OCL expressions that cannot be translated to ATL. This is the approach that the ATL compiler uses for semantically incorrect ATL expressions (See ATLWFR.atl and how it is used by AtlToEmftvmCompiler, AtlBuildVisitor, and MarkerMaker to annotate the source code with error markers).
meriem lahr wrote on Sun, 05 March 2017 20:32where can I find a documentation about mappings between Pivot's OCL and ATL's OCL (if it exists)?
You are the first to try this, so you can document your research on this . ATL's OCL syntax is based on the OCL 2.0 spec, and the mapping from OCL concrete syntax to the ATL metamodel is defined in ATL.tcs.
Cheers,
Dennis
|
|
|
Powered by
FUDForum. Page generated in 0.02346 seconds