Bug 546498 - [qvti] Simplify/Improve observable property AS
Summary: [qvti] Simplify/Improve observable property AS
Status: NEW
Alias: None
Product: QVTd
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-17 03:48 EDT by Ed Willink CLA
Modified: 2019-04-17 04:02 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2019-04-17 03:48:25 EDT
The current QVTi AS wraps any Statement that may have a hazardous property acess in an ObservableStatement that enumerates each of the hazradous properties.

This was perhaps a sensible markup when OCL expressions could be unthinkingly copied directly from qvtm to qvti; no intervening qvts. The markup identifies the NavigationCallExp's for which the QVTi executor must await ready data. The markup is a pessimistic fudge that avoids the need (text+CS+AS) for observable property calls.

With the addition of the QVTiProductionConsumption design rule check, the pessimism can report spurious missing notifies.

(There are no observable operation calls since the operation caller is required to anticipate all hazrds within the operation as hazrds in the call preamble.)

Solutions:

- no QVTiProductionConsumption
- richer observable markup - add derived source, target classes
- ObservablePropertyCallExp - needs Bug 546497
- dedicated Statement

Now that QVTi is fully synththesized from QVTs is should be possible to impose a 'let-variable' on each property call.

    var yyy : DerivedYYYType = ...;
    observe var xxx : DerivedXXXType = yyy.zzz;

rather than

    observe YYY::zzz ..... ...zzz...

The underlying executor pretty much needs the variable anyway as part of the is-it-ready checking.

Bye bye ObservableStatement. Hello DeclareStatement.isObserve.
Comment 1 Ed Willink CLA 2019-04-17 04:02:40 EDT
(In reply to Ed Willink from comment #0)
> The current QVTi AS wraps any Statement that may have a hazardous property
> acess in an ObservableStatement that enumerates each of the hazradous
> properties.

Correction. ObservableStatement is inherited by any Statement that might need observations.

> Bye bye ObservableStatement. Hello DeclareStatement.isObserve.

Bye Bye ObservableStatement::observedProperties.
Hello ObservableStatement::isObserve.

Semantics. If isObserve, all transitively contained PropertyCallExp's are observed using the prevailing OCL types as source/target.

Corrolary a 'let-variable' is needed to have an unobserved sub-expression.

Corrolary a 'let-variable' is needed to enforce stronger derived source/target classes.