Extending operator semantics [message #924870] |
Thu, 27 September 2012 03:40  |
Eclipse User |
|
|
|
Using MDT/OCL sources downloaded from Git, I try to extend the semantic of several operators like for example 'not'
Using completeocl, when I try to define this constraint
Context Test
inv not_5:
not 5
I has this error "Unresolved Operation 'UnlimitedNatural::not()'"
and this is right for completeocl.
However, for the semantic of my DSL, I can write this.
I don't know what is the element that should be extended:
the semantic of the 'not' operator
or of the semantic of data type (like in this case, UnlimitedNatural).
Thanks
[Updated on: Thu, 27 September 2012 03:55] by Moderator
|
|
|
|
Re: Extending operator semantics [message #927152 is a reply to message #924949] |
Sat, 29 September 2012 06:07  |
Eclipse User |
|
|
|
Thank you for reply,
However, I don't know where I should write this definition!
I tried to make it in
/org.eclipse.ocl.examples.pivot/model/Types.ocl but the same error is shown (of course, after generate all editors).
I don't like define a semantic of the operator not with UnlimitedNatural type.
I 'd like just write it to be after parsed.
Also, I don't find classical definitions (like for example not operator with Boolean type)
Thanks
Fy Za
[Updated on: Sat, 29 September 2012 06:09] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04121 seconds