|
|
|
Re: ATL : multiple target from one source object [message #1775953 is a reply to message #1775856] |
Wed, 08 November 2017 14:42 |
zz lalou Messages: 17 Registered: April 2011 |
Junior Member |
|
|
I tried to do :
rule Policy2Policy {
from
Pol : MM!Policy
to
Poli : MM1!Policy (
systemcall <- Pol.action,
effect <- Pol.effect
)
}
rule Share2lowLevelSysCall {
from
Shr1 : MM!Share
to
Cnt1 : MM1!Sendto(),
Cnt2 :MM1!Send(),
Cnt3 :MM1!Sendmsg()
}
but only one system call is considered, the other are outside the policy tag
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:target="www.target.com">
<target:PolicySet id="1">
<policy id="1">
<effect effectValue="Allow"/>
<systemcall xsi:type="target:Send"/>
</policy>
</target:PolicySet>
<target:Sendto/>
<target:Sendmsg/>
knowing that I need that all system call are in the pilicy tag like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:target="www.target.com">
<target:PolicySet id="1">
<policy id="1">
<effect effectValue="Allow"/>
<systemcall xsi:type="target:Send"/>
<systemcall xsi:type="target:Sendto"/>
<systemcall xsi:type="target:Sendmsg"/>
</policy>
</target:PolicySet>
Can any one help me
[Updated on: Wed, 08 November 2017 14:43] Report message to a moderator
|
|
|
|
Re: ATL : multiple target from one source object [message #1776028 is a reply to message #1775967] |
Thu, 09 November 2017 13:25 |
zz lalou Messages: 17 Registered: April 2011 |
Junior Member |
|
|
Thank you Dennis, I tried the methode resolveTemp(). It works very well when my source model contains only one policy. The ATL code is in the following:
rule Policy2Policy {
from
Pol : MM!Policy
to
Poli : MM1!Policy (
systemcall <- MM!Action.allInstances()->collect(e | thisModule.resolveTemp(e,'Cnt1')),
systemcall <- MM!Action.allInstances()->collect(e | thisModule.resolveTemp(e,'Cnt2')),
systemcall <- MM!Action.allInstances()->collect(e | thisModule.resolveTemp(e,'Cnt3')),
effect <- Pol.effect
)
}
But when I tried to insert another policy, the new policy get all the system call (x2) and the first policy does not contain any system call :
<?xml version="1.0" encoding="ISO-8859-1"?>
<target:PolicySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:target="www.target.com" id="1">
<policy id="1">
<effect effectValue="Allow"/>
</policy>
<policy id="3">
<effect effectValue="Allow"/>
<systemcall xsi:type="target:Send"/>
<systemcall xsi:type="target:Send"/>
<systemcall xsi:type="target:Sendto"/>
<systemcall xsi:type="target:Sendto"/>
<systemcall xsi:type="target:Sendmsg"/>
<systemcall xsi:type="target:Sendmsg"/>
</policy>
</target:PolicySet>
anyone have idea how to solve this problem
[Updated on: Thu, 09 November 2017 13:42] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03923 seconds