Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » OCL as an "object reference graph"
OCL as an "object reference graph" [message #876226] Thu, 24 May 2012 07:31 Go to next message
Erik Gollot is currently offline Erik GollotFriend
Messages: 5
Registered: May 2012
Junior Member
OCL is totally "text oriented", well.
But when your UML model changes, some OCL constraints become invalid and "they should not".
For example, if you change the name of an attribute, this change should be propagated into all constraints that use this attribute.

The problem, to my point of view is that an OCL constraint is totally stored as a text. All UML elements references are stored using their name and not their xmi:id.

If we store the xmi:id instead of the name, all name changes will not be a problem. Even more, it will be possible, more easilly to change how an OCL constraint is display. I mean it will be possible to associate a more "functional name" for each attribute and to have the choice to choose this functional name instead of the "UML name" (less functional.....some times) to display the full OCL expression.

What do you think about this approach ?
Re: OCL as an "object reference graph" [message #876242 is a reply to message #876226] Thu, 24 May 2012 08:10 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Using UML alone, OCL is stored as the textual body of an OpaqueExpression.

The OCL specification provides an alternate derivation of
ValueSpecification. ExpressionInOcl provides for an AST representation
with references just as you suggest. The OCL specification of this AST
is inadequate in a number of respects that hopefully will be resolved in
OCL 2.5. The Eclipse OCL pivot binding is a prototype of this possible
resolution.

Regards

Ed Willink

On 24/05/2012 08:31, Erik Gollot wrote:
> OCL is totally "text oriented", well.
> But when your UML model changes, some OCL constraints become invalid
> and "they should not".
> For example, if you change the name of an attribute, this change
> should be propagated into all constraints that use this attribute.
>
> The problem, to my point of view is that an OCL constraint is totally
> stored as a text. All UML elements references are stored using their
> name and not their xmi:id.
>
> If we store the xmi:id instead of the name, all name changes will not
> be a problem. Even more, it will be possible, more easilly to change
> how an OCL constraint is display. I mean it will be possible to
> associate a more "functional name" for each attribute and to have the
> choice to choose this functional name instead of the "UML name" (less
> functional.....some times) to display the full OCL expression.
>
> What do you think about this approach ?
Re: OCL as an "object reference graph" [message #877294 is a reply to message #876242] Sat, 26 May 2012 10:59 Go to previous messageGo to next message
Erik Gollot is currently offline Erik GollotFriend
Messages: 5
Registered: May 2012
Junior Member
Thanks
It seems to be the solution......if the tools are enable to store/retrieve this ExpressionInOCL
Re: OCL as an "object reference graph" [message #877354 is a reply to message #877294] Sat, 26 May 2012 14:33 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You will find that the Acceleo *.emtl format uses the Eclipse OCL
proprieatry variant of this format.

OCL 2.5 might have an agreed standard.

Regards

Ed Willink


On 26/05/2012 11:59, Erik Gollot wrote:
> Thanks
> It seems to be the solution......if the tools are enable to
> store/retrieve this ExpressionInOCL
Previous Topic:RoyalandLoyal example
Next Topic:Question on Java code generator in Eclipse Juno
Goto Forum:
  


Current Time: Thu Apr 25 23:24:39 GMT 2024

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

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

Back to the top