Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Migration to Galileo
[ATL] Migration to Galileo [message #504305] Fri, 18 December 2009 09:14 Go to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
Hi,

I am migrating ATL transformations from Ganymede to Galileo.

In ours transformations we used these ATL classes to launch transformations programatically:

org.eclipse.m2m.atl.drivers.emf4atl.ASMEMFModel;
org.eclipse.m2m.atl.engine.AtlEMFModelHandler;
org.eclipse.m2m.atl.engine.AtlLauncher;
org.eclipse.m2m.atl.engine.vm.nativelib.ASMModel;

Using the ATL plug-in wizard that ATL 3.1 provides, I have seen thtat transformations are implemented using:

org.eclipse.m2m.atl.core.ModelFactory;
org.eclipse.m2m.atl.core.emf.EMFExtractor;
org.eclipse.m2m.atl.core.emf.EMFInjector;
org.eclipse.m2m.atl.core.emf.EMFModelFactory;
org.eclipse.m2m.atl.engine.emfvm.launch.EMFVMLauncher;

What should we do:

- Migrate code using org.eclipse.m2m.atl.engine.emfvm and org.eclipse.m2m.atl.core plug-ins to use EMFVMLauncher ?¿?

- Migrate code but to continue using
org.eclipse.m2m.atl.drivers.emf4atl and org.eclipse.m2m.atl.engine.vm to use AtlLauncher and ASMEMFModel ?¿?

Which is the difference in using EMFVMLauncher or AtlLauncher ?¿?

Thanks a lot !!!
Re: [ATL] Migration to Galileo [message #504520 is a reply to message #504305] Mon, 21 December 2009 08:23 Go to previous messageGo to next message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
Hi,

I have read in one post: "In ATL 3.0.x, it is recommended to use ATL EMF-vm, which is an improved
version of the ATL VM you were using." http://www.eclipse.org/forums/index.php?t=msg&th=159055& amp;start=0&S=87f3604973c372250a8d01021288af4b

So, I have migrated our code to use EMFVMLauncher, but testing them, with big models, I have obtained a VMException:
java.lang.ArrayIndexOutOfBoundsException: 100
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat ion.java:430)
at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat ion.java:387)

it is trought by org.eclipse.m2m.atl.engine.emfvm.ASMOperation.java Class in line:
stack[fp++] = localVars[bytecode.getValue()];

where stack size = 100 and fp = 101

After that I have tried to use AtlLauncher, as we did before migration and it works fine.

Could it be a EMFVMLauncher bug or I am doing something wrong ?¿?

Thanks a lot
Re: [ATL] Migration to Galileo [message #504551 is a reply to message #504520] Mon, 21 December 2009 08:48 Go to previous messageGo to next message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------020802060800060105060504
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

I think you encountered that bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=245891

It will be corrected for the 3.1 release (june 2010). At this time you
better have to stay with the RegularVM (in your case).

Best regards,

William

Miguel Ll a écrit :
> Hi,
>
> I have read in one post: "In ATL 3.0.x, it is recommended to use ATL
> EMF-vm, which is an improved
> version of the ATL VM you were using."
> http://www.eclipse.org/forums/index.php?t=msg&th=159055& amp;start=0&S=87f3604973c372250a8d01021288af4b
>
>
> So, I have migrated our code to use EMFVMLauncher, but testing them,
> with big models, I have obtained a VMException:
> java.lang.ArrayIndexOutOfBoundsException: 100
> at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat
> ion.java:430)
> at org.eclipse.m2m.atl.engine.emfvm.ASMOperation.exec(ASMOperat
> ion.java:387)
>
> it is trought by org.eclipse.m2m.atl.engine.emfvm.ASMOperation.java
> Class in line:
> stack[fp++] = localVars[bytecode.getValue()];
>
> where stack size = 100 and fp = 101
>
> After that I have tried to use AtlLauncher, as we did before migration
> and it works fine.
>
> Could it be a EMFVMLauncher bug or I am doing something wrong ?¿?
>
> Thanks a lot

--
Ne manquez pas notre prochaine formation ATL inter entreprises:
ATL - Paris - du 2 au 3 Décembre 2009
Pour plus de dates et pour le détail de cette formation:
http://www.obeo.fr/pages/formations/fr

Don't forget our next ATL training:
ATL - Paris - 2009 December from 2th to 3th
More dates and training program on:
http://www.obeo.fr/pages/formations/fr

--------------020802060800060105060504
Content-Type: text/x-vcard; charset=utf-8;
name="william_piers.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="william_piers.vcf"

YmVnaW46dmNhcmQNCmZuOldpbGxpYW0gUGllcnMNCm46UGllcnM7V2lsbGlh bQ0Kb3JnOk9i
ZW8NCmFkcjoyIHJ1ZSBSb2JlcnQgU2NodW1hbm47O2xvdCAyNDtOQU5URVM7 OzQ0NDA4O0Zy
YW5jZQ0KZW1haWw7aW50ZXJuZXQ6d2lsbGlhbS5waWVyc0BvYmVvLmZyDQp0 aXRsZTpNREEg
Q29uc3VsdGFudA0KdGVsO3dvcms6KzMzICgwKTIgNTEgMTMgNTAgNTMNCnVy bDpodHRwOi8v
d3d3Lm9iZW8uZnINCnZlcnNpb246Mi4xDQplbmQ6dmNhcmQNCg0K
--------------020802060800060105060504--
Re: [ATL] Migration to Galileo [message #504886 is a reply to message #504551] Wed, 23 December 2009 05:44 Go to previous message
Miguel Llàcer San Fernando is currently offline Miguel Llàcer San FernandoFriend
Messages: 63
Registered: July 2009
Member
First of all, Merry Christmas !!!

Following with the ATL transformations migration I have a problem with EnumLiterals elements.

In Ganymed ATL version, ASMEMFModelElement class had the method asm2EMF() with this code:
...
else if (value instanceof ASMEnumLiteral) {
String name = ((ASMEnumLiteral)value).getName();
EClassifier type = ((EClass)((ASMEMFModelElement)getMetaobject()).object).getES tructuralFeature(propName).getEType();
ret = ((EEnum)type).getEEnumLiteral(name).getInstance();
}
...

In new Galileo ATL version, this code has been changed:
...
else if (value instanceof ASMEnumLiteral) {
String name = ((ASMEnumLiteral)value).getName();
EClassifier type = ((EClass)((ASMEMFModelElement)getMetaobject()).object).getES tructuralFeature( propName).getEType();
//ret = ((EEnum)type).getEEnumLiteral(name).getInstance();
ret = ((EEnum)type).getEEnumLiteralByLiteral(name).getInstance();
}
...

As you can see, the method used now is getEEnumLiteralByLiteral() but the parameter is still the EEnumLiteral name.

I don't know why it has been changed but, a transformation that works fine in Ganymede it doesn't work with Galileo and the model and metamodel that I am using is the same.

Thanks for all !!!
Previous Topic:[ATL] e(Generic)SuperTypes
Next Topic:[ATL] unique lazy rules
Goto Forum:
  


Current Time: Wed Apr 24 17:48:34 GMT 2024

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

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

Back to the top