![]() |
Section 8.16.1.1: |
![]() |
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 any kind of string which is suitable for exporting to a communications/file medium. The features provided are generic operations on a string needed in order to carry out import/export.
This feature is included in the model to providea means for using a string in some external execution environment service call. The returned value is implementation-dependent.
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 pre-condition being vacuously true.
Since the result of this feature is implementation-dependent no post-condition can be specified (except to state here that the reference is required to be a valid handle for self).
This feature provides an environment-defined handle for the contents of self (for use in external input or output).
This feature is provided to enable a program to manipulate the elements at the beginning of the string as an independent string.
This feature is required to operate successfully whatever the value of cnt may be. The pre-condition is therefore vacuously true.
This feature provides either cnt elements from the head of self or the contents of self if that contains fewer elements.
This feature corresponds to the one above in respect of the end of the string being made available for manipulation purposes.
This feature is required to operate successfully whatever the value of cnt may be. The pre-condition is therefore vacuously true.
This feature provides either cnt elements from the tail of self or the contents of self if that contains fewer elements.
This feature emables a program to select an arbitrary substring of the string for independent manipulation.
This feature provides the substring of num elements of self beginning with the one whose index is one greater than beg.
NOTE | Indices used in Sather programs start with zero, those in vdm-sl are ordinal numbers starting from 1. |
![]() |
Language Index | ![]() |
Library Index | ![]() |
String Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Wednesday, 29 November 2000. |
![]() |