QVT 1.3 RTF Avatar
  1. OMG Issue

QVT13 — QVTr: Rule Overriding semantics

  • Key: QVT13-19
  • Legacy Issue Number: 15417
  • Status: closed  
  • Source: NASA ( Dr. Maged Elaasar)
  • Summary:

    The abstract syntax of QVTr allows a rule to be an override of another rule.

    Rule::overrides: Rule [0..1]
    The rule that this rule overrides.

    The concrete syntax of QVT allows it too:

    <relation> ::= ['top'] 'relation' <identifier>
    ['overrides' <identifier>]
    '

    {' .... '}

    '

    However, the only semantics I can see for 'overrides' is in clause 7.11.1.4 that says:

    "A rule may conditionally override another rule. The overriding rule is executed in place of the overridden rule when the overriding conditions are satisfied. The exact semantics of overriding are subclass specific. "

    Questions:

    1- Whtat are the overriding conditions? are they implied or specified and if so how?

    2- I have not seen any other discussion of overrding in a subclass or Rule so not sure what is meant by "The exact semantics of overriding are subclass specific"?

    3- I have not seen any example of using 'overrides' what so ever in the spec, shouldn't there be one?

    4 - What is the semantics of overriding? is it related to inheritance in the OO sense ? I think QVTr needs a good "inheritance" model where you can relations can be called polymorphically.

  • Reported: QVT 1.1 — Fri, 13 Aug 2010 04:00 GMT
  • Disposition: Deferred — QVT 1.3
  • Disposition Summary:

    Rule Overriding in QVTr

    The abstract syntax of QVTr allows a rule to be an override of another rule.

    Rule::overrides: Rule [0..1]
    The rule that this rule overrides.

    The concrete syntax of QVT allows it too:

    <relation> ::= ['top'] 'relation' <identifier>
    ['overrides' <identifier>]
    '

    {' .... '}

    '

    However, the only semantics I can see for 'overrides' is in clause 7.11.1.4 that says:

    "A rule may conditionally override another rule. The overriding rule is executed in place of the overridden rule when the overriding conditions are satisfied. The exact semantics of overriding are subclass specific. "

    Questions:

    1- What are the overriding conditions? are they implied or specified and if so how?

    2- I have not seen any other discussion of overriding in a subclass or Rule so not sure what is meant by "The exact semantics of overriding are subclass specific"?

    3- I have not seen any example of using 'overrides' what so ever in the spec, shouldn't there be one?

    4 - What is the semantics of overriding? is it related to inheritance in the OO sense ? I think QVTr needs a good "inheritance" model where you can relations can be called polymorphically.

    Discussion

    This now a much better understood field:

    M. Wimmer, G. Kappel, A. Kusel, W. Retschitzegger, J. Schönböck, W. Schwinger, D. Kolovos, R. Paige, M. Lauder, A. Schürr, D. Wagelaar. Surveying Rule Inheritance in Model-to-Model Transformation Languages. In Journal of Object Technology, vol. 11, no. 2, 2012, pages 3:1–46. doi:10.5381/jot.2012.11.2.a3

    QVTBase currently imposes single overriding which is unnecessary, and causes a problem for an application that needs to extend when B1 overrides A and B2 overrides A. The extending mapping needs C to override both B1 and B2 to ensure that C occludes both B1 and B2. Therefore we need multi-overrides.

    Oops. A QVTc Mapping::refines is an alternative concept that competes without comment with the inherited Rule::overrides. relToCore completely ignores the semantics of overrides translation. Relation::overrides should probably map across unchanged to Mapping::overrides. QVTc and QVTr semantics are unchanged.

    Fixing this textually without a prototype is too much of change.

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