Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvtd-dev] [Dev] Assignments in QVTimperative guard patterns

Hi

The initializers are Variable.initExpression. You can see the extra code in QVTcoreBasePostOrderVisitor.visitGuardPatternCS.

In the CS

    uml (c:Class, t:PrimitiveDataType, a:Attribute |
        a.owner = c;
        --getAllAttributes(c)->includes(a);
            t := a.type.oclAsType(PrimitiveDataType);        -- FIXME spurious CompatibleInitialiserType
        ) {
        }

could be written more logically, but not validly, as

    uml (
        c:Class,
        t:PrimitiveDataType := a.type.oclAsType(PrimitiveDataType),
        a:Attribute
|
        a.owner = c;
        ) {
        }

to stress that "t" gets an initializer and "a.owner" participates in a predicate.

So c,a are unbound/free variables, t is a bound variable.

    Regards

        Ed


On 30/07/2013 10:39, Horacio Hoyos Rodriguez wrote:

Hi Ed,

 

Looking at the QVTi Editor outline, the initializers are clearly identified as “AssignmentCS” nodes. So it might be that they are in the CST but don’t get mapped into anything in the AST.

 

Regards,

 

 

Horacio Hoyos Rodríguez

EngD Student

University of York

 

http://www.york.ac.uk/docs/disclaimer/email.htm

 

From: Horacio Hoyos Rodriguez [mailto:hhr502@xxxxxxxxxx]
Sent: 30 July 2013 09:45
To: 'QVTD developers mailing list'
Subject: RE: [qvtd-dev] [Dev] Assignments in QVTimperative guard patterns

 

Hi Ed,

 

I don’t seem to find any reference to initialisers in the metamodels or visitors. Any pointers will be appreciated.

 

Regards,

 

Horacio Hoyos Rodríguez

EngD Student

University of York

 

http://www.york.ac.uk/docs/disclaimer/email.htm

 

From: qvtd-dev-bounces@xxxxxxxxxxx [mailto:qvtd-dev-bounces@xxxxxxxxxxx] On Behalf Of Ed Willink
Sent: 30 July 2013 07:30
To: QVTD developers mailing list
Subject: Re: [qvtd-dev] [Dev] Assignments in QVTimperative guard patterns

 

Hi

This sounds vaguely like what I fixed with

[412341] Fix guard variable initializers

But a guard pattern has no assignments.

on the left it has predicates
on the right it has initialisers

    Regards

        Ed

On 29/07/2013 17:41, Horacio Hoyos Rodriguez wrote:

Hi Ed,

 

I have pushed some changes in the TracingVisitorDecorator to git. Basically some emf reflection to get info about the EObjects being bound.

 

Good thing, it helped me find a bug.. or something strange. Looking at the QVTimperative.ecore (and also the QVTcore.ecore) I don’t see the GuardPattern containing any Assignments. However the QVTi editor does not complaint about them (for example the ones in associationToForeignKeyLM).  

 

The bug, I think is due to the Assigments are not being visited and hence the variables are null when evaluating the predicates.

 

This is preliminary,  and will continue with further testing.

 

Regards,

 

 

Horacio Hoyos Rodríguez

EngD Student

University of York

 

http://www.york.ac.uk/docs/disclaimer/email.htm

 



_______________________________________________
qvtd-dev mailing list
qvtd-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/qvtd-dev



No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3349 / Virus Database: 3209/6529 - Release Date: 07/29/13

 



_______________________________________________
qvtd-dev mailing list
qvtd-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/qvtd-dev


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3349 / Virus Database: 3209/6531 - Release Date: 07/29/13



Back to the top