QVT 1.4 RTF Avatar
  1. OMG Issue

QVT14 — Optional features must be handled in separate relations

  • Key: QVT14-67
  • Status: open  
  • Source: King's College London ( Kevin Lano)
  • Summary:

    In the standard it is stated that all source variables of a relation must be bound, in order for the relation to be applied. This seems the only reasonable approach for relation application. However it has an interesting consequence in the case of *-multiplicity references r, or indeed for any reference r with multiplicity lower bound 0. The source domain in

    top relation R
    { checkonly domain src e : E { r = rx : R {}, att = attvalue };
    enforce domain trg f : F { rr = rrx : R1 {}, attf = attvalue };

    will not match to an E instance x which has empty x.r, because rx cannot be bound to any element, and hence the relation R will not be applied to such x - and att will not be copied to attf.

    In other cases (non-empty x.r), instances of E are copied to instances of F, and a specifier could expect that R copies x : E with empty x.r to a y : F with empty y.rr, but because of the totality requirement on source bindings, no y is produced for such x.

    The QVT specification should alert specifiers to this issue, and that in such cases it would be necessary to split the above relation into two parts, one handling the mandatory features and other parts for each optional feature.
    Note that this issue does not arise in languages such as QVT-O and ATL where copying of optional features can be done 'all at once' rather than element-by-element.

  • Reported: QVT 1.3 — Sun, 10 Nov 2019 16:41 GMT
  • Updated: Mon, 11 Nov 2019 21:40 GMT