Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] OCL and QVTO
[QVTO] OCL and QVTO [message #486909] Sun, 20 September 2009 22:00 Go to next message
Derek Palma is currently offline Derek PalmaFriend
Messages: 141
Registered: July 2009
Senior Member
Hi,

I ran in to some usage questions:

1) My understanding is Eclipse OCL is used by QVT. If I have existing
customized Environments for OCL, can they somehow be passed to QVTO? I
looked in the TransformationExecutor and ExecutionContextImpl classes and
did not see anything that looked like you can get or set an environment.
Specifically, if expose some java methods in OCL, can they be available to
QVTO?

2) Can I just use Imperative OCL instead of regular OCL without creating a
full QVTO file. For example, with OCL i can just submit a context and a
string with valid OCL statements and receive the result. Imperative OCL
seems to have a lot of useful features. One other option I have is to create
a wrapper which adds the necesary prologue and epilogue for OCL and invokes
it as a QVTO transformation.

3) How can I reuse my OCL and QVT queries conveniently. I am gradually
developing more and more. It seems like I need to standardize on placing
them in a single format (QVTO or OCL only) and make them available as
libraries.

4) Is there a sample of a Black Box implementation so I can see how I might
integration my java methods with QVTO?

Thanks in advance.
Derek
Re: [QVTO] OCL and QVTO [message #486962 is a reply to message #486909] Mon, 21 September 2009 10:43 Go to previous message
Eclipse UserFriend
Originally posted by: dvorak.radek.gmail.com

Hi Derek,

Some comments in-lined bellow.

Regards,
/Radek


> Hi,
>
> I ran in to some usage questions:
>
> 1) My understanding is Eclipse OCL is used by QVT. If I have existing
> customized Environments for OCL, can they somehow be passed to QVTO? I
> looked in the TransformationExecutor and ExecutionContextImpl classes
> and did not see anything that looked like you can get or set an
> environment. Specifically, if expose some java methods in OCL, can they
> be available to QVTO?

QVTO defines a mechanism to define and reuse additional operations,
properties.
As we extend MDT OCL, this is realized via QVTO specific environment
hierarchy
internally used to teach OCL to properly resolve operations, properties and
handle conflicts in the right scope.

We do not support doing things in the other way around, IOW do not accept
a user defined environment OCL. It's too intrusive way of integration
at this development phase and might cause quite some issues as we override
the way how OCL handles additional operations in a QVTO defined manner.

>
> 2) Can I just use Imperative OCL instead of regular OCL without creating
> a full QVTO file. For example, with OCL i can just submit a context and
> a string with valid OCL statements and receive the result. Imperative
> OCL seems to have a lot of useful features. One other option I have is
> to create a wrapper which adds the necesary prologue and epilogue for
> OCL and invokes it as a QVTO transformation.

At the moment it's not possible to use ImperativeOCL
concrete syntax standalone. See the "Executing OCL queries" thread,
http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg04730.html

Also, check the OCL 3.0 plan, I noticed they have discussed addition of
some
ImperativeOCL like syntactic sugar.

I would not recommend calling it as a transformation, see point 3) on
calling
QVTO from OCL.

>
> 3) How can I reuse my OCL and QVT queries conveniently. I am gradually
> developing more and more. It seems like I need to standardize on placing
> them in a single format (QVTO or OCL only) and make them available as
> libraries.

It's possible to reuse QVTO in OCL, though there is some work to be done to
expose it as API, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=289977

>
> 4) Is there a sample of a Black Box implementation so I can see how I
> might integration my java methods with QVTO?

There is a simple definition example available via wizard,
'Examples/Operational QVT Transformation/Black-box Library Definition'

See the documentation of 'org.eclipse.m2m.qvt.oml.javaBlackboxUnits'
extension point,
which is used to register Java implementation class for a blackbox library.

Note, that blackbox support is going to be enhanced by
https://bugs.eclipse.org/bugs/show_bug.cgi?id=289982
Previous Topic:complete a model using ATL
Next Topic:[QVTO] Accessing Ecore Feature Maps
Goto Forum:
  


Current Time: Fri Apr 26 16:26:41 GMT 2024

Powered by FUDForum. Page generated in 0.02024 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top