![]() |
Section 8.1.1.10: |
![]() |
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.
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 a reference class having immutable semantics. This is provided by the single feature defined below.
This feature requires a sub-typing class to implement this facility of returning an object as a new value. This means that there shall be no references to reference components of self in the object returned.
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.
This post-condition equality is equality of value in the sense defined for vdm. It is not object equality.
This feature returns the value of all components of self (rexursively) in a new object. No reference objects in the result refer to reference objects in self!
![]() |
Language Index | ![]() |
Library Index | ![]() |
Basic Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Thursday, 16 November 2000. |
![]() |