TRANSFORMATION list : src -> src
RULE listObjects
FORALL _ Src
WHERE println(Src.eClass().getName())
;
INFO: Loaded (10885246) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/transformations/list.qvt
INFO: Loaded (7197832) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
Minimal.modelmanagement
INFO: Transformation started: list
INFO: Constructing stratification...
INFO: ... 1 levels.
INFO: Stratum 0 : listObjects
INFO: Evaluating listObjects
INFO: []
INFO: TRule: listObjects completed.
INFO: Transformation finished
INFO: ResourceSet event 8: null
<?xml version="1.0" encoding="UTF-8"?>
<au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement:Repository
xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement="http:///au/edu/
uq/itee/mdavv/wrsa/foxbus/modelManagement.ecore">
<designTime>
<components name="Basic Calculations"/>
</designTime>
</au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement:Repository>
You've specified the same variable (src) for both input and output
extents. Thus Tefkat is loading your input model and binding the var
"src" to that extent, then creating the output extent and re-binding
the same var "src" to this new, empty, extent (Resource). Thus there
are no model elements found. If you change the first line to
TRANSFORMATION list : src -> tgt
then it should work as you expect.
michael
TRANSFORMATION list : src -> tgt
RULE listObjects
FORALL _ Src
WHERE println(Src.eClass().getName())
;
INFO: Loaded (1001124) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/transformations/list.qvt
INFO: Loaded (2826541) platform:/resource/
au.edu.uq.itee.mdavv.wrsa.foxbus.test2code/instances/
Minimal.modelmanagement
INFO: Transformation started: list
INFO: Constructing stratification...
INFO: ... 1 levels.
INFO: Stratum 0 : listObjects
INFO: Evaluating listObjects
INFO: []
INFO: TRule: listObjects completed.
INFO: Transformation finished
INFO: ResourceSet event 8: null
On Oct 31, 2:00 pm, "michael lawley" <mich...@lawley.id.au> wrote:
> Hi J?rn,
>
> You've specified the same variable (src) for both input and output
> extents. Thus Tefkat is loading your input model and binding the var
> "src" to that extent, then creating the output extent and re-binding
> the same var "src" to this new, empty, extent (Resource). Thus there
> are no model elements found. If you change the first line to
>
> TRANSFORMATION list : src -> tgt
>
> then it should work as you expect.
>
> michael
>
> > </au.edu.uq.itee.mdavv.wrsa.foxbus.modelManagement:Repository>- Hide quoted text -
>
> - Show quoted text -
michael
On 10/31/07, Jörn Guy <jgs...@itee.uq.edu.au> wrote:
>
Further digging has revealed that the src and tgt extent variables are
not being bound to the correct resources. You can check this with:
TRANSFORMATION testIt: src -> tgt
RULE navExtents
WHERE println("src", src) AND println("tgt", tgt)
;
A work-around for this until the next release is to explicitly set the
Var Group for the source and target models to be the same name as the
corresponding input variable:
michael
After some further digging, the issue is related to the difference
between an unset String attribute, and a String attribute set to the
empty string (fixed in next release). If you're up to hand-editing
the tefkatconfig file, you can remove the varGroup="" bits and all
will work well.
Otherwise, the way Var Groups work is that the value specified is used
to identify the extent variable of the transformation to which the
resource should be bound. If there are multiple resources with the
same Var Group, then they are treated as a virtual compound resource
with the union of the individual contents.
michael