| # Section 8.1.1.8: $IMMUTABLE |

###### abstract class $IMMUTABLE < $BINARY, $STR

#### 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 ;
$IMMUTABLE = set of object_type
state
references : $IMMUTABLE
inv ref_types ==
forall obj in set ref_types & sub_type($IMMUTABLE,obj)

NOTE | See the important note about vdm state in the notes on vdm-sl usage in this specification.

This abstract class models the representation forms for objects of immutable classes. It is also, of course, possible to implement a class deriving from this abstraction which is not immutable - but has been implemented with immutable semantics.

This class defines no features of itself, deriving those features which sub-types must implement transitively from the abstractions from which it inherits.

| Language Index |  | Library Index |  | Basic Index

Comments or enquiries should be made to Keith Hopper. Page last modified: Tuesday, 23 May 2000. |