[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.modeling.m2m] Re: [ATL] Re: derived classes

Hello,

> so there is no solution with lazy rules? it's not possible (in a
> timely manner) to rewrite transformation to use matched rules :-/

The current implementation of lazy rules requires you to explicitly call them: they are not actually matched.
Therefore, you need to make sure to call the appropriate rule.


One solution, in your case, is to use an if expression in the body of the collect iterator:

lazy rule DoA {
from class : MM!derivedA
...
}

lazy rule DoB {
from class : MM!derivedB
...
}

classes->collect( class |
  if class.oclIsKindOf(mm!derivedA) then
    thisModule.DoA( class  )
  else  -- if class.oclIsKindOf(MM!derivedB) then
    thisModule.DoB( class  )
  endif
)


> Currently I don't use ATL2006 version - does it fully support pre > ATL2006 features?

ATL 2006 supports most of ATL 2004 (i.e., "pre ATL2006" as you call it) features, with the notable exception of refining mode, which does not work yet.

Note however, that you can choose which version of ATL to use for each of your ATL programs. Thus, if you have one program requiring refining mode, you can use ATL 2004 with it, and ATL 2006 with all other programs.

You can find for more information about ATL 2006 on the wiki: http://wiki.eclipse.org/index.php/ATL_2006

> I had big dissapointments by trying to check out ATL CVS version, so I
> prefer to use ATL bundle "releases"

The latest download available from http://www.eclipse.org/m2m/atl/download/
includes the ATL 2006 compiler.


Regards,

Frédéric Jouault