Home » Archived » M2M (model-to-model transformation) » [ATL] OCL queries
[ATL] OCL queries [message #73983] |
Wed, 30 January 2008 17:57 |
Eclipse User |
|
|
|
Originally posted by: frederic.thomas.cea.fr
Hi,
I use ATL for UML model transformations. In my case study, I need to
transform a UML model in which some OCL constraints must parametrized the
transformation execution. In other words, I need to check those
constraints during the transformation execution.
Does it exist a way to call OCL queries during an ATL transformation
execution ?
Of course, their syntaxes should be conformed to the OCL implementation of
ATL.
|
|
| | |
Re: [ATL] OCL queries [message #74419 is a reply to message #74402] |
Tue, 05 February 2008 16:03 |
Frédéric Jouault Messages: 572 Registered: July 2009 |
Senior Member |
|
|
Hi again,
I have just noticed Dennis'message, in which he also suggested the HOT
approach :-).
Regards,
Frédéric Jouault
Frédéric Jouault wrote:
> Hi,
>
> > I use ATL for UML model transformations. In my case study, I need to
> > transform a UML model in which some OCL constraints must parametrized
> > the transformation execution. In other words, I need to check those
> > constraints during the transformation execution.
> > Does it exist a way to call OCL queries during an ATL transformation
> > execution ?
>
> There are several possibilities. For instance:
> - "Dynamically": you could parse the OCL expressions using the
> String.inject(...) operation, then interpret the expressions using helpers.
> - "Statically": you could run a first transformation from UML to ATL
> that would extract the OCL expressions and encapsulate them in a
> transformation, then run this transformation. In this case, you would be
> using a Higher Order Transformation (HOT).
>
>
>
> Regards,
>
> Frédéric Jouault
|
|
|
Re: [ATL] OCL queries [message #74563 is a reply to message #74402] |
Wed, 06 February 2008 09:17 |
Eclipse User |
|
|
|
Originally posted by: frederic_thomas_fr.yahoo.fr
Hi,
Frédéric Jouault a écrit :
> There are several possibilities. For instance:
> - "Dynamically": you could parse the OCL expressions using the
> String.inject(...) operation, then interpret the expressions using helpers.
> - "Statically": you could run a first transformation from UML to ATL
> that would extract the OCL expressions and encapsulate them in a
> transformation, then run this transformation. In this case, you would be
> using a Higher Order Transformation (HOT).
Thanks a lot for your answer.
In fact, I have implemented a third solution. I have forked the uml24atl
driver.This new driver is called ocluml24atl. It provides a new
operation named checkConstraint() which call the emf.ocl.validator. This
plugin parses the constraint body by itself and evaluates the
constraint. In my case OCL constraints are only invariants. Hence, that
new ATL VM operation returns a boolean. I can check OCL invariant
constraints stored in my input UML model during the ATL transformation
execution. It's certainly not the best solution but It works fine.
Anyway, I am interresting to improve my solution. I am prototyping a
tool in which several ATL transformations are aleady chained. I can add
a new transformation from UML to ATL (the HOT transformation that you
mentioned). Nevertheless, body of OCL constraints in UML models are
strings. Hence I have to inject (with TCS for example) that strings to a
model conforms to an OCL metamodel (The ATL one for example) and at last
to execute the HOT transformation.
Does it already exist such TCS OCL injector in the ATL toolkit ?
What is the String.inject() operation that you mentionned ?
I don't find any documentation on the ATL manual. I maybe miss something.
Regards,
Frédéric
|
|
|
Re: [ATL] OCL queries [message #74599 is a reply to message #74563] |
Wed, 06 February 2008 10:03 |
Frédéric Jouault Messages: 572 Registered: July 2009 |
Senior Member |
|
|
Hi,
You can find more information about String.inject(...) at:
http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg00673.html
Let us know if we can help you further in improving your solution.
Regards,
Frédéric Jouault
Frédéric Thomas wrote:
> Hi,
>
> Frédéric Jouault a écrit :
>> There are several possibilities. For instance:
>> - "Dynamically": you could parse the OCL expressions using the
>> String.inject(...) operation, then interpret the expressions using helpers.
>> - "Statically": you could run a first transformation from UML to ATL
>> that would extract the OCL expressions and encapsulate them in a
>> transformation, then run this transformation. In this case, you would be
>> using a Higher Order Transformation (HOT).
>
> Thanks a lot for your answer.
>
> In fact, I have implemented a third solution. I have forked the uml24atl
> driver.This new driver is called ocluml24atl. It provides a new
> operation named checkConstraint() which call the emf.ocl.validator. This
> plugin parses the constraint body by itself and evaluates the
> constraint. In my case OCL constraints are only invariants. Hence, that
> new ATL VM operation returns a boolean. I can check OCL invariant
> constraints stored in my input UML model during the ATL transformation
> execution. It's certainly not the best solution but It works fine.
>
> Anyway, I am interresting to improve my solution. I am prototyping a
> tool in which several ATL transformations are aleady chained. I can add
> a new transformation from UML to ATL (the HOT transformation that you
> mentioned). Nevertheless, body of OCL constraints in UML models are
> strings. Hence I have to inject (with TCS for example) that strings to a
> model conforms to an OCL metamodel (The ATL one for example) and at last
> to execute the HOT transformation.
>
> Does it already exist such TCS OCL injector in the ATL toolkit ?
>
> What is the String.inject() operation that you mentionned ?
> I don't find any documentation on the ATL manual. I maybe miss something.
>
> Regards,
>
> Frédéric
>
>
>
>
>
>
>
|
|
|
Re: [ATL] OCL queries [message #74785 is a reply to message #74563] |
Mon, 11 February 2008 14:12 |
Milan Milanovich Messages: 201 Registered: July 2009 |
Senior Member |
|
|
Dear Frédéric,
> Does it already exist such TCS OCL injector in the ATL toolkit ?
Yes, there is OCL TCS injector, but it is not part of the ATL toolkit,
you can find it here:
http://www.eclipse.org/m2m/atl/atlTransformations/#OCL2SWRL
You should know also that it have some constraints, e.g., now it only
parse invariants, etc.
_____________________________
Best regards, Milan Milanovic
Frédéric Thomas wrote:
> Hi,
> Frédéric Jouault a écrit :
>> There are several possibilities. For instance:
>> - "Dynamically": you could parse the OCL expressions using the
>> String.inject(...) operation, then interpret the expressions using helpers.
>> - "Statically": you could run a first transformation from UML to ATL
>> that would extract the OCL expressions and encapsulate them in a
>> transformation, then run this transformation. In this case, you would be
>> using a Higher Order Transformation (HOT).
> Thanks a lot for your answer.
> In fact, I have implemented a third solution. I have forked the uml24atl
> driver.This new driver is called ocluml24atl. It provides a new
> operation named checkConstraint() which call the emf.ocl.validator. This
> plugin parses the constraint body by itself and evaluates the
> constraint. In my case OCL constraints are only invariants. Hence, that
> new ATL VM operation returns a boolean. I can check OCL invariant
> constraints stored in my input UML model during the ATL transformation
> execution. It's certainly not the best solution but It works fine.
> Anyway, I am interresting to improve my solution. I am prototyping a
> tool in which several ATL transformations are aleady chained. I can add
> a new transformation from UML to ATL (the HOT transformation that you
> mentioned). Nevertheless, body of OCL constraints in UML models are
> strings. Hence I have to inject (with TCS for example) that strings to a
> model conforms to an OCL metamodel (The ATL one for example) and at last
> to execute the HOT transformation.
> Does it already exist such TCS OCL injector in the ATL toolkit ?
> What is the String.inject() operation that you mentionned ?
> I don't find any documentation on the ATL manual. I maybe miss something.
> Regards,
> Frédéric
|
|
|
Goto Forum:
Current Time: Fri Apr 26 19:23:31 GMT 2024
Powered by FUDForum. Page generated in 0.03625 seconds
|