QVT 1.3 RTF Avatar
  1. OMG Issue

QVT13 — allInstances()

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

    OCL's allInstances() applies to the one and only immutable model extent.

    The meaning of this in QVT with multiple, some mutable, extents/domains/typedModels is unclear.

    Suggest that allInstances applies to all the input and original inout extents only.

    Obtaining instances from other domains is available through alternate library operations such as objectsOfType in QVTo.

  • Reported: QVT 1.2 — Thu, 25 Sep 2014 04:00 GMT
  • Disposition: Resolved — QVT 1.3
  • Disposition Summary:

    allInstances() needs clarification

    OCL's allInstances() applies to the one and only immutable model extent.

    The meaning of this in QVT with multiple, some mutable, extents/domains/typedModels is unclear.

    Suggest that allInstances applies to all the input and original inout extents only.

    Obtaining instances from other domains is available through alternate library operations such as objectsOfType in QVTo.

    Discussion - QVTo

    allInstances() could be defined to apply to the initial, prevailing or final state. Since a QVTo execution proceeds through a predictable sequence of states limiting allInstances() to the initial state is unhelpful. A limitation to the final state is almost unuseable and may require a tool to introduce another form of late processing. Therefore the prevailing state is most appropriate for a QVTo allInstances().The returned instances are the mutable instances since any form of caching would impose an unjustified overhead.

    Discussion - QVTr/QVTc

    allInstances() could be defined to apply to the initial, prevailing or final state. The initial state is easy. The prevailing state does not exist declaratively. The final state is harder but may be useful for computing derived output values based on the outputs.

    However consider a cascade of endogeneous transformations A2B, B2C, C2D in which B2C performs an allInstances(). If we now compose the trio into A2B2C2D, the functionality of the allInstances() must not change. Therefore neither initial nor final state will do, since the initial state changes from B to A and the final state from C to D. We must use a prevailing state, which we can define as the final state of the domain in which the invocation of allInstances() occurs. For our example this is one of B or C and does not change as a consequence of the cascade.

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