QVT 1.4 RTF Avatar
  1. OMG Issue

QVT14 — [QVTr] Add CollectionTemplate comprehension content

  • Key: QVT14-37
  • Status: open  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    ODM 1.0 uses a CollectionTemplate extension in which a collection comprehension is used to match Sequence content:

    checkonly domain uml assn : Association{general = superassn : Association{
    memberEnd = supSeq : Sequence(Property){usuper | true}},
    memberEnd = subSeq : Sequence(Property){uprop | true}}

    {supSeq->indexOf(usuper) = subSeq->indexOf(uprop)}

    ; // steps through both sequences in tandem

    It is not clear how to achieve this without a CollectionTemnplate iterator.

    The proposal for a co-iterator could avoid the guard and so allow

    checkonly domain uml assn : Association{general = superassn : Association{
    memberEnd = supSeq : Sequence(Property){usuper,index | true}},
    memberEnd = subSeq : Sequence(Property){uprop,index | true}};

  • Reported: QVT 1.3 — Fri, 22 Apr 2016 15:58 GMT
  • Updated: Sun, 4 Sep 2016 08:51 GMT