Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvtd-dev] [Dev] QVTiEvaluationVisitor possible OCL bug

Hi

It is generally a bad idea to have EObjects without an eContainer, since eContainer provides the navigation route to Resources and ResourceSets where many useful services are provided.

If you have an object without a container that needs investigating.

    Regards

        Ed

On 05/08/2013 15:17, Horacio Hoyos Rodriguez wrote:

Hi Ed,

 

After adding a catch _expression_ for Invalid values while evaluation initializer expressions I realized that both the middle model and the output model where not being generated properly.

 

I noticed some errors in the RDBMS metamodel and after fixing and doing some more tests I was able to fix another couple of bugs in the evaluation visitor which caused strange bindings in the middle model.

 

After fixing this I am now getting another exception, which I think is an OCL issue.

 

In the UML2RDBMS QVTi transformation, line 356 we have:

fc.type := rk.column->first().type;

which was giving: InvalidValueException: 'Sequence' rather than 'OclVoid' value required

 

After debugging the evaluation if the OCL _expression_ I found that when visiting the rk.column _expression_, there is a method to get the value of the property (column of rk).

 

This method invokes evaluate method in CompoistionProperty.java, in line 45 the eContainer of the variable is fetched, and in this case the container is null (the key has not yet been assigned an owner?). Then the method returns null (line 46: if (eContainer == null) { return null } )

 

and then back in visitOperationCallExp the sourceValue variable will be set to null, and hence I get a the exception.

 

Why is the need for the container not to be null and why if it is null the value of the variable is returned as null?

 

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.3392 / Virus Database: 3209/6551 - Release Date: 08/04/13



Back to the top