Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Generate Output Elements at runtime/dynamically
[ATL] Generate Output Elements at runtime/dynamically [message #83707] Thu, 05 June 2008 18:34 Go to next message
Eclipse UserFriend
Originally posted by:

Hello ATL Friends,

I am trying to workout some way that I may generate the output model
elements dynamically(at runtime). For example, I search at run-time, the
no. of ports on the UML component under consideration, and I try to
generate the output 'port' element but I get one and only one element for
all iterations. and also for that one element, i can't add its attributes
t.model <- myML!port(name<;

Even if i write the same line two times (without for loop), i will get
only one element at the output, like
t.model <- myML!port(name<;
t.model <- myML!port(name<;

Or else if I know in advance that I have to generate 3 ports at runtime,
then how can i do it in 'do' part or the 'to' part of ATL rule.

I can't use another rule becoz the ports under search r directly related
to the component (and later on 'required interfaces' used, can't trace
their container components and those interfaces can only be accessed from
their components in UML!!!). Here is the code below:

rule processor {
from s : UML2!Component (s.isStereotypeApplied('HwBus'))
to t : myML!component (name<
do {
for(p in s.getFeatures()){
t.model <- myML!port;

I am totally stuck here, any help (from Jouault, Freddy, Ivano, Hugo or
anyone else) is highly appreciating...

Thanking you all in anticipation,

Re: [ATL] Generate Output Elements at runtime/dynamically [message #83810 is a reply to message #83707] Fri, 06 June 2008 15:18 Go to previous message
Eclipse UserFriend
Originally posted by: user.domain.invalid

To some extent got the answer to my questions, this language is wierd.
'HATS OFF' to the founders of this language. These declarative languages
are really bizzare !!!

Will post my solution when fully satisfied with my findings, so that it
may help future ATLians.


-aamir jadoon-
Previous Topic:[QVT XSD EMF] How to get a xsd complexType from a model
Next Topic:[ATL] org.eclipse.m2m.atl.engine jar
Goto Forum:

Current Time: Sat Jun 06 05:39:30 GMT 2020

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

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

Back to the top