开发者

OCL to Ecore transformation

开发者 https://www.devze.com 2023-04-04 11:19 出处:网络
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 开发者_

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

精彩评论

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

关注公众号