Open eclipse-qvtd-bot opened 1 week ago
By Ed Willink on Feb 23, 2020 04:56
(In reply to Ed Willink from comment #0)
To support the user's style DoChildren must use the input nest to invoke multiples of e.g. DoChildren_Iterator. This should probably be a multi-region synthesis during QVTr2QVTs. ?? Isn't this already there for Hstm2stm ??
No. HierachicalTransition2FlatTransition enumerates all 3/5 heads. The trace analysis makes do with 3.
Relation2TraceClass.analyzePatternNodes() goes most of the way to solving the problem in determining manyTracesPerHead. When the required per-trace heads are incompatible with the declared root variables, we require:
a) the trace synthesis to synthesize the usual per-head trace and an additional per-declared-root wrapper.
b) the ctor partition to realize each per-head-trace in response to a predication of the per-declared-root trace that the invoker realized.
By Ed Willink on Feb 25, 2020 03:07
This problem arose as a consequence of FtoP0_FamilyRegister2PersonRegister in /org.eclipse.qvtd.xtext.qvtrelation.tests/models/persons2families/Persons2Names2Families.qvtr delegating to four where's without iterating sensibly.
The "[560427] Avoid hidden caller iteration" commit moves the 'top' to the four delegates and the problem seems to go away.
Maybe we just need WFRs / helpers to diagnose idiot relation interfaces.
| --- | --- | | Bugzilla Link | 560427 | | Status | NEW | | Importance | P3 normal | | Reported | Feb 23, 2020 04:31 EDT | | Modified | Feb 25, 2020 03:08 EDT | | Blocks | 509281 | | Reporter | Ed Willink |
Description
Given a where-style of explicit scheduling a tx may comprise
DoParent ... where { DoChildren(...); }
avoiding DoParent needing to understand the child iteration policy.
DoChildren can be written as n input domain nest that covers the iteration, but there must eventually be one trace per-child so the one TDoChildren created by the invoker will not do.
To support the user's style DoChildren must use the input nest to invoke multiples of e.g. DoChildren_Iterator. This should probably be a multi-region synthesis during QVTr2QVTs. ?? Isn't this already there for Hstm2stm ??
Workaround: the caller must provide the nest iteration taking care to ensure that an empty iteration does not fail.
Syntax sugar: A forall wrapper around the where predicate would be much more readable.