I am having a bit of troubles trying to understand the semantics of OCL operands in the OCL specification of version 2.4. In particular, to begin with, given a contextual model as a Student class, in which the available attributes is his age, then consider the current instance of this model includes the assignment of variable object is a student whose age is undefined
. I would like to ask what would the return value be when evaluating these the following examples:
- object.age = 18
- object.age = object.age
- object.age >= 18
- object.age >= object.age
Basically, I would like to understand the semantics of these operands in the presence of an undefined
value.
Thanks everyone!