Sather Home Page

Section 8.12.1.19:
$RATIONAL

abstract class $RATIONAL{NTP} < $CONVERSION{NTP},$ARITHMETIC{NTP}, $SIGNED{NTP},$VALUE_ITERS{NTP}, $LOG_OPS{NTP},$ROUNDING{NTP}, $HASH

$IS_NIL $NIL $IS_EQ $VALUE $IS_LT{ETP} $STR $BINARY $ORDERED{NTP} $TEXT $ZERO{NTP} $NFE{NTP} $ADD_OPS{NTP} $SIGNED{NTP} $CONVERSION{NTP} $LOG_OPS{NTP} $ARITHMETIC{NTP} $VALUE_ITERS{NTP} $ROUNDING{NTP} $HASH $RATIONAL{NTP}
Inheritance Diagram

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 ;
$RATIONAL = set of object_type

state

references : $RATIONAL
   inv ref_types ==
      forall obj | obj in set ref_types &
         sub_type($RATIONAL,obj)
NOTE See the important note about vdm state in the notes on vdm-sl usage in this specification.

This abstraction models the domain of rational numbers.

This abstraction defines no features of its own.


Language Index Library Index Numeric Index
Comments or enquiries should be made to Keith Hopper.
Page last modified:Sunday, 3 June 2001.
Produced with Amaya