![]() |
Section 8.1.2.3:
|
![]() |
The type definitions in this class specification fall into two groups :-
types SAME = ELT_LT_ETP ; -- Auxiliary Types Element_Type = @ETP
This class provides the equality comparison function for elements of type ETP. If no other method has been provided then a default implementation-defined ordering relation is used.
It should be noted that this class cannot be implemented as a partial class because of the rule that a call into a partial class cannot be made from within another partial class.
This is the sole predicate provided by this class. If the argument class derives from $IS_LT then the ordering relation provided in that class is used, otherwise if the arguments are immutable then an exception is raised, otherwise the implementation-defined ordering relation is used.
elt_lt(first, second : Element_Type) res : BOOL
Since this operation is a predicate and neither of the arguments are optional types, the pre-condition is vacuously true.
The formal post-condition is expressed as being equality in vdm terms. This is true if the argument type has a defined ordering relation, otherwise it must be informally recognised as implying an implementation-defined ordering relation.
post res = (first < second)
This predicate returns true if and only if the first argument precedes the second using the applicable ordering relation. The relation used is the class defined is_lt routine if the argument type is a subtype of $IS_LT, otherwise it uses the implementation-defined object ordering relation test is used.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Basic Index |
Comments
or enquiries should be made toKeith Hopper. Page last modified: Thursday, 29 March 2001. |
![]() |