|
Re: [ATL]missing elements in the output file [message #490261 is a reply to message #490118] |
Thu, 08 October 2009 07:01 |
schach Messages: 5 Registered: October 2009 |
Junior Member |
|
|
Hi again,
still do not have any idea to solve my problem.
I get the same result when launching directly my atl file.
Here are my files:
ATL:
====
module Marte2AADL; -- Module Template
create OUT : aadl2 from IN : mergedMarteModel;
helper context mergedMarteModel!Package def : getDefNameSet() : Set(String) =
self.packagedElement->collect(e|e.name).asSet();
rule modelTransfo {
from
s : mergedMarteModel!Package (
s.oclIsTypeOf(mergedMarteModel!Model)
)
to
t : aadl2!AadlPackage (
name <- s.name,
ownedPublicSection <- pblSec,
ownedPrivateSection <- prvSec
),
pblSec : aadl2!PublicPackageSection (
name <- 'public',
noAnnexes <- true,
ownedDeviceType <-s.packagedElement->collect(ss | thisModule.devices(ss))
),
prvSec : aadl2!PrivatePackageSection (
name <- 'private'
)
do {
thisModule.debug('step1');
for (i in t.ownedPublicSection.ownedDeviceType) {
thisModule.debug('step1.1 '+i.name);
for (j in i.ownedDataPort) {
thisModule.debug('step1.2 '+j.name);
}
}
}
}
lazy rule devices {
from
ss : mergedMarteModel!Component
to
tt : aadl2!DeviceType (
name <- ss.name,
ownedDataPort <-ss.packagedElement->collect(e | thisModule.devicesDataPorts(e))
)
do {
thisModule.debug('step2 '+ss.name);
}
}
lazy rule devicesDataPorts {
from
ss : mergedMarteModel!Component
to
tt : aadl2!DataPort (
name <- ss.name
)
do {
thisModule.debug('step3 '+ss.name);
}
}
The input file:
===============
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:hwMemory="hwMemory"
xmlns:hwDevice="hwDevice"
xmlns:swConcurrency="swConcurrency"
xmlns:uml="uml">
<uml:Model xmi:id="_D5Yrd7GFEd6ODMAg_VgbRQ" name="testPackage">
<packagedElement xmi:type="uml:Component" xmi:id="_XP07gLGFEd6ODMAg_VgbRQ" name="comp1">
<packagedElement xmi:type="uml:Component" xmi:id="_XP07gLGFEd6ODMAg_VgbR7" name="port1"/>
</packagedElement>
<packagedElement xmi:type="uml:Component" xmi:id="_XP07gLGFEd6ODMAg_VgbR7" name="comp2"/>
</uml:Model>
</xmi:XMI>
the output file:
================
<?xml version="1.0" encoding="ISO-8859-1"?>
<aadl2:AadlPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:aadl2="http:///AADL2" name="testPackage">
<ownedPublicSection name="public" noAnnexes="true"/>
<ownedPrivateSection name="private"/>
</aadl2:AadlPackage>
the console output:
===================
step3 port1: thisModule
step2 comp1: thisModule
step2 comp2: thisModule
step1: thisModule
step1.1 comp1: thisModule
step1.2 port1: thisModule
step1.1 comp2: thisModule
Thanks for any help,
Arnaud Schach.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03581 seconds