Open eclipse-qvtd-bot opened 13 hours ago
By Ed Willink on Apr 20, 2019 02:56
Multiple partitions are necessary, but with distinct traces, since the 'definition' phase may be triggered from a selective diversity of invocation sites.
We may need a unique T{P,Q,true} mapping but it gets triggered from multiple sites so if a first stage creates T{P,-,null} for all P, we over create.
We need
Since there are two trace classes, non-unique Tcall{P} and unique T{P,Q,success} this cannot readily be solved by the MappingPartitioner / PartitionStrategy; the 'RegionPartitioner'/'RegionStrategy' as a rationalization of the InvocationAnalysis must create the two traces and partitions.
By Ed Willink on Apr 20, 2019 03:43
Use of non-top when/where relation calls boils down to four use cases:
where-only - multiple call sites trigger/share the same post-execution\ when-only - multiple call sites share the same pre-/co-execution\ where-before-when - multiple call sites define an equivalence for lookup\ when-after-where - myltiple call sites lookup a previously defined equivalence
The above are distinct wrt call alone. No need for any artificial analysis of the intent of the relation contents. It is not clear that there are illegal content for distinct use cases, although there may be some useful WFRs in regards to cyclic relation calls.
By Ed Willink on Apr 20, 2019 15:19
An extra definition/activation mapping is painful and immediately poses the question, why can't it be folded into the caller?
If the realized T{P,-,null} is produced by a realized operation call, it is all consistent. We just need an 'optimization' to ease the conversion of the shadow created by the operation body to the true object used by the return.
Similarly if the realized T{P,-,null} is a realized pattern node initialzed by the above operation it is all consistent. Just need to mark the realized node as unique wrt its inputs.
We could use a QVTr ket to mark the middle node as unique wrt its parts. A key is normally for outputs, but can we re-use the mechanism for middle nodes?
Do we need to mark the middle node as unique at all? Surely all middle nodes are unique anyway? The when-and-where identfies the idiom in QVTr. In QVTs we can use a realized operation. In QVTi this becomes a NewStatement initializer.
The lookup is easy. There is a unique oppisite navigation from P to T{P,-,-} so we just use that to check/wait for success then access Q. No mapping is invoked, QVTs jusrt naigates traces. The opposite navigation ensure that is it one-dimensional. The wait for success synchronizes. Just need the time-out to determine lookup failure.
If no mapping is involved in the lookup, what is the problem with the definition? QVTs lacks the uniqueness mechansim for the trace as above.
By Ed Willink on Apr 21, 2019 15:54
(In reply to Ed Willink from comment #3)
Surely all middle nodes are unique anyway?
Bug 546617. But for now an activator region should work.
By Ed Willink on May 29, 2019 07:06
The use cases listed in https://issues.omg.org/browse/QVT14-59 suggest that a when-for-check must be coded as a lookup to a free variable that may then be checked for consistency. This should eliminate the need for a tree of when invocations with multiple execution phases.
| --- | --- | | Bugzilla Link | 546596 | | Status | NEW | | Importance | P3 normal | | Reported | Apr 19, 2019 11:12 EDT | | Modified | May 29, 2019 07:06 EDT | | See also | 546617 | | Reporter | Ed Willink |
Description
Once ATL2QVTr is improved we have the 'on-demand lookup idiom'.
a) a non-top-where caches an input-to-output equivalence\ b) other non-top-when invocations lookup the equivalence
But this gives two different invocation signatures:
a) partition{input, output} => success\ b) partition(input} => output, success/fail
These are different so the b) lookups miss the a) definitions.
Solution. We must always have two execution phases
1) activator: partition{input} 2) lookup: assign-output => success
The definition executes activator and residue.
The lookup executes activator and waits for success from elsewhere.
?? if we cannot prove that a success will come from elsewhere, we may have to have a lookup failure assignment to avoid a deadlock.
e.g.\ in pass <= M, 'activator's execute\ in M < pass < N, 'failure's execute\ in N <= pass, 'lookup's execute
Since we need partition{input} rather than partition{input, output} for non-top-when,, do we want to do the same for non-top-where too. Removes an irregularity and reduces the cardinality of uthe uniqueness signature, also avoiding conflicting ambiguities; or rather relegating conflicts to the standard re-assignment problem. The unqiueness is no longer shared for forward/backward incremental execution, but do we want to share at all. Surely we have separate forward/backward uniqueness with update of one needing to also update the other?