Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Several problems
[ATL] Several problems [message #99462] Thu, 12 February 2009 03:23 Go to next message
Eclipse UserFriend
Originally posted by: aaniculaesei.gmail.com

Hello,
I'm transforming a UML statemachine model to NuSMV.
The UML model contains two statemachines. However I get information
printed out in the output file for only one statemachine.
Moreover, the output file doesn't seem to be organized in a manner that
would show me which states or transitions belong to which statemachine.

The matched rule of my transformation looks like this:
rule StateMachine2Module {
from
s : UML!StateMachine
to
t : NuSMV!TModule (
moduleName <- s.name,

define <- s.region->select(r | r.subvertex->select(v |
not v.isInitial and not v.isFinal)
->collect(v | thisModule.Vertex2Define(v)) ),

variable <- s.region->select(r | r.subvertex->select(v |
v.isInitial)->collect(v |thisModule.InitialState2Init(v))),

assign <- s.region->select(r | r.transition->select(t |
t.source.isPseudostate)->collect(t |
thisModule.TransitionFromPseudostate2Assign(t)))

)
}
The rules called in the matched rule are unique lazy rules.

This rule works partially, meaning it gives me the "moduleName" and the
elements of the collection "define" for example. If in addition to the
"define" elements I try to print out the "variable" or the "assign"
elements , the result is the same, as if these lines corresponding to
them were commented in code of the rule.

I have never actually managed to make an ATL matched rule work with more
then two assignments in the target. However, I've seen many examples
which show that this is possible. I don't know what I'm doing wrong here.

Any help would be much appreciated.
Thanks in advance
Adina
Re: [ATL] Several problems [message #99508 is a reply to message #99462] Thu, 12 February 2009 08:29 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hi

I think we can't help without more information

why do you use unique lazy rules and not matching rules in your rule ?

what does the rule matching elements containing your statemachine ?

Adina Aniculaesei a écrit :
> Hello,
> I'm transforming a UML statemachine model to NuSMV.
> The UML model contains two statemachines. However I get information
> printed out in the output file for only one statemachine.
> Moreover, the output file doesn't seem to be organized in a manner that
> would show me which states or transitions belong to which statemachine.
>
> The matched rule of my transformation looks like this:
> rule StateMachine2Module {
> from
> s : UML!StateMachine
> to
> t : NuSMV!TModule (
> moduleName <- s.name,
>
> define <- s.region->select(r | r.subvertex->select(v
> | not v.isInitial and not v.isFinal)
> ->collect(v | thisModule.Vertex2Define(v)) ),
>
> variable <- s.region->select(r | r.subvertex->select(v |
> v.isInitial)->collect(v |thisModule.InitialState2Init(v))),
>
> assign <- s.region->select(r | r.transition->select(t
> | t.source.isPseudostate)->collect(t |
> thisModule.TransitionFromPseudostate2Assign(t)))
>
> )
> }
> The rules called in the matched rule are unique lazy rules.
>
> This rule works partially, meaning it gives me the "moduleName" and the
> elements of the collection "define" for example. If in addition to the
> "define" elements I try to print out the "variable" or the "assign"
> elements , the result is the same, as if these lines corresponding to
> them were commented in code of the rule.
>
> I have never actually managed to make an ATL matched rule work with more
> then two assignments in the target. However, I've seen many examples
> which show that this is possible. I don't know what I'm doing wrong here.
>
> Any help would be much appreciated.
> Thanks in advance
> Adina




Re: [ATL] Several problems [message #99547 is a reply to message #99508] Thu, 12 February 2009 10:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aaniculaesei.gmail.com

This is a multi-part message in MIME format.
--------------050308080100040306020909
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hi

Tristan FAURE wrote:
> Hi
>
> I think we can't help without more information
>
> why do you use unique lazy rules and not matching rules in your rule ?
If in the rule of the statemachine I call matched rules for the elements
contained in the statemachine, in the output file I get only empty tags
like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
<NuSMV:TModule/>
<NuSMV:TModule/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TDefine/>
<NuSMV:TInitVarValue/>
</xmi:XMI>

However if I call lazy rules, the output file looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
<NuSMV:TModule moduleName="SM_Client"/>
<NuSMV:TModule/>
<NuSMV:TDefine defName="State_0"/>
<NuSMV:TDefine defName="State_1"/>
<NuSMV:TDefine defName="State_2"/>
<NuSMV:TDefine defName="State_3"/>
<NuSMV:TDefine defName="State_4"/>
<NuSMV:TDefine defName="FinalState_0"/>
</xmi:XMI>

I want to have something like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
-- first state machine translated in NuSMV
<NuSMV:TModule moduleName="SM_Client">
<NuSMV:TDefine defName="State_0"/>
<NuSMV:TDefine defName="State_1"/>
<NuSMV:TDefine defName="State_2"/>
<NuSMV:TDefine defName="State_3"/>
<NuSMV:TDefine defName="State_4"/>
<NuSMV:TDefine defName="FinalState_0"/>
<NuSMV:TModule/>
-- second state machine translated in NuSMV
<NuSMV:TModule moduleName="SM_Lock">
...
<NuSMV:TModule/>
</xmi:XMI>

or at least:
<NuSMV:TModule moduleName="SM_Client"/>
<NuSMV:TDefine defName="State_0"/>
<NuSMV:TDefine defName="State_1"/>
<NuSMV:TDefine defName="State_2"/>
<NuSMV:TDefine defName="State_3"/>
<NuSMV:TDefine defName="State_4"/>
<NuSMV:TDefine defName="FinalState_0"/>
<NuSMV:TModule moduleName="SM_Lock"/>
-- and here the elements of the second state machine

I only used the unique lazy rules thinking I could get it better, but it
has the same effect as when calling lazy rules.

>
> what does the rule matching elements containing your statemachine ?
>

I attached the ATL file, to see how the rules correponding to the
elements of the state machine look like and how they are called.

I appreciate your help very much.
Adina

> Adina Aniculaesei a
Re: [ATL] Several problems [message #99562 is a reply to message #99547] Thu, 12 February 2009 11:14 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hi again !

I think there is some misunderstanding please see comments bellow and
i'm sure we will success !

Adina Aniculaesei a écrit :
> Hi
>
> Tristan FAURE wrote:
>> Hi
>>
>> I think we can't help without more information
>>
>> why do you use unique lazy rules and not matching rules in your rule ?
> If in the rule of the statemachine I call matched rules for the elements
> contained in the statemachine, in the output file I get only empty tags
> like:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>
> <NuSMV:TModule/>
> <NuSMV:TModule/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TDefine/>
> <NuSMV:TInitVarValue/>
> </xmi:XMI>
>
> However if I call lazy rules, the output file looks like this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>
> <NuSMV:TModule moduleName="SM_Client"/>
> <NuSMV:TModule/>
> <NuSMV:TDefine defName="State_0"/>
> <NuSMV:TDefine defName="State_1"/>
> <NuSMV:TDefine defName="State_2"/>
> <NuSMV:TDefine defName="State_3"/>
> <NuSMV:TDefine defName="State_4"/>
> <NuSMV:TDefine defName="FinalState_0"/>
> </xmi:XMI>

First it will be good to have your meta model target but it seems that
NuSMV:TModule is your top level element ? if it is the case i found
strange that you want a tree with multiple roots ? maybe you should
reconsider a new metamodel with a top level containing (containment
relation) modules ?

>
> I want to have something like this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>
> -- first state machine translated in NuSMV
> <NuSMV:TModule moduleName="SM_Client">
> <NuSMV:TDefine defName="State_0"/>
> <NuSMV:TDefine defName="State_1"/>
> <NuSMV:TDefine defName="State_2"/>
> <NuSMV:TDefine defName="State_3"/>
> <NuSMV:TDefine defName="State_4"/>
> <NuSMV:TDefine defName="FinalState_0"/>
> <NuSMV:TModule/>
> -- second state machine translated in NuSMV
> <NuSMV:TModule moduleName="SM_Lock">
> ...
> <NuSMV:TModule/>
> </xmi:XMI>
>
> or at least:
> <NuSMV:TModule moduleName="SM_Client"/>
> <NuSMV:TDefine defName="State_0"/>
> <NuSMV:TDefine defName="State_1"/>
> <NuSMV:TDefine defName="State_2"/>
> <NuSMV:TDefine defName="State_3"/>
> <NuSMV:TDefine defName="State_4"/>
> <NuSMV:TDefine defName="FinalState_0"/>
> <NuSMV:TModule moduleName="SM_Lock"/>
> -- and here the elements of the second state machine
>
> I only used the unique lazy rules thinking I could get it better, but it
> has the same effect as when calling lazy rules.
>

In you atl file you have one matching rule as i said before for each
state machine atl will create a new Module if it is the top level
element it won't succeed what i imagine

a top matching level rule {
Model to ModuleContainer (
modules <- UML!StateMachine.allIstances() ; -- with this assignment
atl will look for matching rules matching state machines
)
}

all your lazy rules transformed in matching rules, it's better enhance
your guards to not have for one input element two rules matching

and keep your StateMachine rule dropping called to lazy rules

for first tests keep only the creation of modules !

Regards !

>>
>> what does the rule matching elements containing your statemachine ?
>>
>
> I attached the ATL file, to see how the rules correponding to the
> elements of the state machine look like and how they are called.
>
> I appreciate your help very much.
> Adina
>
>> Adina Aniculaesei a écrit :
>>> Hello,
>>> I'm transforming a UML statemachine model to NuSMV.
>>> The UML model contains two statemachines. However I get information
>>> printed out in the output file for only one statemachine.
>>> Moreover, the output file doesn't seem to be organized in a manner
>>> that would show me which states or transitions belong to which
>>> statemachine.
>>>
>>> The matched rule of my transformation looks like this:
>>> rule StateMachine2Module {
>>> from
>>> s : UML!StateMachine
>>> to
>>> t : NuSMV!TModule (
>>> moduleName <- s.name,
>>>
>>> define <- s.region->select(r | r.subvertex->select(v
>>> | not v.isInitial and not v.isFinal)
>>> ->collect(v | thisModule.Vertex2Define(v)) ),
>>>
>>> variable <- s.region->select(r | r.subvertex->select(v |
>>> v.isInitial)->collect(v |thisModule.InitialState2Init(v))),
>>> assign <- s.region->select(r | r.transition->select(t
>>> | t.source.isPseudostate)->collect(t
>>> | thisModule.TransitionFromPseudostate2Assign(t))) )
>>> }
>>> The rules called in the matched rule are unique lazy rules.
>>>
>>> This rule works partially, meaning it gives me the "moduleName" and
>>> the elements of the collection "define" for example. If in addition
>>> to the "define" elements I try to print out the "variable" or the
>>> "assign" elements , the result is the same, as if these lines
>>> corresponding to them were commented in code of the rule.
>>>
>>> I have never actually managed to make an ATL matched rule work with
>>> more then two assignments in the target. However, I've seen many
>>> examples which show that this is possible. I don't know what I'm
>>> doing wrong here.
>>>
>>> Any help would be much appreciated.
>>> Thanks in advance
>>> Adina
>




Re: [ATL] Several problems [message #99804 is a reply to message #99562] Thu, 12 February 2009 18:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aaniculaesei.gmail.com

This is a multi-part message in MIME format.
--------------030405090605010302020307
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,
Thank you for your answers until now.
I wrote the following rule to call the rule for each instance of the
state machine.

-- @top level rule
rule Model2ModuleContainer {
from
s : UML!UML
to
t : NuSMV!TModules (
module <- UML!StateMachine.allInstances()
)
}

The output file is empty after running this rule. I tried to call on
every instance the rule for state machine, but to no result.
That is, I made the rule for state machine as "lazy"
and in the target I wrote:

module <- UML!StateMachine.allInstances()->collect(sm |
sm.thisModule.StateMachine2Module(sm))

Also do you know what can I do if an element of the target model has the
same name as an atl keyword ? In this case is the word "module" which
happens to be a component of the NuSMV type TModules. "module" is in
this case a sequence of one or more modules, each module being of type
TModule.

I attached the metamodel file and the XSD file correponding to it.
I tried to modify both of them replacing the word "module" but it didn't
work.

Thanks again
Adina

Tristan FAURE wrote:
> Hi again !
>
> I think there is some misunderstanding please see comments bellow and
> i'm sure we will success !
>
> Adina Aniculaesei a
Re: [ATL] Several problems [message #99911 is a reply to message #99804] Fri, 13 February 2009 08:14 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hi we advance a little
I checked your metamodel and ...

i think your top level rule is


-- @top level rule
rule Model2ModuleContainer {
from
s : UML!Model
to
t : NuSMV!DocumentRoot(
nuSMVModel <- model
),
model : NuSMV!TNuSMV(
modules <- someModules
),
someModules : NuSMV!TModules(
module <- UML!StateMachine.allInstances()
)
}

rule StateMachine2TModule (
from s : UML!StateMachine


..........


Maybe you should consider this for starting and for atl keyword maybe
you should rename it and regenerate your metamodel api :/

Adina Aniculaesei a écrit :
> Hello,
> Thank you for your answers until now.
> I wrote the following rule to call the rule for each instance of the
> state machine.
>
> -- @top level rule
> rule Model2ModuleContainer {
> from
> s : UML!UML
> to
> t : NuSMV!TModules (
> module <- UML!StateMachine.allInstances()
> )
> }
>
> The output file is empty after running this rule. I tried to call on
> every instance the rule for state machine, but to no result.
> That is, I made the rule for state machine as "lazy"
> and in the target I wrote:
>
> module <- UML!StateMachine.allInstances()->collect(sm |
> sm.thisModule.StateMachine2Module(sm))
>
> Also do you know what can I do if an element of the target model has the
> same name as an atl keyword ? In this case is the word "module" which
> happens to be a component of the NuSMV type TModules. "module" is in
> this case a sequence of one or more modules, each module being of type
> TModule.
>
> I attached the metamodel file and the XSD file correponding to it.
> I tried to modify both of them replacing the word "module" but it didn't
> work.
>
> Thanks again
> Adina
>
> Tristan FAURE wrote:
>> Hi again !
>>
>> I think there is some misunderstanding please see comments bellow and
>> i'm sure we will success !
>>
>> Adina Aniculaesei a écrit :
>>> Hi
>>>
>>> Tristan FAURE wrote:
>>>> Hi
>>>>
>>>> I think we can't help without more information
>>>>
>>>> why do you use unique lazy rules and not matching rules in your rule ?
>>> If in the rule of the statemachine I call matched rules for the
>>> elements contained in the statemachine, in the output file I get only
>>> empty tags like:
>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>
>>> <NuSMV:TModule/>
>>> <NuSMV:TModule/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TDefine/>
>>> <NuSMV:TInitVarValue/>
>>> </xmi:XMI>
>>>
>>> However if I call lazy rules, the output file looks like this:
>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>
>>> <NuSMV:TModule moduleName="SM_Client"/>
>>> <NuSMV:TModule/>
>>> <NuSMV:TDefine defName="State_0"/>
>>> <NuSMV:TDefine defName="State_1"/>
>>> <NuSMV:TDefine defName="State_2"/>
>>> <NuSMV:TDefine defName="State_3"/>
>>> <NuSMV:TDefine defName="State_4"/>
>>> <NuSMV:TDefine defName="FinalState_0"/>
>>> </xmi:XMI>
>>
>> First it will be good to have your meta model target but it seems that
>> NuSMV:TModule is your top level element ? if it is the case i found
>> strange that you want a tree with multiple roots ? maybe you should
>> reconsider a new metamodel with a top level containing (containment
>> relation) modules ?
>>
>>>
>>> I want to have something like this:
>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>
>>> -- first state machine translated in NuSMV
>>> <NuSMV:TModule moduleName="SM_Client">
>>> <NuSMV:TDefine defName="State_0"/>
>>> <NuSMV:TDefine defName="State_1"/>
>>> <NuSMV:TDefine defName="State_2"/>
>>> <NuSMV:TDefine defName="State_3"/>
>>> <NuSMV:TDefine defName="State_4"/>
>>> <NuSMV:TDefine defName="FinalState_0"/>
>>> <NuSMV:TModule/>
>>> -- second state machine translated in NuSMV
>>> <NuSMV:TModule moduleName="SM_Lock">
>>> ...
>>> <NuSMV:TModule/>
>>> </xmi:XMI>
>>>
>>> or at least:
>>> <NuSMV:TModule moduleName="SM_Client"/>
>>> <NuSMV:TDefine defName="State_0"/>
>>> <NuSMV:TDefine defName="State_1"/>
>>> <NuSMV:TDefine defName="State_2"/>
>>> <NuSMV:TDefine defName="State_3"/>
>>> <NuSMV:TDefine defName="State_4"/>
>>> <NuSMV:TDefine defName="FinalState_0"/>
>>> <NuSMV:TModule moduleName="SM_Lock"/>
>>> -- and here the elements of the second state machine
>>>
>>> I only used the unique lazy rules thinking I could get it better, but
>>> it has the same effect as when calling lazy rules.
>>>
>>
>> In you atl file you have one matching rule as i said before for each
>> state machine atl will create a new Module if it is the top level
>> element it won't succeed what i imagine
>>
>> a top matching level rule {
>> Model to ModuleContainer (
>> modules <- UML!StateMachine.allIstances() ; -- with this
>> assignment atl will look for matching rules matching state machines
>> )
>> }
>>
>> all your lazy rules transformed in matching rules, it's better enhance
>> your guards to not have for one input element two rules matching
>>
>> and keep your StateMachine rule dropping called to lazy rules
>>
>> for first tests keep only the creation of modules !
>>
>> Regards !
>>
>>>>
>>>> what does the rule matching elements containing your statemachine ?
>>>>
>>>
>>> I attached the ATL file, to see how the rules correponding to the
>>> elements of the state machine look like and how they are called.
>>>
>>> I appreciate your help very much.
>>> Adina
>>>
>>>> Adina Aniculaesei a écrit :
>>>>> Hello,
>>>>> I'm transforming a UML statemachine model to NuSMV.
>>>>> The UML model contains two statemachines. However I get information
>>>>> printed out in the output file for only one statemachine.
>>>>> Moreover, the output file doesn't seem to be organized in a manner
>>>>> that would show me which states or transitions belong to which
>>>>> statemachine.
>>>>>
>>>>> The matched rule of my transformation looks like this:
>>>>> rule StateMachine2Module {
>>>>> from
>>>>> s : UML!StateMachine
>>>>> to
>>>>> t : NuSMV!TModule (
>>>>> moduleName <- s.name,
>>>>>
>>>>> define <- s.region->select(r | r.subvertex->select(v
>>>>> | not v.isInitial and not v.isFinal)
>>>>> ->collect(v | thisModule.Vertex2Define(v)) ),
>>>>>
>>>>> variable <- s.region->select(r | r.subvertex->select(v
>>>>> | v.isInitial)->collect(v |thisModule.InitialState2Init(v))),
>>>>> assign <- s.region->select(r | r.transition->select(t
>>>>> | t.source.isPseudostate)->collect(t
>>>>> | thisModule.TransitionFromPseudostate2Assign(t))) )
>>>>> }
>>>>> The rules called in the matched rule are unique lazy rules.
>>>>>
>>>>> This rule works partially, meaning it gives me the "moduleName" and
>>>>> the elements of the collection "define" for example. If in addition
>>>>> to the "define" elements I try to print out the "variable" or the
>>>>> "assign" elements , the result is the same, as if these lines
>>>>> corresponding to them were commented in code of the rule.
>>>>>
>>>>> I have never actually managed to make an ATL matched rule work with
>>>>> more then two assignments in the target. However, I've seen many
>>>>> examples which show that this is possible. I don't know what I'm
>>>>> doing wrong here.
>>>>>
>>>>> Any help would be much appreciated.
>>>>> Thanks in advance
>>>>> Adina
>>>
>




Re: [ATL] Several problems [message #99971 is a reply to message #99911] Fri, 13 February 2009 19:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aaniculaesei.gmail.com

Hi
Thanks for the top level rule. It works nice. Also the fact that
"module" is a keyword of atl language doesn't seem to make a
difference, that is no errors, no warnings, contrary to what I've expected.

Now I try to print out the states of each state machine, but they are
shown outside the corresponding <module> tag and outside of the
<DocumentRoot> tag.

The rule is:
rule StateMachine2Module {
from
s : UML!StateMachine
to
t : NuSMV!TModule (
moduleName <- s.name,
define <- s.region->select(r | r.subvertex->select(v | not
v.isInitial and not v.isFinal)
->collect(v | thisModule.Vertex2Define(v))
->union(s.region->select(r | r.subvertex
->select(v | v.isFinal)->collect(v |
thisModule.FinalState2Define(v))))
)
)

I try to access the containing state machine, but it doesn't work.
rule StateMachine2Module {
from
s : UML!StateMachine
to
t : NuSMV!TModule (
moduleName <- s.name,
define <- UML!Vertex.allInstances()->select(v | s =
v.containingStateMachine())
->collect(v | thisModule.Vertex2Define(v))
)
}

Thanks in advance for any help.
Adina


Tristan FAURE wrote:
> Hi we advance a little
> I checked your metamodel and ...
>
> i think your top level rule is
>
>
> -- @top level rule
> rule Model2ModuleContainer {
> from
> s : UML!Model
> to
> t : NuSMV!DocumentRoot(
> nuSMVModel <- model
> ),
> model : NuSMV!TNuSMV(
> modules <- someModules
> ),
> someModules : NuSMV!TModules(
> module <- UML!StateMachine.allInstances()
> )
> }
>
> rule StateMachine2TModule (
> from s : UML!StateMachine
>
>
> ..........
>
>
> Maybe you should consider this for starting and for atl keyword maybe
> you should rename it and regenerate your metamodel api :/
>
> Adina Aniculaesei a écrit :
>> Hello, Thank you for your answers until now.
>> I wrote the following rule to call the rule for each instance of the
>> state machine.
>>
>> -- @top level rule
>> rule Model2ModuleContainer {
>> from
>> s : UML!UML
>> to
>> t : NuSMV!TModules (
>> module <- UML!StateMachine.allInstances()
>> )
>> }
>>
>> The output file is empty after running this rule. I tried to call on
>> every instance the rule for state machine, but to no result.
>> That is, I made the rule for state machine as "lazy"
>> and in the target I wrote:
>>
>> module <- UML!StateMachine.allInstances()->collect(sm |
>> sm.thisModule.StateMachine2Module(sm))
>> Also do you know what can I do if an element of the target model has
>> the same name as an atl keyword ? In this case is the word "module"
>> which happens to be a component of the NuSMV type TModules. "module"
>> is in this case a sequence of one or more modules, each module being
>> of type TModule.
>>
>> I attached the metamodel file and the XSD file correponding to it.
>> I tried to modify both of them replacing the word "module" but it
>> didn't work.
>>
>> Thanks again
>> Adina
>>
>> Tristan FAURE wrote:
>>> Hi again !
>>>
>>> I think there is some misunderstanding please see comments bellow and
>>> i'm sure we will success !
>>>
>>> Adina Aniculaesei a écrit :
>>>> Hi
>>>>
>>>> Tristan FAURE wrote:
>>>>> Hi
>>>>>
>>>>> I think we can't help without more information
>>>>>
>>>>> why do you use unique lazy rules and not matching rules in your rule ?
>>>> If in the rule of the statemachine I call matched rules for the
>>>> elements contained in the statemachine, in the output file I get
>>>> only empty tags like:
>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>
>>>> <NuSMV:TModule/>
>>>> <NuSMV:TModule/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TDefine/>
>>>> <NuSMV:TInitVarValue/>
>>>> </xmi:XMI>
>>>>
>>>> However if I call lazy rules, the output file looks like this:
>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>
>>>> <NuSMV:TModule moduleName="SM_Client"/>
>>>> <NuSMV:TModule/>
>>>> <NuSMV:TDefine defName="State_0"/>
>>>> <NuSMV:TDefine defName="State_1"/>
>>>> <NuSMV:TDefine defName="State_2"/>
>>>> <NuSMV:TDefine defName="State_3"/>
>>>> <NuSMV:TDefine defName="State_4"/>
>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>> </xmi:XMI>
>>>
>>> First it will be good to have your meta model target but it seems
>>> that NuSMV:TModule is your top level element ? if it is the case i
>>> found strange that you want a tree with multiple roots ? maybe you
>>> should reconsider a new metamodel with a top level containing
>>> (containment relation) modules ?
>>>
>>>>
>>>> I want to have something like this:
>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>
>>>> -- first state machine translated in NuSMV
>>>> <NuSMV:TModule moduleName="SM_Client">
>>>> <NuSMV:TDefine defName="State_0"/>
>>>> <NuSMV:TDefine defName="State_1"/>
>>>> <NuSMV:TDefine defName="State_2"/>
>>>> <NuSMV:TDefine defName="State_3"/>
>>>> <NuSMV:TDefine defName="State_4"/>
>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>> <NuSMV:TModule/>
>>>> -- second state machine translated in NuSMV
>>>> <NuSMV:TModule moduleName="SM_Lock">
>>>> ...
>>>> <NuSMV:TModule/>
>>>> </xmi:XMI>
>>>>
>>>> or at least:
>>>> <NuSMV:TModule moduleName="SM_Client"/>
>>>> <NuSMV:TDefine defName="State_0"/>
>>>> <NuSMV:TDefine defName="State_1"/>
>>>> <NuSMV:TDefine defName="State_2"/>
>>>> <NuSMV:TDefine defName="State_3"/>
>>>> <NuSMV:TDefine defName="State_4"/>
>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>> <NuSMV:TModule moduleName="SM_Lock"/>
>>>> -- and here the elements of the second state machine
>>>>
>>>> I only used the unique lazy rules thinking I could get it better,
>>>> but it has the same effect as when calling lazy rules.
>>>>
>>>
>>> In you atl file you have one matching rule as i said before for each
>>> state machine atl will create a new Module if it is the top level
>>> element it won't succeed what i imagine
>>>
>>> a top matching level rule {
>>> Model to ModuleContainer (
>>> modules <- UML!StateMachine.allIstances() ; -- with this
>>> assignment atl will look for matching rules matching state machines
>>> )
>>> }
>>>
>>> all your lazy rules transformed in matching rules, it's better
>>> enhance your guards to not have for one input element two rules matching
>>>
>>> and keep your StateMachine rule dropping called to lazy rules
>>>
>>> for first tests keep only the creation of modules !
>>>
>>> Regards !
>>>
>>>>>
>>>>> what does the rule matching elements containing your statemachine ?
>>>>>
>>>>
>>>> I attached the ATL file, to see how the rules correponding to the
>>>> elements of the state machine look like and how they are called.
>>>>
>>>> I appreciate your help very much.
>>>> Adina
>>>>
>>>>> Adina Aniculaesei a écrit :
>>>>>> Hello,
>>>>>> I'm transforming a UML statemachine model to NuSMV.
>>>>>> The UML model contains two statemachines. However I get
>>>>>> information printed out in the output file for only one statemachine.
>>>>>> Moreover, the output file doesn't seem to be organized in a manner
>>>>>> that would show me which states or transitions belong to which
>>>>>> statemachine.
>>>>>>
>>>>>> The matched rule of my transformation looks like this:
>>>>>> rule StateMachine2Module {
>>>>>> from
>>>>>> s : UML!StateMachine
>>>>>> to
>>>>>> t : NuSMV!TModule (
>>>>>> moduleName <- s.name,
>>>>>>
>>>>>> define <- s.region->select(r | r.subvertex->select(v
>>>>>> | not v.isInitial and not v.isFinal)
>>>>>> ->collect(v | thisModule.Vertex2Define(v)) ),
>>>>>>
>>>>>> variable <- s.region->select(r | r.subvertex->select(v
>>>>>> | v.isInitial)->collect(v
>>>>>> |thisModule.InitialState2Init(v))),
>>>>>> assign <- s.region->select(r | r.transition->select(t
>>>>>> | t.source.isPseudostate)->collect(t
>>>>>> |
>>>>>> thisModule.TransitionFromPseudostate2Assign(t))) )
>>>>>> }
>>>>>> The rules called in the matched rule are unique lazy rules.
>>>>>>
>>>>>> This rule works partially, meaning it gives me the "moduleName"
>>>>>> and the elements of the collection "define" for example. If in
>>>>>> addition to the "define" elements I try to print out the
>>>>>> "variable" or the "assign" elements , the result is the same, as
>>>>>> if these lines corresponding to them were commented in code of the
>>>>>> rule.
>>>>>>
>>>>>> I have never actually managed to make an ATL matched rule work
>>>>>> with more then two assignments in the target. However, I've seen
>>>>>> many examples which show that this is possible. I don't know what
>>>>>> I'm doing wrong here.
>>>>>>
>>>>>> Any help would be much appreciated.
>>>>>> Thanks in advance
>>>>>> Adina
>>>>
>>
Re: [ATL] Several problems [message #99989 is a reply to message #99971] Fri, 13 February 2009 19:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aaniculaesei.gmail.com

Hi again,
I should also mention that I left the rules called by the state machine
rule as lazy rules. If I turn them to match rules the only thing I get
are empty NuSMV tags <NuSMV:TDefine/> outside the top level element,
which in this case is <module>.

Many thanks
Adina
Adina Aniculaesei wrote:
> Hi
> Thanks for the top level rule. It works nice. Also the fact that
> "module" is a keyword of atl language doesn't seem to make a
> difference, that is no errors, no warnings, contrary to what I've expected.
>
> Now I try to print out the states of each state machine, but they are
> shown outside the corresponding <module> tag and outside of the
> <DocumentRoot> tag.
>
> The rule is:
> rule StateMachine2Module {
> from
> s : UML!StateMachine
> to
> t : NuSMV!TModule (
> moduleName <- s.name,
> define <- s.region->select(r | r.subvertex->select(v |
> not v.isInitial and not v.isFinal)
> ->collect(v | thisModule.Vertex2Define(v))
> ->union(s.region->select(r | r.subvertex
> ->select(v | v.isFinal)->collect(v
> | thisModule.FinalState2Define(v))))
> )
> )
>
> I try to access the containing state machine, but it doesn't work.
> rule StateMachine2Module {
> from
> s : UML!StateMachine
> to
> t : NuSMV!TModule (
> moduleName <- s.name,
> define <- UML!Vertex.allInstances()->select(v | s
> = v.containingStateMachine())
> ->collect(v | thisModule.Vertex2Define(v))
> )
> }
>
> Thanks in advance for any help.
> Adina
>
>
> Tristan FAURE wrote:
>> Hi we advance a little
>> I checked your metamodel and ...
>>
>> i think your top level rule is
>>
>>
>> -- @top level rule
>> rule Model2ModuleContainer {
>> from
>> s : UML!Model
>> to
>> t : NuSMV!DocumentRoot(
>> nuSMVModel <- model
>> ),
>> model : NuSMV!TNuSMV(
>> modules <- someModules
>> ),
>> someModules : NuSMV!TModules(
>> module <- UML!StateMachine.allInstances()
>> )
>> }
>>
>> rule StateMachine2TModule (
>> from s : UML!StateMachine
>>
>>
>> ..........
>>
>>
>> Maybe you should consider this for starting and for atl keyword maybe
>> you should rename it and regenerate your metamodel api :/
>>
>> Adina Aniculaesei a écrit :
>>> Hello, Thank you for your answers until now.
>>> I wrote the following rule to call the rule for each instance of the
>>> state machine.
>>>
>>> -- @top level rule
>>> rule Model2ModuleContainer {
>>> from
>>> s : UML!UML
>>> to
>>> t : NuSMV!TModules (
>>> module <- UML!StateMachine.allInstances()
>>> )
>>> }
>>>
>>> The output file is empty after running this rule. I tried to call on
>>> every instance the rule for state machine, but to no result.
>>> That is, I made the rule for state machine as "lazy"
>>> and in the target I wrote:
>>>
>>> module <- UML!StateMachine.allInstances()->collect(sm |
>>> sm.thisModule.StateMachine2Module(sm)) Also do you know what can I
>>> do if an element of the target model has the same name as an atl
>>> keyword ? In this case is the word "module" which happens to be a
>>> component of the NuSMV type TModules. "module" is in this case a
>>> sequence of one or more modules, each module being of type TModule.
>>>
>>> I attached the metamodel file and the XSD file correponding to it.
>>> I tried to modify both of them replacing the word "module" but it
>>> didn't work.
>>>
>>> Thanks again
>>> Adina
>>>
>>> Tristan FAURE wrote:
>>>> Hi again !
>>>>
>>>> I think there is some misunderstanding please see comments bellow
>>>> and i'm sure we will success !
>>>>
>>>> Adina Aniculaesei a écrit :
>>>>> Hi
>>>>>
>>>>> Tristan FAURE wrote:
>>>>>> Hi
>>>>>>
>>>>>> I think we can't help without more information
>>>>>>
>>>>>> why do you use unique lazy rules and not matching rules in your
>>>>>> rule ?
>>>>> If in the rule of the statemachine I call matched rules for the
>>>>> elements contained in the statemachine, in the output file I get
>>>>> only empty tags like:
>>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>>
>>>>> <NuSMV:TModule/>
>>>>> <NuSMV:TModule/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TDefine/>
>>>>> <NuSMV:TInitVarValue/>
>>>>> </xmi:XMI>
>>>>>
>>>>> However if I call lazy rules, the output file looks like this:
>>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>>
>>>>> <NuSMV:TModule moduleName="SM_Client"/>
>>>>> <NuSMV:TModule/>
>>>>> <NuSMV:TDefine defName="State_0"/>
>>>>> <NuSMV:TDefine defName="State_1"/>
>>>>> <NuSMV:TDefine defName="State_2"/>
>>>>> <NuSMV:TDefine defName="State_3"/>
>>>>> <NuSMV:TDefine defName="State_4"/>
>>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>>> </xmi:XMI>
>>>>
>>>> First it will be good to have your meta model target but it seems
>>>> that NuSMV:TModule is your top level element ? if it is the case i
>>>> found strange that you want a tree with multiple roots ? maybe you
>>>> should reconsider a new metamodel with a top level containing
>>>> (containment relation) modules ?
>>>>
>>>>>
>>>>> I want to have something like this:
>>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>>
>>>>> -- first state machine translated in NuSMV
>>>>> <NuSMV:TModule moduleName="SM_Client">
>>>>> <NuSMV:TDefine defName="State_0"/>
>>>>> <NuSMV:TDefine defName="State_1"/>
>>>>> <NuSMV:TDefine defName="State_2"/>
>>>>> <NuSMV:TDefine defName="State_3"/>
>>>>> <NuSMV:TDefine defName="State_4"/>
>>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>>> <NuSMV:TModule/>
>>>>> -- second state machine translated in NuSMV
>>>>> <NuSMV:TModule moduleName="SM_Lock">
>>>>> ...
>>>>> <NuSMV:TModule/>
>>>>> </xmi:XMI>
>>>>>
>>>>> or at least:
>>>>> <NuSMV:TModule moduleName="SM_Client"/>
>>>>> <NuSMV:TDefine defName="State_0"/>
>>>>> <NuSMV:TDefine defName="State_1"/>
>>>>> <NuSMV:TDefine defName="State_2"/>
>>>>> <NuSMV:TDefine defName="State_3"/>
>>>>> <NuSMV:TDefine defName="State_4"/>
>>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>>> <NuSMV:TModule moduleName="SM_Lock"/>
>>>>> -- and here the elements of the second state machine
>>>>>
>>>>> I only used the unique lazy rules thinking I could get it better,
>>>>> but it has the same effect as when calling lazy rules.
>>>>>
>>>>
>>>> In you atl file you have one matching rule as i said before for each
>>>> state machine atl will create a new Module if it is the top level
>>>> element it won't succeed what i imagine
>>>>
>>>> a top matching level rule {
>>>> Model to ModuleContainer (
>>>> modules <- UML!StateMachine.allIstances() ; -- with this
>>>> assignment atl will look for matching rules matching state machines
>>>> )
>>>> }
>>>>
>>>> all your lazy rules transformed in matching rules, it's better
>>>> enhance your guards to not have for one input element two rules
>>>> matching
>>>>
>>>> and keep your StateMachine rule dropping called to lazy rules
>>>>
>>>> for first tests keep only the creation of modules !
>>>>
>>>> Regards !
>>>>
>>>>>>
>>>>>> what does the rule matching elements containing your statemachine ?
>>>>>>
>>>>>
>>>>> I attached the ATL file, to see how the rules correponding to the
>>>>> elements of the state machine look like and how they are called.
>>>>>
>>>>> I appreciate your help very much.
>>>>> Adina
>>>>>
>>>>>> Adina Aniculaesei a écrit :
>>>>>>> Hello,
>>>>>>> I'm transforming a UML statemachine model to NuSMV.
>>>>>>> The UML model contains two statemachines. However I get
>>>>>>> information printed out in the output file for only one
>>>>>>> statemachine.
>>>>>>> Moreover, the output file doesn't seem to be organized in a
>>>>>>> manner that would show me which states or transitions belong to
>>>>>>> which statemachine.
>>>>>>>
>>>>>>> The matched rule of my transformation looks like this:
>>>>>>> rule StateMachine2Module {
>>>>>>> from
>>>>>>> s : UML!StateMachine
>>>>>>> to
>>>>>>> t : NuSMV!TModule (
>>>>>>> moduleName <- s.name,
>>>>>>>
>>>>>>> define <- s.region->select(r | r.subvertex->select(v
>>>>>>> | not v.isInitial and not v.isFinal)
>>>>>>> ->collect(v | thisModule.Vertex2Define(v)) ),
>>>>>>>
>>>>>>> variable <- s.region->select(r | r.subvertex->select(v
>>>>>>> | v.isInitial)->collect(v
>>>>>>> |thisModule.InitialState2Init(v))),
>>>>>>> assign <- s.region->select(r | r.transition->select(t
>>>>>>> | t.source.isPseudostate)->collect(t
>>>>>>> |
>>>>>>> thisModule.TransitionFromPseudostate2Assign(t))) )
>>>>>>> }
>>>>>>> The rules called in the matched rule are unique lazy rules.
>>>>>>>
>>>>>>> This rule works partially, meaning it gives me the "moduleName"
>>>>>>> and the elements of the collection "define" for example. If in
>>>>>>> addition to the "define" elements I try to print out the
>>>>>>> "variable" or the "assign" elements , the result is the same, as
>>>>>>> if these lines corresponding to them were commented in code of
>>>>>>> the rule.
>>>>>>>
>>>>>>> I have never actually managed to make an ATL matched rule work
>>>>>>> with more then two assignments in the target. However, I've seen
>>>>>>> many examples which show that this is possible. I don't know what
>>>>>>> I'm doing wrong here.
>>>>>>>
>>>>>>> Any help would be much appreciated.
>>>>>>> Thanks in advance
>>>>>>> Adina
>>>>>
>>>
Re: [ATL] Several problems [message #100017 is a reply to message #99989] Mon, 16 February 2009 08:33 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Hi if your elements are outside the model it's a containment problem as
i see in your metamodel define is correctly set to containment at true.

Is this value changed ? did you regenerate api when it changes ?

if it never changed maybe you should use debug('') expression on your
selects to see if your ocl expressions worked ..;

Adina Aniculaesei a écrit :
> Hi again,
> I should also mention that I left the rules called by the state machine
> rule as lazy rules. If I turn them to match rules the only thing I get
> are empty NuSMV tags <NuSMV:TDefine/> outside the top level element,
> which in this case is <module>.
>
> Many thanks
> Adina
> Adina Aniculaesei wrote:
>> Hi
>> Thanks for the top level rule. It works nice. Also the fact that
>> "module" is a keyword of atl language doesn't seem to make a
>> difference, that is no errors, no warnings, contrary to what I've
>> expected.
>>
>> Now I try to print out the states of each state machine, but they are
>> shown outside the corresponding <module> tag and outside of the
>> <DocumentRoot> tag.
>>
>> The rule is:
>> rule StateMachine2Module {
>> from
>> s : UML!StateMachine
>> to
>> t : NuSMV!TModule (
>> moduleName <- s.name,
>> define <- s.region->select(r | r.subvertex->select(v |
>> not v.isInitial and not v.isFinal)
>> ->collect(v | thisModule.Vertex2Define(v))
>> ->union(s.region->select(r | r.subvertex
>> ->select(v | v.isFinal)->collect(v
>> | thisModule.FinalState2Define(v))))
>> )
>> )
>>
>> I try to access the containing state machine, but it doesn't work.
>> rule StateMachine2Module {
>> from
>> s : UML!StateMachine
>> to
>> t : NuSMV!TModule (
>> moduleName <- s.name,
>> define <- UML!Vertex.allInstances()->select(v | s
>> = v.containingStateMachine())
>> ->collect(v | thisModule.Vertex2Define(v))
>> )
>> }
>>
>> Thanks in advance for any help.
>> Adina
>>
>>
>> Tristan FAURE wrote:
>>> Hi we advance a little
>>> I checked your metamodel and ...
>>>
>>> i think your top level rule is
>>>
>>>
>>> -- @top level rule
>>> rule Model2ModuleContainer {
>>> from
>>> s : UML!Model
>>> to
>>> t : NuSMV!DocumentRoot(
>>> nuSMVModel <- model
>>> ),
>>> model : NuSMV!TNuSMV(
>>> modules <- someModules
>>> ),
>>> someModules : NuSMV!TModules(
>>> module <- UML!StateMachine.allInstances()
>>> )
>>> }
>>>
>>> rule StateMachine2TModule (
>>> from s : UML!StateMachine
>>>
>>>
>>> ..........
>>>
>>>
>>> Maybe you should consider this for starting and for atl keyword maybe
>>> you should rename it and regenerate your metamodel api :/
>>>
>>> Adina Aniculaesei a écrit :
>>>> Hello, Thank you for your answers until now.
>>>> I wrote the following rule to call the rule for each instance of the
>>>> state machine.
>>>>
>>>> -- @top level rule
>>>> rule Model2ModuleContainer {
>>>> from
>>>> s : UML!UML
>>>> to
>>>> t : NuSMV!TModules (
>>>> module <- UML!StateMachine.allInstances()
>>>> )
>>>> }
>>>>
>>>> The output file is empty after running this rule. I tried to call on
>>>> every instance the rule for state machine, but to no result.
>>>> That is, I made the rule for state machine as "lazy"
>>>> and in the target I wrote:
>>>>
>>>> module <- UML!StateMachine.allInstances()->collect(sm |
>>>> sm.thisModule.StateMachine2Module(sm)) Also do you know what can I
>>>> do if an element of the target model has the same name as an atl
>>>> keyword ? In this case is the word "module" which happens to be a
>>>> component of the NuSMV type TModules. "module" is in this case a
>>>> sequence of one or more modules, each module being of type TModule.
>>>>
>>>> I attached the metamodel file and the XSD file correponding to it.
>>>> I tried to modify both of them replacing the word "module" but it
>>>> didn't work.
>>>>
>>>> Thanks again
>>>> Adina
>>>>
>>>> Tristan FAURE wrote:
>>>>> Hi again !
>>>>>
>>>>> I think there is some misunderstanding please see comments bellow
>>>>> and i'm sure we will success !
>>>>>
>>>>> Adina Aniculaesei a écrit :
>>>>>> Hi
>>>>>>
>>>>>> Tristan FAURE wrote:
>>>>>>> Hi
>>>>>>>
>>>>>>> I think we can't help without more information
>>>>>>>
>>>>>>> why do you use unique lazy rules and not matching rules in your
>>>>>>> rule ?
>>>>>> If in the rule of the statemachine I call matched rules for the
>>>>>> elements contained in the statemachine, in the output file I get
>>>>>> only empty tags like:
>>>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>>>
>>>>>> <NuSMV:TModule/>
>>>>>> <NuSMV:TModule/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TDefine/>
>>>>>> <NuSMV:TInitVarValue/>
>>>>>> </xmi:XMI>
>>>>>>
>>>>>> However if I call lazy rules, the output file looks like this:
>>>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>>>
>>>>>> <NuSMV:TModule moduleName="SM_Client"/>
>>>>>> <NuSMV:TModule/>
>>>>>> <NuSMV:TDefine defName="State_0"/>
>>>>>> <NuSMV:TDefine defName="State_1"/>
>>>>>> <NuSMV:TDefine defName="State_2"/>
>>>>>> <NuSMV:TDefine defName="State_3"/>
>>>>>> <NuSMV:TDefine defName="State_4"/>
>>>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>>>> </xmi:XMI>
>>>>>
>>>>> First it will be good to have your meta model target but it seems
>>>>> that NuSMV:TModule is your top level element ? if it is the case i
>>>>> found strange that you want a tree with multiple roots ? maybe you
>>>>> should reconsider a new metamodel with a top level containing
>>>>> (containment relation) modules ?
>>>>>
>>>>>>
>>>>>> I want to have something like this:
>>>>>> <?xml version="1.0" encoding="ISO-8859-1"?>
>>>>>> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
>>>>>> xmlns:NuSMV=" file:/D:/Documents/TOP-MAAT-Praktikum/workspace-atl/Uml2NuSm v/NuSMV.xsd ">
>>>>>>
>>>>>> -- first state machine translated in NuSMV
>>>>>> <NuSMV:TModule moduleName="SM_Client">
>>>>>> <NuSMV:TDefine defName="State_0"/>
>>>>>> <NuSMV:TDefine defName="State_1"/>
>>>>>> <NuSMV:TDefine defName="State_2"/>
>>>>>> <NuSMV:TDefine defName="State_3"/>
>>>>>> <NuSMV:TDefine defName="State_4"/>
>>>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>>>> <NuSMV:TModule/>
>>>>>> -- second state machine translated in NuSMV
>>>>>> <NuSMV:TModule moduleName="SM_Lock">
>>>>>> ...
>>>>>> <NuSMV:TModule/>
>>>>>> </xmi:XMI>
>>>>>>
>>>>>> or at least:
>>>>>> <NuSMV:TModule moduleName="SM_Client"/>
>>>>>> <NuSMV:TDefine defName="State_0"/>
>>>>>> <NuSMV:TDefine defName="State_1"/>
>>>>>> <NuSMV:TDefine defName="State_2"/>
>>>>>> <NuSMV:TDefine defName="State_3"/>
>>>>>> <NuSMV:TDefine defName="State_4"/>
>>>>>> <NuSMV:TDefine defName="FinalState_0"/>
>>>>>> <NuSMV:TModule moduleName="SM_Lock"/>
>>>>>> -- and here the elements of the second state machine
>>>>>>
>>>>>> I only used the unique lazy rules thinking I could get it better,
>>>>>> but it has the same effect as when calling lazy rules.
>>>>>>
>>>>>
>>>>> In you atl file you have one matching rule as i said before for
>>>>> each state machine atl will create a new Module if it is the top
>>>>> level element it won't succeed what i imagine
>>>>>
>>>>> a top matching level rule {
>>>>> Model to ModuleContainer (
>>>>> modules <- UML!StateMachine.allIstances() ; -- with this
>>>>> assignment atl will look for matching rules matching state machines
>>>>> )
>>>>> }
>>>>>
>>>>> all your lazy rules transformed in matching rules, it's better
>>>>> enhance your guards to not have for one input element two rules
>>>>> matching
>>>>>
>>>>> and keep your StateMachine rule dropping called to lazy rules
>>>>>
>>>>> for first tests keep only the creation of modules !
>>>>>
>>>>> Regards !
>>>>>
>>>>>>>
>>>>>>> what does the rule matching elements containing your statemachine ?
>>>>>>>
>>>>>>
>>>>>> I attached the ATL file, to see how the rules correponding to the
>>>>>> elements of the state machine look like and how they are called.
>>>>>>
>>>>>> I appreciate your help very much.
>>>>>> Adina
>>>>>>
>>>>>>> Adina Aniculaesei a écrit :
>>>>>>>> Hello,
>>>>>>>> I'm transforming a UML statemachine model to NuSMV.
>>>>>>>> The UML model contains two statemachines. However I get
>>>>>>>> information printed out in the output file for only one
>>>>>>>> statemachine.
>>>>>>>> Moreover, the output file doesn't seem to be organized in a
>>>>>>>> manner that would show me which states or transitions belong to
>>>>>>>> which statemachine.
>>>>>>>>
>>>>>>>> The matched rule of my transformation looks like this:
>>>>>>>> rule StateMachine2Module {
>>>>>>>> from
>>>>>>>> s : UML!StateMachine
>>>>>>>> to
>>>>>>>> t : NuSMV!TModule (
>>>>>>>> moduleName <- s.name,
>>>>>>>>
>>>>>>>> define <- s.region->select(r | r.subvertex->select(v
>>>>>>>> | not v.isInitial and not v.isFinal)
>>>>>>>> ->collect(v | thisModule.Vertex2Define(v)) ),
>>>>>>>>
>>>>>>>> variable <- s.region->select(r | r.subvertex->select(v
>>>>>>>> | v.isInitial)->collect(v
>>>>>>>> |thisModule.InitialState2Init(v))),
>>>>>>>> assign <- s.region->select(r | r.transition->select(t
>>>>>>>> | t.source.isPseudostate)->collect(t
>>>>>>>> |
>>>>>>>> thisModule.TransitionFromPseudostate2Assign(t))) )
>>>>>>>> }
>>>>>>>> The rules called in the matched rule are unique lazy rules.
>>>>>>>>
>>>>>>>> This rule works partially, meaning it gives me the "moduleName"
>>>>>>>> and the elements of the collection "define" for example. If in
>>>>>>>> addition to the "define" elements I try to print out the
>>>>>>>> "variable" or the "assign" elements , the result is the same, as
>>>>>>>> if these lines corresponding to them were commented in code of
>>>>>>>> the rule.
>>>>>>>>
>>>>>>>> I have never actually managed to make an ATL matched rule work
>>>>>>>> with more then two assignments in the target. However, I've seen
>>>>>>>> many examples which show that this is possible. I don't know
>>>>>>>> what I'm doing wrong here.
>>>>>>>>
>>>>>>>> Any help would be much appreciated.
>>>>>>>> Thanks in advance
>>>>>>>> Adina
>>>>>>
>>>>




Re: [ATL] Several problems [message #102074 is a reply to message #100017] Fri, 20 March 2009 02:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: aaniculaesei.gmail.com

This is a multi-part message in MIME format.
--------------050202010906020103030205
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello Tristan,
Thanks for all the help until now and sorry to get back to you so late
with a feedback. I've run the Debug on my ATL code and I get the
following error messages in console:

SEVERE: ********************************* ERROR
*********************************
SEVERE:
java.lang.Exception
at
org.eclipse.m2m.atl.engine.vm.NetworkDebugger.error(NetworkD ebugger.java:165)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:91)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:103)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.debug(AtlLauncher.jav a:105)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:324)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.access$0(AtlR egularVM.java:408)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM$1.run(AtlRegu larVM.java:386)
SEVERE: Message: ERROR: could not find operation not on Sequence(OclAny)
having supertypes: [Collection(OclAny)]
SEVERE: A.main() : ??#42 null
SEVERE: local variables = {self=Uml2NuSmv : ASMModule}
SEVERE: local stack = []
SEVERE: A.__exec__() : ??#18 null
SEVERE: local variables = {self=Uml2NuSmv : ASMModule, e=TransientLink
{rule = 'StateMachine2Module', sourceElements = {s =
flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
{}}}
SEVERE: local stack = []
SEVERE: A.__applyStateMachine2Module(1 : NTransientLink;) : ??#53
59:14-60:52
SEVERE: local variables = {t=nusmv!<unnamed>, null=flattUml!State_4,
s=flattUml!SM_Client, self=Uml2NuSmv : ASMModule, r=flattUml!Region_0,
link=TransientLink {rule = 'StateMachine2Module', sourceElements = {s =
flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
{}}}
SEVERE: local stack = [nusmv!<unnamed>, nusmv!<unnamed>, Uml2NuSmv :
ASMModule, Sequence {}]
SEVERE:
************************************************************ *************
SEVERE: ********************************* ERROR
*********************************
SEVERE:
java.lang.Exception
at
org.eclipse.m2m.atl.engine.vm.NetworkDebugger.error(NetworkD ebugger.java:165)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
at
org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:87)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.debug(AtlLauncher.jav a:105)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:324)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.access$0(AtlR egularVM.java:408)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM$1.run(AtlRegu larVM.java:386)
SEVERE: org.eclipse.m2m.atl.engine.vm.nativelib.ASMSequence
java.lang.ClassCastException:
org.eclipse.m2m.atl.engine.vm.nativelib.ASMSequence
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:319)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
at
org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
at
org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
at org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
at
org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
at org.eclipse.m2m.atl.engine.AtlLauncher.debug(AtlLauncher.jav a:105)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:324)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM.access$0(AtlR egularVM.java:408)
at
org.eclipse.m2m.atl.adt.launching.AtlRegularVM$1.run(AtlRegu larVM.java:386)
SEVERE: A.main() : ??#42 null
SEVERE: local variables = {self=Uml2NuSmv : ASMModule}
SEVERE: local stack = []
SEVERE: A.__exec__() : ??#18 null
SEVERE: local variables = {self=Uml2NuSmv : ASMModule, e=TransientLink
{rule = 'StateMachine2Module', sourceElements = {s =
flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
{}}}
SEVERE: local stack = []
SEVERE: A.__applyStateMachine2Module(1 : NTransientLink;) : ??#54
59:14-60:52
SEVERE: local variables = {t=nusmv!<unnamed>, null=flattUml!State_4,
s=flattUml!SM_Client, self=Uml2NuSmv : ASMModule, r=flattUml!Region_0,
link=TransientLink {rule = 'StateMachine2Module', sourceElements = {s =
flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
{}}}
SEVERE: local stack = [nusmv!<unnamed>, nusmv!<unnamed>, Uml2NuSmv :
ASMModule]
SEVERE:
************************************************************ *************

What does the following error message mean:
SEVERE: Message: ERROR: could not find operation not on Sequence(OclAny)
having supertypes: [Collection(OclAny)]

I attached the transformation file.

Many thanks in advance.
Adina

Tristan FAURE wrote:
> Hi if your elements are outside the model it's a containment problem as
> i see in your metamodel define is correctly set to containment at true.
>
> Is this value changed ? did you regenerate api when it changes ?
>
> if it never changed maybe you should use debug('') expression on your
> selects to see if your ocl expressions worked ..;
>
> Adina Aniculaesei a
Re: [ATL] Several problems [message #102089 is a reply to message #102074] Fri, 20 March 2009 09:09 Go to previous message
Eclipse UserFriend
Originally posted by: aaniculaesei.gmail.com

This is a multi-part message in MIME format.
--------------040006070107000700000609
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello again,
I've revised the transformation in order not to have as a condition for
select something like this:
not v.isInitial and not v.isFinal
but the output is just the same, in console as well as in the output file.

It looks like it doesn't find the "not" operation on a sequence or on
the elements of a sequence. Why does it do that I have no idea.

Thanks in advance for any help
Adina

Adina Aniculaesei wrote:
> Hello Tristan,
> Thanks for all the help until now and sorry to get back to you so late
> with a feedback. I've run the Debug on my ATL code and I get the
> following error messages in console:
>
> SEVERE: ********************************* ERROR
> *********************************
> SEVERE:
> java.lang.Exception
> at
> org.eclipse.m2m.atl.engine.vm.NetworkDebugger.error(NetworkD ebugger.java:165)
>
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
>
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:91)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:103)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
> at org.eclipse.m2m.atl.engine.AtlLauncher.debug(AtlLauncher.jav a:105)
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:324)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.access$0(AtlR egularVM.java:408)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM$1.run(AtlRegu larVM.java:386)
> SEVERE: Message: ERROR: could not find operation not on Sequence(OclAny)
> having supertypes: [Collection(OclAny)]
> SEVERE: A.main() : ??#42 null
> SEVERE: local variables = {self=Uml2NuSmv : ASMModule}
> SEVERE: local stack = []
> SEVERE: A.__exec__() : ??#18 null
> SEVERE: local variables = {self=Uml2NuSmv : ASMModule,
> e=TransientLink {rule = 'StateMachine2Module', sourceElements = {s =
> flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
> {}}}
> SEVERE: local stack = []
> SEVERE: A.__applyStateMachine2Module(1 : NTransientLink;) : ??#53
> 59:14-60:52
> SEVERE: local variables = {t=nusmv!<unnamed>, null=flattUml!State_4,
> s=flattUml!SM_Client, self=Uml2NuSmv : ASMModule, r=flattUml!Region_0,
> link=TransientLink {rule = 'StateMachine2Module', sourceElements = {s =
> flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
> {}}}
> SEVERE: local stack = [nusmv!<unnamed>, nusmv!<unnamed>, Uml2NuSmv :
> ASMModule, Sequence {}]
> SEVERE:
> ************************************************************ *************
> SEVERE: ********************************* ERROR
> *********************************
> SEVERE:
> java.lang.Exception
> at
> org.eclipse.m2m.atl.engine.vm.NetworkDebugger.error(NetworkD ebugger.java:165)
>
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:95)
>
> at
> org.eclipse.m2m.atl.engine.vm.StackFrame.printStackTrace(Sta ckFrame.java:87)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:173)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
> at org.eclipse.m2m.atl.engine.AtlLauncher.debug(AtlLauncher.jav a:105)
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:324)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.access$0(AtlR egularVM.java:408)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM$1.run(AtlRegu larVM.java:386)
> SEVERE: org.eclipse.m2m.atl.engine.vm.nativelib.ASMSequence
> java.lang.ClassCastException:
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMSequence
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:319)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:338)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:143)
>
> at
> org.eclipse.m2m.atl.engine.vm.nativelib.ASMOclAny.invoke(ASM OclAny.java:101)
>
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.realExec(ASMOpera tion.java:240)
> at
> org.eclipse.m2m.atl.engine.vm.ASMOperation.exec(ASMOperation .java:171)
> at
> org.eclipse.m2m.atl.engine.vm.ASMInterpreter.<init>(ASMInterpreter.java:299)
>
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:169)
> at org.eclipse.m2m.atl.engine.AtlLauncher.launch(AtlLauncher.ja va:111)
> at org.eclipse.m2m.atl.engine.AtlLauncher.debug(AtlLauncher.jav a:105)
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:324)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.runAtlLaunche r(AtlRegularVM.java:426)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM.access$0(AtlR egularVM.java:408)
>
> at
> org.eclipse.m2m.atl.adt.launching.AtlRegularVM$1.run(AtlRegu larVM.java:386)
> SEVERE: A.main() : ??#42 null
> SEVERE: local variables = {self=Uml2NuSmv : ASMModule}
> SEVERE: local stack = []
> SEVERE: A.__exec__() : ??#18 null
> SEVERE: local variables = {self=Uml2NuSmv : ASMModule,
> e=TransientLink {rule = 'StateMachine2Module', sourceElements = {s =
> flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
> {}}}
> SEVERE: local stack = []
> SEVERE: A.__applyStateMachine2Module(1 : NTransientLink;) : ??#54
> 59:14-60:52
> SEVERE: local variables = {t=nusmv!<unnamed>, null=flattUml!State_4,
> s=flattUml!SM_Client, self=Uml2NuSmv : ASMModule, r=flattUml!Region_0,
> link=TransientLink {rule = 'StateMachine2Module', sourceElements = {s =
> flattUml!SM_Client}, targetElements = {t = nusmv!<unnamed>}, variables =
> {}}}
> SEVERE: local stack = [nusmv!<unnamed>, nusmv!<unnamed>, Uml2NuSmv :
> ASMModule]
> SEVERE:
> ************************************************************ *************
>
> What does the following error message mean:
> SEVERE: Message: ERROR: could not find operation not on Sequence(OclAny)
> having supertypes: [Collection(OclAny)]
>
> I attached the transformation file.
>
> Many thanks in advance.
> Adina
>
> Tristan FAURE wrote:
>> Hi if your elements are outside the model it's a containment problem
>> as i see in your metamodel define is correctly set to containment at
>> true.
>>
>> Is this value changed ? did you regenerate api when it changes ?
>>
>> if it never changed maybe you should use debug('') expression on your
>> selects to see if your ocl expressions worked ..;
>>
>> Adina Aniculaesei a
Previous Topic:[ATL] set the values of parameters
Next Topic:From generated model to text
Goto Forum:
  


Current Time: Sat Apr 20 04:08:30 GMT 2024

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

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

Back to the top