© 1981 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
Abstract data types, subtypes and data independence

1 School of Computing Studies, University of East Anglia, Norwich, UK, 2 Department of Computer Science, University of Queensland, Brisbane, Australia
A generalised subtype definition facility is described. A subtype may be restricted in its values, its operations or both. Coercion from a subtype value to a parent type value is always possible. The reverse coercion may or may not be allowed, depending on the subtype. A subtype may or may not use the same form of representation as the parent type. Several examples showing the usefulness of the subtype facility are given. It is shown that, with a few additional facilities, subtypes may be useful in providing data independence in a general purpose language. Finally, it is shown that the concept of subtype is useful in understanding the relationships between certain other programming language constructs.
Received March 1980.
* School of Computing Studies, University of East Anglia, Norwich NR4 7TJ, UK.
Department of Computer Science, University of Queensland, Brisbane, Australia 4067.