QVT 1.0 NO IDEA Avatar
  1. OMG Issue

QVT — 7.13 Implicit Variable Declarations

  • Key: QVT-23
  • Legacy Issue Number: 10956
  • Status: closed  
  • Source: Model Driven Solutions ( Dr. Edward Willink)
  • Summary:

    The RelationsToCore example declares only those variables that are necessary. It is
    possible to deduce the types of variables not declared explicitly from the property
    with which the variable is associated in a property template, or from the relation
    whose invocation the variable participates in.

    Are QVTrelation tools required to deduce implicit declarations?

    If so, what are the detailed semantics for resolution of conflicting inference between
    explicit and implicit declarations and between implicit and implicit declarations.

    Do these semantics depend on collection kind, enforcement direction and relation
    invocation binding?

    Note that invocation of a relation with ridiculous types is probably but not
    necessarily an error. In some circumstances the user may not be aware that a match
    is impossible. When using third party models, the user perhaps should not be aware
    that a match is impossible. The ridiculous match may be a precautionary cover for
    a hoped for impossible case.

  • Reported: QVT 1.0b1 — Mon, 26 Mar 2007 04:00 GMT
  • Disposition: Resolved — QVT 1.0
  • Disposition Summary:

    Add the following sub section in section 7.13 Concrete Syntax:

    Implicit declaration of variables:

    There is no need to explicitly declare variables that are bound to object or collection templates. All other variables must be explictly declared. Consider the following template declarations:
    c:Class

    {<template-body>}
    cs:Set(Class) {<template-body>}

    Here there is no need to have explcit declaration for variables c and cs as their types are obvious from the template declarations.

    If there exists an explcit declaration for a variable that is bound to an object or a collection template, then the explicitly declared type must either be the same or more generic than the type specified by the template. If an implictly declared variable has bindings with more than one object template (resp collection template), then the types of all such templates must be the same.

  • Updated: Fri, 6 Mar 2015 20:54 GMT