eclipse-qvtd / org.eclipse.qvtd

Eclipse Public License 2.0
0 stars 0 forks source link

[qvtr] Relation variables should be unique #442

Open eclipse-qvtd-bot opened 2 weeks ago

eclipse-qvtd-bot commented 2 weeks ago

| --- | --- | | Bugzilla Link | 580580 | | Status | NEW | | Importance | P3 normal | | Reported | Aug 19, 2022 15:55 EDT | | Modified | Aug 20, 2022 02:37 EDT | | See also | 412341 | | Reporter | Ed Willink |

Description

Repeated variable names provoke an xmi:id disambiguation error once ths is enabled.

A number of JUnit tests have repeated names, variously in distinct domains or distinct roots. While this may be marginally resolvable it makes the code hard to read: which duplicate is referenced.

A WFR can sort this.

Ah! There is already the WFR code, but it was commented out when Bug 412341 committed. Presumably the commit was satisfying providing the technology and ducked resolving a conflict.

eclipse-qvtd-bot commented 2 weeks ago

By Ed Willink on Aug 20, 2022 02:37

(In reply to Ed Willink from comment #0)

Presumably the commit ... ducked resolving a conflict.

In DNF.qvtr, the duplicate names appear to be in some gratuitous names for leaf elements where the syntax requires a name even though it is never referenced. This appears to be an undiagnosed laziness rather than a subtle usage. Hiwever this occurs in "replace" domains so there may be some overlay subtlety that we do not support since there is no definition of the semantics of a "replace" domain.

Ditto. SimplerRelToCore.qvtr has a gratuitous duplicate in distinct roots of the same domain. Very confusing to read. Looks like sharing when it isn't.

In Persons2Names2Families.qvtr, the duplicates are referenced by:

        FtoP2_FamilyNames2PersonName(f, m, m);

requiring the tooling to use the positional domain to scope the distinct references. While this is technically possible, there seems to be no justifocation for behind the scenes wizardlt to make sense of lexical ambiguity.


Conclusion. Variables should be unique; activate the WFR.

Where there is a problem the names in domain x/y can easily be disambiguated by an x/y prefix/suffix/...