![]() |
Section 8.1.1.5: |
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 an object of which a hash value may be derived which is uniform over the domain of CARD.
This requirement provides a facility to hash a vlaue of the sub-typing class. The way in which this may be done depends on the class concerned and there can be no guarrantee of uniformity over the domain of cardinal numbers.
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.
Providing that the domain is larger than the range of values making up self then this feature yields a unique value. If the range of self is larger, then the mapping from self to result is no longer one-to-one.
This feature returns a numeric hash value which may be of use in hashing map (or other) containers.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Basic Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Tuesday, 23 May 2000. |
![]() |