Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » EMF with OCL
EMF with OCL [message #502133] Sun, 06 December 2009 07:28 Go to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Hi all,

i want to enhance my ecore model with OCL constraints. For simple
constraints (like the length of a string) this can be easily done, but
what is the best strategy to test much more complex and complicated
constraints? Allways regeneratinhg and than restarting the whole model
and editor seems to be very unhandy. Does anyone have some good hints
how to test the constraints? It should be possible to use the OCL
Interpreter, i think.

And one more question. Are the constraints being checked when the model
is manipulated programmatically or is this only possible via the editor?
I think i can assume the answer, but to know it is much better :-)

Thanks a lot and a nice 2. Advent

Timothy
Re: EMF with OCL [message #503267 is a reply to message #502133] Fri, 11 December 2009 11:06 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 779
Registered: July 2009
Senior Member
--=-glDIMt9zz7GfR2E6mXBz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Timothy,

The Helios M4 milestone of EMF has support for pluggable constraint
languages for the definition of operations and constraints in dynamic
models (and possibly also properties; I'm not sure). Because it
supports dynamic models, you shouldn't need to generate any code at all
to test your OCL constraints. You should be able to test everything in
the reflective Ecore model editor, on "dynamic instances."

Check it out in the EMF New and Noteworthy page or in Bugzilla for
details:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=255786
https://bugs.eclipse.org/bugs/show_bug.cgi?id=255469

HTH,

Christian


On Sun, 2009-12-06 at 13:28 +0100, Timothy Marc wrote:

> Hi all,
>
> i want to enhance my ecore model with OCL constraints. For simple
> constraints (like the length of a string) this can be easily done, but
> what is the best strategy to test much more complex and complicated
> constraints? Allways regeneratinhg and than restarting the whole model
> and editor seems to be very unhandy. Does anyone have some good hints
> how to test the constraints? It should be possible to use the OCL
> Interpreter, i think.
>
> And one more question. Are the constraints being checked when the model
> is manipulated programmatically or is this only possible via the editor?
> I think i can assume the answer, but to know it is much better :-)
>
> Thanks a lot and a nice 2. Advent
>
> Timothy

--=-glDIMt9zz7GfR2E6mXBz
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Timothy,<BR>
<BR>
The Helios M4 milestone of EMF has support for pluggable constraint languages for the definition of operations and constraints in dynamic models (and possibly also properties; I'm not sure).&nbsp; Because it supports dynamic models, you shouldn't need to generate any code at all to test your OCL constraints.&nbsp; You should be able to test everything in the reflective Ecore model editor, on &quot;dynamic instances.&quot;<BR>
<BR>
Check it out in the EMF New and Noteworthy page or in Bugzilla for details:<BR>
<BR>
<A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255786">https://bugs.eclipse.org/bugs/show_bug.cgi?id=255786</A><BR>
<A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255469">https://bugs.eclipse.org/bugs/show_bug.cgi?id=255469</A><BR>
<BR>
HTH,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Sun, 2009-12-06 at 13:28 +0100, Timothy Marc wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi all,

i want to enhance my ecore model with OCL constraints. For simple
constraints (like the length of a string) this can be easily done, but
what is the best strategy to test much more complex and complicated
constraints? Allways regeneratinhg and than restarting the whole model
and editor seems to be very unhandy. Does anyone have some good hints
how to test the constraints? It should be possible to use the OCL
Interpreter, i think.

And one more question. Are the constraints being checked when the model
is manipulated programmatically or is this only possible via the editor?
I think i can assume the answer, but to know it is much better :-)

Thanks a lot and a nice 2. Advent

Timothy
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-glDIMt9zz7GfR2E6mXBz--
Re: EMF with OCL [message #503582 is a reply to message #503267] Mon, 14 December 2009 14:44 Go to previous messageGo to next message
Timothy Marc is currently offline Timothy Marc
Messages: 547
Registered: July 2009
Senior Member
Hi Christian,

that sounds promising. Just for the sake of clarity: the capability to
weave OCL constraints into the ecore model code is still present in
galileo, isn't it?

Thanks again
Timothy

Christian W. Damus schrieb:
> Hi, Timothy,
>
> The Helios M4 milestone of EMF has support for pluggable constraint
> languages for the definition of operations and constraints in dynamic
> models (and possibly also properties; I'm not sure). Because it
> supports dynamic models, you shouldn't need to generate any code at all
> to test your OCL constraints. You should be able to test everything in
> the reflective Ecore model editor, on "dynamic instances."
>
> Check it out in the EMF New and Noteworthy page or in Bugzilla for details:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=255786
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=255469
>
> HTH,
>
> Christian
>
>
> On Sun, 2009-12-06 at 13:28 +0100, Timothy Marc wrote:
>> Hi all,
>>
>> i want to enhance my ecore model with OCL constraints. For simple
>> constraints (like the length of a string) this can be easily done, but
>> what is the best strategy to test much more complex and complicated
>> constraints? Allways regeneratinhg and than restarting the whole model
>> and editor seems to be very unhandy. Does anyone have some good hints
>> how to test the constraints? It should be possible to use the OCL
>> Interpreter, i think.
>>
>> And one more question. Are the constraints being checked when the model
>> is manipulated programmatically or is this only possible via the editor?
>> I think i can assume the answer, but to know it is much better :-)
>>
>> Thanks a lot and a nice 2. Advent
>>
>> Timothy
Re: EMF with OCL [message #503591 is a reply to message #503582] Mon, 14 December 2009 10:24 Go to previous messageGo to next message
Christian W. Damus is currently offline Christian W. Damus
Messages: 779
Registered: July 2009
Senior Member
--=-5nKnxIdA2L6MEjKEW9uc
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi, Timothy,

This is a new feature of EMF in the Helios release. And, strictly
speaking, even in Helios EMF provides only the API that extenders can
plug into. The MDT OCL component would have to provide implementations
of the EMF extension points ... I think that Kenn already provided
patches that do this, but I don't know anything more about it.

In Galileo, only MDT UML2 has code generation support for OCL-defined
constraints and operations, but it uses the Ecore environment, not the
UML environment, so it's somewhat limited by that. Hopefully that
capability of UML2 will be superseded in Helios by providers that it
plugs in to the new EMF API, but that would be a question for the UML2
team.

Cheers,

Christian


On Mon, 2009-12-14 at 20:44 +0100, Timothy Marc wrote:

> Hi Christian,
>
> that sounds promising. Just for the sake of clarity: the capability to
> weave OCL constraints into the ecore model code is still present in
> galileo, isn't it?
>
> Thanks again
> Timothy
>
> Christian W. Damus schrieb:
> > Hi, Timothy,
> >
> > The Helios M4 milestone of EMF has support for pluggable constraint
> > languages for the definition of operations and constraints in dynamic
> > models (and possibly also properties; I'm not sure). Because it
> > supports dynamic models, you shouldn't need to generate any code at all
> > to test your OCL constraints. You should be able to test everything in
> > the reflective Ecore model editor, on "dynamic instances."
> >
> > Check it out in the EMF New and Noteworthy page or in Bugzilla for details:
> >
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=255786
> > https://bugs.eclipse.org/bugs/show_bug.cgi?id=255469
> >
> > HTH,
> >
> > Christian
> >
> >
> > On Sun, 2009-12-06 at 13:28 +0100, Timothy Marc wrote:
> >> Hi all,
> >>
> >> i want to enhance my ecore model with OCL constraints. For simple
> >> constraints (like the length of a string) this can be easily done, but
> >> what is the best strategy to test much more complex and complicated
> >> constraints? Allways regeneratinhg and than restarting the whole model
> >> and editor seems to be very unhandy. Does anyone have some good hints
> >> how to test the constraints? It should be possible to use the OCL
> >> Interpreter, i think.
> >>
> >> And one more question. Are the constraints being checked when the model
> >> is manipulated programmatically or is this only possible via the editor?
> >> I think i can assume the answer, but to know it is much better :-)
> >>
> >> Thanks a lot and a nice 2. Advent
> >>
> >> Timothy

--=-5nKnxIdA2L6MEjKEW9uc
Content-Type: text/html; charset="utf-8"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.24.1.1">
</HEAD>
<BODY>
Hi, Timothy,<BR>
<BR>
This is a new feature of EMF in the Helios release.&nbsp; And, strictly speaking, even in Helios EMF provides only the API that extenders can plug into.&nbsp; The MDT OCL component would have to provide implementations of the EMF extension points ... I think that Kenn already provided patches that do this, but I don't know anything more about it.<BR>
<BR>
In Galileo, only MDT UML2 has code generation support for OCL-defined constraints and operations, but it uses the Ecore environment, not the UML environment, so it's somewhat limited by that.&nbsp; Hopefully that capability of UML2 will be superseded in Helios by providers that it plugs in to the new EMF API, but that would be a question for the UML2 team.<BR>
<BR>
Cheers,<BR>
<BR>
Christian<BR>
<BR>
<BR>
On Mon, 2009-12-14 at 20:44 +0100, Timothy Marc wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Hi Christian,

that sounds promising. Just for the sake of clarity: the capability to
weave OCL constraints into the ecore model code is still present in
galileo, isn't it?

Thanks again
Timothy

Christian W. Damus schrieb:
&gt; Hi, Timothy,
&gt;
&gt; The Helios M4 milestone of EMF has support for pluggable constraint
&gt; languages for the definition of operations and constraints in dynamic
&gt; models (and possibly also properties; I'm not sure). Because it
&gt; supports dynamic models, you shouldn't need to generate any code at all
&gt; to test your OCL constraints. You should be able to test everything in
&gt; the reflective Ecore model editor, on &quot;dynamic instances.&quot;
&gt;
&gt; Check it out in the EMF New and Noteworthy page or in Bugzilla for details:
&gt;
&gt; <A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255786">https://bugs.eclipse.org/bugs/show_bug.cgi?id=255786</A>
&gt; <A HREF="https://bugs.eclipse.org/bugs/show_bug.cgi?id=255469">https://bugs.eclipse.org/bugs/show_bug.cgi?id=255469</A>
&gt;
&gt; HTH,
&gt;
&gt; Christian
&gt;
&gt;
&gt; On Sun, 2009-12-06 at 13:28 +0100, Timothy Marc wrote:
&gt;&gt; Hi all,
&gt;&gt;
&gt;&gt; i want to enhance my ecore model with OCL constraints. For simple
&gt;&gt; constraints (like the length of a string) this can be easily done, but
&gt;&gt; what is the best strategy to test much more complex and complicated
&gt;&gt; constraints? Allways regeneratinhg and than restarting the whole model
&gt;&gt; and editor seems to be very unhandy. Does anyone have some good hints
&gt;&gt; how to test the constraints? It should be possible to use the OCL
&gt;&gt; Interpreter, i think.
&gt;&gt;
&gt;&gt; And one more question. Are the constraints being checked when the model
&gt;&gt; is manipulated programmatically or is this only possible via the editor?
&gt;&gt; I think i can assume the answer, but to know it is much better :-)
&gt;&gt;
&gt;&gt; Thanks a lot and a nice 2. Advent
&gt;&gt;
&gt;&gt; Timothy
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>

--=-5nKnxIdA2L6MEjKEW9uc--
Re: EMF with OCL [message #505170 is a reply to message #503591] Mon, 28 December 2009 05:50 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4035
Registered: July 2009
Senior Member
Hi Timothy, Christian

> This is a new feature of EMF in the Helios release. And, strictly
> speaking, even in Helios EMF provides only the API that extenders can
> plug into. The MDT OCL component would have to provide implementations
> of the EMF extension points ... I think that Kenn already provided
> patches that do this, but I don't know anything more about it.

Kenn has been concentrating on the underlying EMF changes which are
available in the Helios M4 milestone. Preliminary patches for MDT/OCL
support are available, but have not been updated for a couple of months,
and a review by the MDT/OCL team has not yet been requested. I'm expecting
an update any moment; I think the OCL aspects are fairly simple.

When it's available, I expect to update the MDT/OCL FAQ so that this FAQ
at last has a good answer.

Regards

Ed Willink
Previous Topic:EObject methods will not be available after Helios M4 milestone.
Next Topic:Execute OCL queries on models
Goto Forum:
  


Current Time: Sat Aug 30 14:26:35 EDT 2014

Powered by FUDForum. Page generated in 0.01815 seconds