eclipse-qvtd / org.eclipse.qvtd

Eclipse Public License 2.0
0 stars 0 forks source link

[qvts] Eliminate partial navigation edges #387

Closed eclipse-qvtd-bot closed 13 hours ago

eclipse-qvtd-bot commented 13 hours ago

| --- | --- | | Bugzilla Link | 547308 | | Status | RESOLVED FIXED | | Importance | P3 normal | | Reported | May 15, 2019 06:21 EDT | | Modified | Dec 14, 2019 06:32 EDT | | Reporter | Ed Willink |

Description

Some NaigationEdges are annotayed as partial and confusingly rendered with an arrow albeit with an <>xxx label.

For normal putposes such the N:1 direction should be the primary with an arrow. The reverse should just be missing.

Surely only M:N relationships need a partial rather than inverse 1:N?

eclipse-qvtd-bot commented 13 hours ago

By Ed Willink on May 17, 2019 06:40

Only three test models actually use partial:

SeqToStm, MiToSiSimple, MiToSiSimpleWithKeys, ATL2QVTr

SeqToStm has a true M:N State<=>Lifeline\ MiToSi has a true M:N Class<=>Class supers/subs\ ATL2QVTr has some M:N e.g Relation <-> Variable but there is no explicit opposite\ ATL2QVTr has some spurious M:N associated with alternative containers

M:N constraint. A partial edge must either have no opposite or must have an isMany opposite.

"isMany". Property.isMany may be wrong if the pattern is manipulating Collections. Need isManyNodes. No this is "partial", which should be consistently computed on edge creation.

There are three use cases.

1:1 the normal case, partial = false. May be 1:1 between collections.

1:N may be 1 to N, with N the full collection, partial = false\ 1:N may be 1 to 1-of-N with 1-of-N the element type, partial = true

M:N may not be M:N\ M:N may be 1-of-M to N, partial = true in reverse direction\ M:N may be 1-of-M to 1-of-N. partial = true in both directions

NB An operation with collection inputs and/or outputs is 1:1 wrt the declared aggregates since in the absence of side effects the operation always returns the same aggegates for the same inputs.


The confusing arrow heads on 1 to 1-of-N have been fixed and labels now show [1 of *|1] multiplicity rather than <>.

Composition arrow-heads upgraded at same time.

A partial navigation edge is now always the secondary edge of a bidirectional pair.

eclipse-qvtd-bot commented 13 hours ago

By Ed Willink on May 29, 2019 06:53

Pushed to master for 2019-06M3.

partial edges are needed, so they are nit eliminated, however they are now always secondary so that they are only used for N:M.

eclipse-qvtd-bot commented 13 hours ago

By Ed Willink on Dec 14, 2019 06:32

(In reply to Ed Willink from comment #1)

Only three test models actually use partial:

SeqToStm, MiToSiSimple, MiToSiSimpleWithKeys, ATL2QVTr

SimpleUML2RDBMS has a N:M for Key::column(s) <=> Column::keys which has been silently ignored until the better QVTiProductionComsumption design rule check is used.

For integrity we have the simple two phase operation

assigns aggregate\ ---- boundary ----\ reads exploit

(non-conflicting/non-repeating assigns are desirable but a separate issue.)

An intervening connection is only Collection-typed if ALL assigns and all accesses are for the whole Collection; otherwise element-typed.

If element-typed is used fopr collection-typed the Connection is MANDATORY to prevent fragmentation.