QVT 1.3 RTF Avatar
  1. OMG Issue

QVT13 — QVTo: ListLiteralExp inheritance

  • Key: QVT13-14
  • Legacy Issue Number: 14620
  • Status: closed  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    The resolution for Issue 12375 specifies that ListLiteralExp has
    CollectionLiteralExp
    as a superclass.

    This leaves the behaviour of the inherited kind and part attributes
    unspecified and
    rather embarrassing.

    ListLiteralExp (like DictLiteralExp) should inherit directly from
    LiteralExp.

  • Reported: QVT 1.1 — Wed, 11 Nov 2009 05:00 GMT
  • Disposition: Resolved — QVT 1.3
  • Disposition Summary:

    Inappropriate ListLiteralExp inheritance (Correction to issue 12375 resolution)

    The resolution for Issue 12375 specifies that ListLiteralExp has CollectionLiteralExp as a superclass.

    This leaves the behaviour of the inherited kind and part attributes unspecified and rather embarrassing.

    ListLiteralExp (like DictLiteralExp) should inherit directly from LiteralExp.

    Discussion

    The lack of specification of ListLiteralExp::kind and ListLiteralExp::part is indeed a problem.

    CollectionLiteralExp::kind is inextensible bloat that OCL could usefully eliminate, so no ListLiteralExp::kind is needed in QVTo.

    ListLiteralExp::part is needed if QVTo is truly an extension of OCL. Unfortunately the QVTo BNF omits the ".." operator and support for CollectionRanges.

    Therefore we need to introduce the missing CollectionRange parsing. ListLiteralExp can inherit LiteralExp adding CollectionLiteralExp::part but not CollectionLiteralExp::kind. ListLiteralExp::element is misguided; ListLiteralExp::part replaces it.

  • Updated: Tue, 29 Mar 2016 15:09 GMT