![]() |
Section 8.1.1.11: |
The following abstract type ($ELT) is the first of two with this name. The second one is $ELT{T}. Both are defined on this page.
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 an object which contains a nnumber of other objects of an arbitrary type. It defines two features.
This feature is provided to return the count of elements in the sub-typing class.
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.
This feature returns the count of elements in self. Note that this may be zero since, while self may exist it does not necessarily have to contain anything.
This feature yields in turn all of the values of the components of the object in an implementation-dependent order. The underlying implementation is entitled to change this order at any time, so it should not be relied upon.
Note that this feature requirement differs from the more stringent requirement of array iterators.
Note that the formal name of the iter has been changed to replace the exclamation mark iter symbol to a name acceptable to vdm tools.
Pre-condition
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 - true.
Post-condition
This post-condition makes use of the history concept from vdm++ (see the vdm dialect notes).
Quit condition
For quit actions see the specificatiion of the quit statement.
This iterator yields successive elements of self without duplication in any order until all have been returned, when the iterator quits.
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 an object which contains a nnumber of other objects of an arbitrary type. Inheriting from $ELT, it defines only the single iterator since the size feature requirement is inherited.
This feature yields in turn all of the values of the components of the object in an implementation-dependent order. The underlying implementation is entitled to change this order at any time, so it should not be relied upon.
Note that this feature requirement differs from the more stringent requirement of array iterators.
elt! | T |
Note that the formal name of the iter has been changed to replace the exclamation mark iter symbol to a name acceptable to vdm tools.
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.
This post-condition makes use of the history concept from vdm++ (see the vdm dialect notes).
Quit condition
For quit actions see the specificatiion of the quit statement.
This iterator yields successive elements of self (which are of the type of the argument to this class) in any order until all have been returned when the iterator quits.
![]() |
Language Index | ![]() |
Library Index | ![]() |
Basic Index |
Comments or enquiries should be made to
Keith
Hopper. Page last modified: Tuesday, 23 May 2000. |
![]() |