![]() |
Section 8.1.1.3: |
![]() |
This abstract class defines a state component which is a set of all instantiations of objects of any class sub-typing from this class in addition to the vdm model types used wherever this class name is used. Note that SAME has to be an instantiated class, not an abstract one.
NOTE | See the important note about vdm state in the notes on vdm-sl usage in this specification. |
This abstract class defines the concept of object value equality valid over the lifetime of the whole object. The exact nature of value equality is therefore defined by classes sub-typing from it.
NOTES |
|
This class defines the following single feature.
any class sub-typing from this is required to have an equality feature. While the name of this feature permits its use in infix expressions, the semantics are entirely dependent on the including class and may bear absolutely no relation to the more usual value or identity predicate.
Note that in contrast to a pre-condition written in Sather source code, in vdm-sl the type SAME is not an optional type and therefore self must exist, leading to the vacuous pre-condition - true.
This post-condition is defined as value equality (in the vdm-sl sense), however, an implementation class could choose to do otherwise - depending on the semantucs of the object being modelled.
This predicate returns true if and only if self is equal to other for this element type. Note that the name of this feature enables it to be used in an infix expression.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Basic Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Tuesday, 23 May 2000. |
![]() |