Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » M2M for M2T instead of Acceleo?
M2M for M2T instead of Acceleo? [message #1849154] Wed, 05 January 2022 16:50 Go to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,

I am having trouble using Acceleo ( user guide is not up to date, no (relevant) tutorials are available and the examples are not present after installing Acceleo) and I do need a M2T-solution.

I found a paper by Ed Willink titled "A text - Use your favourite M2M for M2T" in which he describes an example (4.1 ) that uses M2M for M2T. Is there a description/tutorial/download somewhere that I can use to re-create that example so that I can create my own solution based on the example?

TIA

Joost


Cheers,

Joost
Re: M2M for M2T instead of Acceleo? [message #1849162 is a reply to message #1849154] Wed, 05 January 2022 19:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

It is possible that the Acceleo documentation has fallen out of the latest releases, or that you installed a lightweight non-SDK variant. Anyway Googling "Acceleo tutorial" provides hits.

My paper demonstrates that an M2M can be used for M2T, and so undermines the original responses to the MOFM2T RFP that led to Acceleo. In principle it could take a couple of months to round off the rough edges of M2M as M2T compared to the multiple man years to develop a full independent M2T solution. You could use the techniques referenced in the paper, but they will be a bit painful. Rounding off those rough edges is on my todo list, but it's a pretty long list and depends on other things to be done first.

In contrast, your M2T choices are not great. Acceleo is stable and not always easy to use. I find Xtend's String Templates much more satisfactory, but the longevity of Xtend has been brought into question recently. Some users like JET that has now got an Xtext editor to make it pleasanter.

For my own work, I use JET when EMF pretty much mandates it, otherwise I started with Acceleo, but found it could not cope with transforming OCL-based metamodels while also using OCL internally and so I migrated everything to an Xtend / Java hybrid. I use a thin Xtend string template layer on top of Java for simple M2T, and plain Java for complex M2T.

Regards

Ed Willink

Re: M2M for M2T instead of Acceleo? [message #1849168 is a reply to message #1849162] Wed, 05 January 2022 22:52 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,

I have installed all I could install and I think that I have seen almost all the pages that even remotely looked like "Accelleo tutorial" but alas...

I will look (again) into your Xtend remark but I was reluctant because of the longlevity of XTend you also mentioned (I have the book and have created some simple XText/XTend things).

Could you elaborate your remark about "plain Java for complex M2T"? Is it possible to iterate in plain Java through a Papyrus UML model, generating text? Do you have (a pointer to) an example for that?

TIA

Joost


Cheers,

Joost

[Updated on: Wed, 05 January 2022 22:56]

Report message to a moderator

Re: M2M for M2T instead of Acceleo? [message #1849172 is a reply to message #1849168] Thu, 06 January 2022 05:55 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7665
Registered: July 2009
Senior Member
Hi

Plain Java can solve nearly all software problems. You can find the OCL2Java code generator in org.eclipse.ocl.examples.codegen. In principle it's just an M2T but one that requires considerable planning so there is an M2M from the OCL Abstract Syntax model to a CG friendly model followed by a non-trivial M2T to Java text. The next rewrite will simplify the M2T by introducing a Java model so that there is a cascade of M2Ms followed by a thin possibly standard M2T from Java model to Java text. IMHO struggling to do too much restructuring during an M2T doesn't work well; restructure with M2Ms, then serialize using a simple M2T.

Regards

Ed Willink
Previous Topic:Henshin pattern matching for units
Goto Forum:
  


Current Time: Thu Jul 25 13:17:38 GMT 2024

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

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

Back to the top