|
Re: [ATL] Multiple output files with cross-references [message #98750 is a reply to message #98689] |
Fri, 30 January 2009 11:20 |
William Piers 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 |
William Piers 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
|
|
|
|
Powered by
FUDForum. Page generated in 0.03223 seconds