PropertyTemplates with OCL [message #1081671] |
Wed, 07 August 2013 10:31  |
Eclipse User |
|
|
|
Is it possible to directly access properties with OCL navigation?
Consider the following relation:
top relation AtoA {
enforce domain source aLeft: simplesource::A{
b=z:simplesource::B{},
str = aRight.b.str
};
enforce domain target aRight: simpletarget::A{
b=z2:simpletarget::B{
}
};
}
I want to produce a consistent output model instance from a input model instance. That means, the output model instance is empty before the transformation.
When the transformation is executed in target direction (empty target model instance), I expect that aLeft.str will not be matched in the source graph since aRight is not bound yet.
Now, when the transformation is executed in source direction (empty source model instance), I expect that the value of aRight.b.str is assigned to aLeft.str.
Is this correct? Can I use arbitary OCL queries to access attributes of a domain element?
[Updated on: Wed, 07 August 2013 10:36] by Moderator
|
|
|
|
|
Re: PropertyTemplates with OCL [message #1082356 is a reply to message #1081902] |
Thu, 08 August 2013 09:02  |
Eclipse User |
|
|
|
Hi
No. Because a complex RHS in a forward direction becomes a complex
pattern match in the reverse direction and if where this is possible,
tooling is liable to be simplistic.
Regards
Ed Willink
On 07/08/2013 22:15, Goood Guy wrote:
>
> Hi,
>
> thank you very much. Do you mean my transformation is unlikely to be
> bidirectional because the str-attribute is assigned only in the
> target-to-source direction but not in the source-to-target direction?
|
|
|
Powered by
FUDForum. Page generated in 0.04267 seconds