Problem with Setting a Property with cardinality 1..* [message #1808906] |
Thu, 04 July 2019 09:47 |
Steffen Becker Messages: 31 Registered: July 2009 |
Member |
|
|
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
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03522 seconds