Extending operator semantics [message #924870] |
Thu, 27 September 2012 07:40 |
Fy Za Messages: 245 Registered: March 2010 |
Senior Member |
|
|
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 07:55] Report message to a moderator
|
|
|
|
Re: Extending operator semantics [message #927152 is a reply to message #924949] |
Sat, 29 September 2012 10:07 |
Fy Za Messages: 245 Registered: March 2010 |
Senior Member |
|
|
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 10:09] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03219 seconds