Skip to main content

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

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

 


Back to the top