开发者

OCL to Ecore transformation

I am trying to find a parser for OCL that can generate an Ecore model File so that I can use model to model methods in order to transform the OCL statements into other language models, e.g OCL 开发者_开发知识库to SQL (but not only to SQL).

Does anyone know how to OCL to Ecore converter?


The MDT project supports OCL: http://www.eclipse.org/modeling/mdt/?project=ocl There is an EMF metamodel of the OCL language so you can use it for your transformation.


You need to override ToStringVisitor Class in eclipseOCL.


There is no implementable standard model representation for OCL, but Eclipse OCL prototypes a solution to the many problems with the OMG OCL specification.

Using Eclipse OCL you can use OCL->Save Abstract Syntax within OCLinEcore or Complete OCL editors to create a model that conforms to Pivot.ecore.

See http://git.eclipse.org/c/ocl/org.eclipse.ocl.git/tree/plugins/org.eclipse.ocl.pivot/model-gen/OCL-2.5.oclas for a model of the OCL standad library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜