Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Multiple output files with cross-references
[ATL] Multiple output files with cross-references [message #98689] Thu, 29 January 2009 15:07 Go to next message
Skander TURKI is currently offline Skander TURKIFriend
Messages: 130
Registered: July 2009
Senior Member
Hi,
My problem is this: I have multiple input files (a UML file, an AADL
library (propertysets in aadl)) and i want to create two output files; one
that contains an aadl spec (aadl/core.ecore metamodel) and a second one
that contains an instance of the system designed (instance.ecore
metamodel). Both output models should reference elements from the input
aadl library (for example: i can have an allocation which type is
"actual-memory-binding", this property is defined in the AADL library). So
i have two questions:
1- Can i generate two output files that contain cross-references (elements
in the instanciation model reference elements in the specification model)?

2- Can i reference elements in the aadl library from my output models?

Thanks
Re: [ATL] Multiple output files with cross-references [message #98750 is a reply to message #98689] Fri, 30 January 2009 11:20 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

Skander a écrit :
> Hi,
> My problem is this: I have multiple input files (a UML file, an AADL
> library (propertysets in aadl)) and i want to create two output files;
> one that contains an aadl spec (aadl/core.ecore metamodel) and a second
> one that contains an instance of the system designed (instance.ecore
> metamodel). Both output models should reference elements from the input
> aadl library (for example: i can have an allocation which type is
> "actual-memory-binding", this property is defined in the AADL library).
> So i have two questions:
> 1- Can i generate two output files that contain cross-references
> (elements in the instanciation model reference elements in the
> specification model)?
>

You can directly link elements each other, like that :
to {
out1 : SPEC!SpecElement (
),
out2 : SYSTEM!SystemElement (
specelement <- out1
)
}

> 2- Can i reference elements in the aadl library from my output models?
>

You must use a special feature provided by ATL execution semantics: in
the matching phase ATL will try to create library elements using a rule,
so you need to set it during the imperative execution phase. For example:
(NOTE: here libElement is a SYSTEM!SystemElement reference pointing to
an element of the input library model)

do {
out2.refSetValue('libElement',<any_library_element>);
}

To do such things, you must check the "allowInterModelReference"
parameter (a VM option).

I tried it, in order to ensure it was working using that parameter :-)
but I found a bug which was disabling the effect of this parameter...

It is now fixed (on CVS head), and the correction will be available on
the next ATL 3.0 build.
Fortunately this will happen next friday at least (Galileo M5 build).
If you can't wait you can use ATL from its CVS source code.

Best regards,

William
Re: [ATL] Multiple output files with cross-references [message #98795 is a reply to message #98750] Fri, 30 January 2009 17:13 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
You can test both bug 255613 fix and allowInterModelReferences fix using
that build:
http://www.eclipse.org/modeling/download.php?file=/modeling/ m2m/atl/downloads/drops/3.0.0/I200901301143/m2m-atl-SDK-I200 901301143.zip

Best Regards,

William

William Piers a écrit :
> Hello,
>
> Skander a écrit :
>> Hi,
>> My problem is this: I have multiple input files (a UML file, an AADL
>> library (propertysets in aadl)) and i want to create two output files;
>> one that contains an aadl spec (aadl/core.ecore metamodel) and a
>> second one that contains an instance of the system designed
>> (instance.ecore metamodel). Both output models should reference
>> elements from the input aadl library (for example: i can have an
>> allocation which type is "actual-memory-binding", this property is
>> defined in the AADL library). So i have two questions:
>> 1- Can i generate two output files that contain cross-references
>> (elements in the instanciation model reference elements in the
>> specification model)?
>>
>
> You can directly link elements each other, like that :
> to {
> out1 : SPEC!SpecElement (
> ),
> out2 : SYSTEM!SystemElement (
> specelement <- out1
> )
> }
>
>> 2- Can i reference elements in the aadl library from my output models?
>>
>
> You must use a special feature provided by ATL execution semantics: in
> the matching phase ATL will try to create library elements using a rule,
> so you need to set it during the imperative execution phase. For example:
> (NOTE: here libElement is a SYSTEM!SystemElement reference pointing to
> an element of the input library model)
>
> do {
> out2.refSetValue('libElement',<any_library_element>);
> }
>
> To do such things, you must check the "allowInterModelReference"
> parameter (a VM option).
>
> I tried it, in order to ensure it was working using that parameter :-)
> but I found a bug which was disabling the effect of this parameter...
>
> It is now fixed (on CVS head), and the correction will be available on
> the next ATL 3.0 build.
> Fortunately this will happen next friday at least (Galileo M5 build).
> If you can't wait you can use ATL from its CVS source code.
>
> Best regards,
>
> William
Re: [ATL] Multiple output files with cross-references [message #99004 is a reply to message #98795] Thu, 05 February 2009 10:16 Go to previous message
Skander TURKI is currently offline Skander TURKIFriend
Messages: 130
Registered: July 2009
Senior Member
thanks a lot for these precious informations, i finally could reference
external model elements.
Previous Topic:[ATL] Basic mechanism
Next Topic:[ATL] reference model elements of other rules
Goto Forum:
  


Current Time: Sat Apr 27 01:38:09 GMT 2024

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

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

Back to the top