Validate OCL attributes of my model using Eclipse papyrus

85 Views Asked by At

I'm making a translation model on Magicdraw/Cameo between two metamodels, using several metamodels in its environment. This model contains OCL expressions, and I would like to use Eclipse to check the syntax of the OCL expressions of my model (I don't know if there is a better alternative, but this is where I hope to be able to import my project, evaluate the OCL expressions of my whole model and edit the OCL parser).

Eclipse Papyrus seems to be a good environment. I imported all my models and profile in a papyrus project and opened the Validity View (Validity View Eclipse).

My model respects the following structure :

enter image description here

and I want to make sure that all the OCL expressions of the model are correct. I tried to validate it with the Validity View, but it raise the following exception :

XMIException: UMLIdResorlver.getASOf failed for an org.eclipse.ocl.pivotElement ParserException: Failed to load 'platform/resource/projectName/MyClass.uml.oclas' : Inheritance loop for IllegalStateException: Inheritance loop for

I guess it may be related to the import of the model from Cameo/MagicDraw. Or maybe I misunderstood what the tool is supposed to do.

I want to make sure that my process makes sense, and understand how to achieve what I want with eclipse/papyrus or maybe a more adapted tool.

Thanks for your answers!

1

There are 1 best solutions below

1
Ed Willink On

You have unfortunately truncated the error message, perhaps to preserve proprietary content. The "Inheritance loop for" should be followed by a list of the classes that form the inheritance loop. User-inheritance must be a forest and once OCL has injected OclAny and OclElement, OCL-inheritance must be a tree. You should be able to see one class that is wrong and so denotes a user error. It is of course possible that it is a bug in the UML2AS OCL normalization, in which case you may wish to file a bug report.