Problem with Setting a Property with cardinality 1..* [message #1808906] |
Thu, 04 July 2019 05:47  |
Eclipse User |
|
|
|
Dear QVTd team,
I have a meta-model for FSMs and petri nets in my lectures. The petri net contains a Transition meta-class with "from" and "to" properties of cardinality *.
The following rule now makes problem.
top relation TransitionToTransition {
label:String;
sourceTPN:pn::Place{};
destTPN:pn::Place{};
checkonly domain fsm t:fsm::Transition {
input=label,
from=sourceTFSM:fsm::State{},
to=destTFSM:fsm::State{},
fsm=f:fsm::FSM{}
};
enforce domain petri p:pn::Transition {
input=label,
from=sourceTPN,
to=destTPN,
net=pn:pn::PetriNet{}
};
when {
AutomataToNet(f,pn);
StateToPlace(sourceTFSM,sourceTPN);
StateToPlace(destTFSM,destTPN);
}
}
The problem is the assignment to from and to. The engine tries to assign the object on the right hand side to the list of the left hand side instead of ensuring that the object on the right hand side gets included in the list on the left hand side if it is not included yet. If create a set on the right hand side and assign it, it works, but in my interpretation this is against the specs.
I can attach the example project containing the fix for further investigations.
Best wishes,
Steffen
|
|
|
|
|
Re: Problem with Setting a Property with cardinality 1..* [message #1808948 is a reply to message #1808929] |
Thu, 04 July 2019 15:29  |
Eclipse User |
|
|
|
Hi Steffen
(Sometimes there is a two day delay in the RSS feed propagating, so if you're in a hurry Bugzilla is much more reliable.)
Good that it's fixed. Very good that you can consider Eclipse QVTd as a replacement for MediniQVT, but until I am confident enough to change the version to 1.0, I cannot recommend it that strongly. A lot still to do.
There are at least two QVTd UML2RDBMS'. A QVTc one is available from the examples. A QVTr one is available from org.eclipse.qvtd.xtext.qvtrelation.tests. Two QVTi ones split off from early QVTc/QVTr implementations and provide tests of older idioms. Note that there is no standard 'Simple'UML2RDBMS. Each author chooses which difficulties to concentrate on. I've even seen one that was so simple there was only a composition tree and no cross-references!
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.03297 seconds