Sather Home Page

Section 8.10.1.2:
$OUT_DEVICE

abstract class $OUT_DEVICE

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

state

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

This abstraction models a device which, at least potentially, has the ability to send data to some external device.


ouput_possible

This feature provides an enquiry facility for a program to determine whether output is currently possible from the instantiated class device.

output_possible : BOOL
Formal Signature
output_possible(self : SAME) res : BOOL
Pre-condition

Since this feature is a predicate, the pre-condition is vacuously true.

Post-condition

The result reflects the state of the real device being modelled by the instantiating class. The post-condition, however, is vacuously true.

This predicate returns true if and only if the device is in a state where data can be exported by the program.


Language Index Library Index Input/Output Index
Comments or enquiries should be made to Keith Hopper.
Page last modified: Friday, 17 November 2000.
Produced with Amaya