![]() |
Section 8.1.1.4: |
![]() |
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.
The type definitions in this abstract class specification fall into two groups :-
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 ordering valid over the lifetime of the whole object. The exact nature of value equality is therefore defined by classes sub-typing from it.
NOTE | In defining this abstraction it is the intention that any inheriting class definition of equality should be for value ordering. It is, however, possible that some reference class may have ordering defined on it - equality which is not necessarily 'value ordering'. See the definition of text string ordering in the class REPERTOIRE for an essential example of this. |
This class defines the following single feature.
This feature is the ordering relation for objects of the class sub-typing from this abstract model. The class implementing this feature may choose to do so in any way desired, not necessarily in the form expected for, say arithmetic ordering or character code ordering.
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.
Note that this post-condition is defined as value ordering (in the vdm-sl sense).
This predicate returns true if and only if self is less than other for the class argument 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: Thursday, 16 November 2000. |
![]() |