Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » ATL transformation rules (String to numbers )
ATL transformation rules [message #1722424] Thu, 04 February 2016 17:58 Go to next message
Lujain AlDakheel is currently offline Lujain AlDakheelFriend
Messages: 7
Registered: December 2015
Junior Member
Dear Eclipse Members,


currently, i'm working on a MMT project and actually i faced some difficulties on the rules and specifications.

i have a class on the Source metamodel which have only one attribute "Name", when the user create an instances from these class i need it to be list of numbers in the corresponding model with commas between them. for example the user create an instance "Mark" and another instance "Steve" ...etc. i need a rule that transform each name to a number "ordered" and print it as a text in the target model. my target model have only one class which is text containing 3 attributes, 2 of them with default values and the last one must contain a list of numbers for each name from the source model.

any idea?
i was thinking of defining a getID() helper and call it for the target attribute in the main rule but the thing is how to make it as a loop?


i'm a beginner in MMt and ATL rules, your help will be appreciated
Re: ATL transformation rules [message #1722564 is a reply to message #1722424] Fri, 05 February 2016 19:22 Go to previous messageGo to next message
Lujain AlDakheel is currently offline Lujain AlDakheelFriend
Messages: 7
Registered: December 2015
Junior Member
anyone please?
Re: ATL transformation rules [message #1725107 is a reply to message #1722564] Mon, 29 February 2016 20:24 Go to previous message
Dennis Wagelaar is currently offline Dennis WagelaarFriend
Messages: 589
Registered: September 2012
Location: Belgium
Senior Member

Ok, can you specify exactly what you want in your favorite programming language? We may then help you express that in ATL.

Cheers,
Dennis
Previous Topic:[ATL] Empty XML Output
Next Topic:Create Tree out of a List
Goto Forum:
  


Current Time: Thu Apr 25 15:41:57 GMT 2024

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

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

Back to the top