Open eclipse-qvtd-bot opened 12 hours ago
By Ed Willink on Dec 11, 2019 04:23
No. The 6 stderr errors are:
-----Starting QVTrCompilerTests.testQVTrCompiler_MiToSiSimple_CG
Investigating the first reveals that the QVTs representation of
enforce domain java c2:Class {\
extends = s2:Set(Class){c2sup ++ _}\
};
omits an edge from c2sup and s2. Just need the missing edge.
By Ed Willink on Dec 12, 2019 07:49
For the commonest use case in MiToSiSimple
domain uml c1:Class {\
supers = s1:Set(Class){c1sup ++ _}\
};\
enforce domain java c2:Class {\
extends = s2:Set(Class){c2sup ++ _}\
};
if "x += y" denotes partial assignment; i.e. x->includes(y), the QVTr could be written as
domain uml c1:Class {\
supers += c1sup;\
};\
enforce domain java c2:Class {\
extends += c2sup;\
};
and this is what the QVTr2QVTs synthesizes, but unfortunately with a reification of the s2 Set that causes orohan/no-assignment diagnostics.
So for the common idiom we just need to lose the redundant output Collection.
Single term ordered collections are probably meaningless order-wise.
Multiple term or term+rest probably need including/includingAll construction.
By Ed Willink on Dec 12, 2019 08:37
(In reply to Ed Willink from comment #2)
So for the common idiom we just need to lose the redundant output Collection.
But it may have a symbol that is referenced. Much easier to synthesize the OCL to compute the navigation to collection so that anything that needs it can use it.
Downstream optimizations can eliminate it if dead.
By Ed Willink on Dec 13, 2019 04:16
The problem is erroneous coloring/roles.
A green/REALIZED CollectionType node is meaningless.
If a CollectionType is to be created, and so REALIZED, it must be the result of a computation; it cannot be an uninitialized DataType. Alternatively a CollectionType may be the result of a navigation, which is of course PREDICATED/LOADED.
A partial Collection access can be a direct edge, LOADED/PREDICATED/RELAIZED as appropriate. Disparate multi-partial are no problem. Ordered multi-partial is a challenge that should perhaps be a total assignment anyway.
By Ed Willink on Dec 13, 2019 04:52
(In reply to Ed Willink from comment #4)
A green/REALIZED CollectionType node is meaningless.
Eliminating the trewatment of CollectionTemplateExp as relaized variable and the problems vanish.
But so too does the CollectionTupe variable needed for tracing. Once this is re-instated as predicated we have a sequencing problem.
enforce domain java c2:Class {\
extends = s2:Set(Class){c2sup ++ _}\
};
provokes two extends edges:\ a) totally PREDICATED from c2 to s2 which is traced\ b) partially REALIZED from c2 to c2sup
which have a mandatory scheduling constraint: all partials must occur before any total ensuring that the stable post-total is traced/referenced.
No partitioning is occurring to faciltate this mandatory ordering.
By Ed Willink on Dec 29, 2019 05:29
(In reply to Ed Willink from comment #2)
Multiple term or term+rest probably need including/includingAll construction.
Bug 558675 identifies that the includes rekationship in SeqToStm has been working wrongly.
| --- | --- | | Bugzilla Link | 552853 | | Status | NEW | | Importance | P3 normal | | Reported | Nov 08, 2019 12:14 EDT | | Modified | Dec 29, 2019 05:29 EDT | | See also | 558675 | | Reporter | Ed Willink |
Description
testQVTrCompiler_MiToSiSimple_CG uses CollectionTemplateExp in the 'traditional' way, but the synthesis creares the more direct 'includes' partial edge leaving an orphan collection node resulting in six disgnostics such as
No assignment in ClassExtends_java«residue» to var c2 : javammsi::Class[1] := when_ClassToClass1.t4c2.javammsi::Class::extends
and a need to handle a nullassignment expression in BasicPartition2Mapping.createPropertyAssignments
Perhaps just need to lose the orphan.
More likely need to revisit CollectionTemplateExp synthesis.