Restricted data types, specification and enforcement of invariant properties of variables

  • Authors:
  • Normand Buckle

  • Affiliations:
  • Departement d'informatique, Université de Montréal, Qué., Canada

  • Venue:
  • Proceedings of an ACM conference on Language design for reliable software
  • Year:
  • 1977

Quantified Score

Hi-index 0.00

Visualization

Abstract

When defining a data type, it is often useful to specify restrictions on the permitted values of that type. Pascal's subrange type declaration, a special case of this kind of constraint definition, has already proved itself to be quite useful. Restricted data types allow more complex constraints to be defined and checked; for example, a variable could be declared of type “odd integer” or the day field of a “date” type variable could be checked for consistency with the year and month fields. A simple mechanism is proposed, allowing the formulation of such constraints and their association with data types; the behaviour of a restricted type variable is described. The effects of the use of such a mechanism on program reliability, readability and efficiency are discussed.