Sather Home Page

Section 8.1.2.3:
ELT_LT

class ELT_LT{ETP}

Formal Types

The type definitions in this class specification fall into two groups :-

  1. The definition of ELT_LT{ETP} itself (including SAME).
  2. The auxiliary vdm type needed to define the Sather type argument used in the feature definitions which follow.
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 it cannot be a partial class because of the rule that a call into a partial class cannot be made from within another partial class.


elt_lt

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 : ETP,
second : ETP
) : BOOL
Formal Signature
elt_lt(first, second : Element_Type) res : BOOL
Pre-condition

Since this operation is a predicate and neither of the arguments are optional types, the pre-condition is vacuously true.

Post-condition

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 to Keith Hopper.
Page last modified: Thursday, 16 November 2000.
Produced with Amaya