|Re: OCL as an "object reference graph" [message #876242 is a reply to message #876226]
||Thu, 24 May 2012 08:10
| Ed Willink
Registered: July 2009
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
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 ?
Powered by FUDForum
. Page generated in 0.01543 seconds