[QVT-R] Problem with subvertex [message #550172] |
Thu, 29 July 2010 12:59 |
Bler Messages: 26 Registered: June 2010 |
Junior Member |
|
|
Hi there,
I'm trying desperately to transform an uml state Machine Diagram,. I just wanted to add a new state with a region into the region off the state machine.
The input diagram looks like this:
- package
---- stateMachine
-------- smRegion
-----------.....
After the transformation it looks :
- package
---- stateMachine
--------smRegion
-----------.... .....
-compositeStete
---- csRegion
So it is in the same level of the package, I tray using 'subvertex' but I can't do it...
I would like that it be like this :
- package
----stateMachine
--------smRegion
-----------.... .....
-----------compositeStete
---------------- csRegion
My implementation look like this :
transformation stateMachinesDiagram2stateMachinesDiagram(source : uml, target : uml) {
top relation package2package {
packageName : String;
enforce domain source packageS: uml::Package {
name = packageName
};
checkonly domain target packageT: uml::Package {
name = packageName
};
}
top relation stateMachine2stateMachine {
smName : String;
enforce domain source stateMachineS: uml::StateMachine {
name = smName,
_package = packageS : uml::Package {}
};
checkonly domain target stateMachineT: uml::StateMachine{
name = smName,
_package = packageT : uml::Package {}
};
when{package2package(packageS,packageT);}
}
top relation region2region {
smName : String;
--sv : OrderedSet(uml::Vertex);
enforce domain source regionS: uml::Region {
name = smName,
-- subvertex =sv : uml::Vertex {},
stateMachine = smS : uml::StateMachine {}
};
checkonly domain target regionT: uml::Region{
name = smName,
state = newState : uml::State {
name = 'compositeStete',
region = reg : uml::Region {
name = 'csRegion'
}
},
stateMachine = smT : uml::StateMachine {}
};
when{stateMachine2stateMachine(smS,smT);}
}
}
Someone could help me please, how can I do it please ?
With regards
|
|
|
Re: [QVT-R] Problem with subvertex [message #550260 is a reply to message #550172] |
Thu, 29 July 2010 16:17 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi Bler
Since Eclipse QVTR currently has no execution capability, you are
presumably not using Eclipse QVTr, so you should probably ask on the
support group of whatever tool you are using.
My general approach to a problem that I cannot solve is to debug it,
variously using single step, 'printf', or incremental change.
Regards
Ed Willink
On 29/07/2010 13:59, Bler wrote:
> Hi there,
>
> I'm trying desperately to transform an uml state Machine Diagram,. I
> just wanted to add a new state with a region into the region off the
> state machine.
>
> The input diagram looks like this: - package
> ---- stateMachine
> -------- smRegion
> -----------.....
>
> After the transformation it looks :
> - package
> ---- stateMachine
> --------smRegion
> -----------.... .....
> -compositeStete ---- csRegion
> So it is in the same level of the package, I tray using 'subvertex' but
> I can't do it...
> I would like that it be like this :
>
> - package
> ----stateMachine
> --------smRegion
> -----------.... .....
> -----------compositeStete ---------------- csRegion
>
> My implementation look like this :
>
> transformation stateMachinesDiagram2stateMachinesDiagram(source : uml,
> target : uml) {
> top relation package2package {
> packageName : String;
> enforce domain source packageS: uml::Package {
> name = packageName
> };
> checkonly domain target packageT: uml::Package {
> name = packageName
> };
> }
>
> top relation stateMachine2stateMachine {
> smName : String;
> enforce domain source stateMachineS: uml::StateMachine {
> name = smName, _package = packageS : uml::Package {}
> };
> checkonly domain target stateMachineT: uml::StateMachine{
> name = smName, _package = packageT : uml::Package {}
> };
> when{package2package(packageS,packageT);}
> }
>
> top relation region2region {
> smName : String;
> --sv : OrderedSet(uml::Vertex);
> enforce domain source regionS: uml::Region {
> name = smName, -- subvertex =sv : uml::Vertex {},
> stateMachine = smS : uml::StateMachine {} };
> checkonly domain target regionT: uml::Region{
> name = smName,
> state = newState : uml::State {
> name = 'compositeStete',
> region = reg : uml::Region {
> name = 'csRegion' }
> }, stateMachine = smT : uml::StateMachine {}
> };
> when{stateMachine2stateMachine(smS,smT);}
> }
> }
>
>
> Someone could help me please, how can I do it please ?
>
> With regards
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03330 seconds