Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] HOT transformation
[ATL] HOT transformation [message #105112] Sun, 17 May 2009 07:39 Go to next message
Esteban Dugueperoux is currently offline Esteban Dugueperoux
Messages: 279
Registered: July 2009
Senior Member
Hi,

I have a ATL transformation which take one input and produce in output
one ATL transformation (High Order Transformation), it works fine with
ATL 3.0 (tested with Galileo M7).
Now I want execute this output ATL transformation, but this output is in
XMI format, then my first question is, can I execute directly my ATL
transformation in XMI format and how?

If not possible, I could transform my XMI format in concrete syntax to
execute a .atl. With TCS I could do it, but I don't find TCS source code
repository. What is the status of TCS, what is the project plan. And
what is TCS compared to TMF Xtext from oAW?

I found AMW project from GMT which use HOT transformation, but it
doesn't works and I don't understand these sources.

Thanks.
Re: [ATL] HOT transformation [message #105226 is a reply to message #105112] Mon, 18 May 2009 07:57 Go to previous messageGo to next message
William Piers is currently offline William Piers
Messages: 297
Registered: July 2009
Senior Member
Hello,

Esteban DUGUEPEROUX a écrit :
> Hi,
>
> I have a ATL transformation which take one input and produce in output
> one ATL transformation (High Order Transformation), it works fine with
> ATL 3.0 (tested with Galileo M7).
> Now I want execute this output ATL transformation, but this output is in
> XMI format, then my first question is, can I execute directly my ATL
> transformation in XMI format and how?
>

At this time you can't.

> If not possible, I could transform my XMI format in concrete syntax to
> execute a .atl. With TCS I could do it, but I don't find TCS source code
> repository. What is the status of TCS, what is the project plan. And
> what is TCS compared to TMF Xtext from oAW?
>
> I found AMW project from GMT which use HOT transformation, but it
> doesn't works and I don't understand these sources.
>

ATL 3.0 API provide utilities to:
- output ATL source code from an ATL model
* org.eclipse.m2m.atl.engine.parser.AtlParser
* available within ATL ant tasks, use "ATL" extractor
- create an ATL model from ATL source code
* org.eclipse.m2m.atl.engine.parser.AtlParser
* available within ATL ant tasks, use "ATL" injector
- compile ATL source code to an ASM file/outputstream
* org.eclipse.m2m.atl.engine.compiler.AtlCompiler
- compile an ATL model to an ASM file/outputstream
* org.eclipse.m2m.atl.engine.compiler.AtlDefaultCompiler

> Thanks.

Best regards,

William
Re: [ATL] HOT transformation [message #105340 is a reply to message #105226] Tue, 19 May 2009 11:54 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban Dugueperoux
Messages: 279
Registered: July 2009
Senior Member
Thanks William.
Re: [ATL] HOT transformation [message #105525 is a reply to message #105226] Mon, 25 May 2009 04:11 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban Dugueperoux
Messages: 279
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020908010202020407080002
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hi William,

To begin my HOT transformation I would like to create a simple rule :

rule getEntity2ValueObject {
from
entitySource : UML!Class (
entitySource.getAppliedStereotypes()->exists(e|e.name='Entity')
)
to
entityTarget : UML!Class (
)

To do that I have the joined mapping2ATLBis.atl which use
OperationCallExp and StringExp respectively to '=' operator and to
'Entity' expression. The problem when my HOT transformation is executed
is that is get the following ATL code :

rule Entity2ValueObject {
from
entitySource : UML!Class
(
entitySource.getAppliedStereotypes()->exists(e |
e.name.'='('Entity')
)
)
to
entityTarget : UML!Class
}

which isn't syntactically correct. What is my mistake?
It's too hard to debug in PrettyPrinter and finally I don't understand
why these characters are appended.
My purpose it to reproduce Business2TechnicalM2M.atl joined code;
To help my HOT writing I use XMI version of Business2TechnicalM2M.atl to
see what ATL.ecore EClass to use.

About ATL.ecore, LocatedElement has a location EAttribute which concerns
ATL syntactic sugar, that's right? If right why this appears in metamodel?

Last question :
How can I assign
pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#string to a target
UML!Parameter?
I must probably use a appropriate input but how to reference String type?

Thanks.

--------------020908010202020407080002
Content-Type: text/plain;
name="mapping2ATLBis.atl"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="mapping2ATLBis.atl"

bW9kdWxlIG1hcHBpbmcyQVRMOyAtLSBNb2R1bGUgVGVtcGxhd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6IEFUTCFP
Y2xNb2RlbEVsZW1lbnQgKAoJCW5hbWUgPC0gJ0NsYXNzJywKCQltb2RlbCA8 LSB1bWxNZXRh
bW9kZWwKCSksCgl1bWxDbGFzc1R5cGUzIDogQVRMIU9jbE1vZGVsRWxlbWVu dCAoCgkJbmFt
ZSA8LSAnQ2xhc3MnLAoJCW1vZGVsIDwtIHVtbE1ldGFtb2RlbAoJKSwKCXVt bENsYXNzVHlw
ZTQgOiBBVEwhT2NsTW9kZWxFbGVtZW50ICgKCQluYW1lIDwtICdDbGFzcycs CgkJbW9kZWwg
PC0gdW1sTWV0YW1vZGVsCgkpLAoJdW1sT3BlcmF0aW9uVHlwZTEgOiBBVEwh T2NsTW9kZWxF
bGVtZW50ICgKCQluYW1lIDwtICdPcGVyYXRpb24nLAoJCW1vZGVsIDwtIHVt bE1ldGFtb2Rl
bAoJKSwKCXVtbE9wZXJhdGlvblR5cGUyIDogQVRMIU9jbE1vZGVsRWxlbWVu dCAoCgkJbmFt
ZSA8LSAnT3BlcmF0aW9uJywKCQltb2RlbCA8LSB1bWxNZXRhbW9kZWwKCSks Cgl1bWxQYXJh
bWV0ZXJUeXBlIDogQVRMIU9jbE1vZGVsRWxlbWVudCAoCgkJbmFtZSA8LSAn UGFyYW1ldGVy
JywKCQltb2RlbCA8LSB1bWxNZXRhbW9kZWwKCSkKfQ==
--------------020908010202020407080002
Content-Type: text/plain;
name="Business2TechnicalM2M.atl"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="Business2TechnicalM2M.atl"

Cm1vZHVsZSBCdXNpbmVzczJUZWNobmljYWxNMk07CmNyZWF0ZSBPVVQgOiBV TUwgcmVmaW5p
bmcgSU4gOiBVTUwsIFBlcnNpc3RlbmNlUHJvZmlsZSA6IFVNTDsKCmhlbHBl ciBkZWYgOiBn
ZXRTdGVyZW90eXBlKG5hbWUgOiBTdHJpbmcpIDogVU1MIVN0ZXJlb3R5cGUg PQogICAgVU1M
IVN0ZXJlb3R5cGUuYWx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CQl0
eXBlIDwtIHZhbHVlT2JqZWN0LAoJCQljbGFzcyA8LSBzZXJ2aWNlCgkJKSwK CQkKCQlnZXRF
bnRpdHlCeUlkT3BlcmF0aW9uUGFyYW1ldGVyIDogVU1MIVBhcmFtZXRlciAo CgkJCW5hbWUg
PC0gJ2lkJywKLS0JCQl0eXBlIDwtIFVNTCFQcmltaXRpdmVUeXBlcywKCQkJ b3BlcmF0aW9u
IDwtIGdldEVudGl0eUJ5SWRPcGVyYXRpb24KCQkpCgkJZG8gewoJCQl2YWx1 ZU9iamVjdC5h
cHBseVN0ZXJlb3R5cGUodGhpc01vZHVsZS5nZXRTdGVyZW90eXBlKCdWYWx1 ZU9iamVjdCcp
KTsKCQl9CgkJCn0=
--------------020908010202020407080002--
Re: [ATL] HOT transformation [RESOLVED] [message #105919 is a reply to message #105525] Tue, 02 June 2009 09:31 Go to previous message
Esteban Dugueperoux is currently offline Esteban Dugueperoux
Messages: 279
Registered: July 2009
Senior Member
It's a mistake in my HOT ATL transformation, I have confused
OperationCallExp and OperatorCallExp.
Previous Topic:[ATL] Applying Stereotypes with ATL 3.0
Next Topic:[QVTO] How to write a transformation to create a QVTO transformation model in output?
Goto Forum:
  


Current Time: Sat Apr 19 16:05:36 EDT 2014

Powered by FUDForum. Page generated in 0.01921 seconds