Community
Participate
Working Groups
The following attempt at the PN2SC initialization: top relation Net2StateChart { domain pn net : Net {}; enforce domain sc statechart : Statechart { topState = ts : AND {} }; } top relation Place2Basic { sc : scMM::Statechart; domain pn p : Place { cnet = net : Net{} }; enforce domain sc b : Basic { rcontains = o : OR { rcontains = topState : AND { Statechart = sc } } }; when { Net2StateChart(net, sc); } } converts a p->cnet to b->o->topState->sc container hierarchy. b,o are realized sc is a variable defined by the when But: topState is also realized when it should be resolved as a pre-existing child. How do we tell which enforced variables are created (realized) and which discovered?
Workaround: Express the 'realized' in the pattern Express the 'referenced' in guards sc : scMM::Statechart; topState : scMM::AND; ... enforce domain sc b : Basic { rcontains = o : OR { rcontains = topState } { topState = sc.topState } }; when { Net2StateChart(net, sc); } But this requires the programmer to have 'global' insight. Surely QVTr should sort it out automatically? But it must be done before conversion to QVTc. Is a global QVTr analysis necessary?