Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[qvtd-dev] [Dev] Pivot model and generated opposite relations

Hi Ed,

 

Doing more work in the QVTimperativeTracingEvaluationVisitor class I have been getting an exception when using the opposite relations auto generated by the Pivot model.

 

In line 390 of UML2RDBMS.qvti I use p2n := t.PrimitiveToName; to get a reference to the trace model class used to trace the PrimitiveDataType t. While executing I get:

 

org.eclipse.ocl.examples.domain.values.impl.InvalidValueException: Failed to evaluate simpleuml::PrimitiveDataType.PrimitiveToName

                at org.eclipse.ocl.examples.pivot.evaluation.EvaluationVisitorImpl.visitPropertyCallExp(EvaluationVisitorImpl.java:786)

                at org.eclipse.ocl.examples.pivot.evaluation.AbstractEvaluationVisitorDecorator.visitPropertyCallExp(AbstractEvaluationVisitorDecorator.java:255)

                at org.eclipse.ocl.examples.pivot.internal.impl.PropertyCallExpImpl.accept(PropertyCallExpImpl.java:391)

                at org.eclipse.ocl.examples.pivot.evaluation.EvaluationVisitorImpl.safeVisit(EvaluationVisitorImpl.java:171)

                at uk.ac.york.qvtd.pivot.qvtimperative.evaluation.QVTimperativeTracingEvaluationVisitor.visitVariableAssignment(QVTimperativeTracingEvaluationVisitor.java:180)

                at org.eclipse.qvtd.pivot.qvtcorebase.impl.VariableAssignmentImpl.accept(VariableAssignmentImpl.java:173)

                at uk.ac.york.qvtd.pivot.qvtimperative.evaluation.QVTimperativeLMEvaluationVisitor.visitBottomPattern(QVTimperativeLMEvaluationVisitor.java:103)

                at uk.ac.york.qvtd.pivot.qvtimperative.evaluation.QVTimperativeTracingEvaluationVisitor.visitBottomPattern(QVTimperativeTracingEvaluationVisitor.java:63)

…

 

I added print statements to check that the t variable is not null. Since the QVTi editor does not complaint about the reference I am guessing something is not working in my code, probably the PrimitiveToName element is not being properly assigned the primitive association value.

 

My question is, can you recommend a smart way of printing the Variable values to get useful information? Perhaps a printer that prints the variable name and the value of all its attributes?

 

Regards,

 

Horacio Hoyos Rodríguez

EngD Student

University of York

 

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

 


Back to the top