It's best to avoid the CS model, since that will remain
proprietary/Xtext-friendly. You should use the Pivot model which is
evolving towards a UML-aligned standard.
The CS2Pivot orchestrates the translation, possibly using
org.eclipse.ocl.examples.pivot.OCL.cs2pivot(), although you'll find most
of the JUnit tests dive in underneath since the OCL facade is still
You should probably be aiming to use the ExpressionInOCL class since
that contains not only the expression body but also the contextual
On 07/08/2013 21:07, John Guerson wrote:
> I was wondering to know if there is a way to visit an OCL expression
> from SpecificationCS.
> import org.eclipse.ocl.examples.xtext.base.baseCST.SpecificationCS;
> if (((ContextConstraintCS)tocl_prop) instanceof InvCS)
> SpecificationCS spec = tocl_prop.getSpecification();
> Perhaps I need to transform the SpecificationCS into some AST form. I
> really appreciate any help.