# Section 8.1.1.4:
$IS_LT

###### abstract class $IS_LT{T} < $IS_EQ

#### Formal Definitions

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.

types
SAME = object_type ;
$IS_LT_T = set of object_type
state
multi : $IS_LT_T
inv multi_types ==
forall obj in set multi_types & sub_type($IS_LT_T,obj)

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.

#### is_lt

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.

is_lt | (
| other : T
| ) : BOOL

##### Formal Signature

is_lt(self : T, other : T) res : BOOL

##### Pre-condition

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.

##### Post-condition

Note that this post-condition is defined as value ordering (in the vdm-sl sense).

post res = (self < other)

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: Friday, 14 July 2000. |