Browse Prior Art Database

Extend Data-Types to Include Units of Measurement

IP.com Disclosure Number: IPCOM000099449D
Original Publication Date: 1990-Jan-01
Included in the Prior Art Database: 2005-Mar-14
Document File: 2 page(s) / 67K

Publishing Venue

IBM

Related People

Hibberd, LR: AUTHOR [+2]

Abstract

This article discusses the benefits that can be achieved by treating data and its associated units of measurement as a single entity. Although an everyday occurrence in real life, this has not been attempted on a consistent basis in computing to date.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Extend Data-Types to Include Units of Measurement

       This article discusses the benefits that can be achieved
by treating data and its associated units of measurement as a single
entity. Although an everyday occurrence in real life, this has not
been attempted on a consistent basis in computing to date.

      In solving an engineering/scientific problem, it is typical to
spend 20% to 30% of the calculation time converting numbers from one
unit of measure to another.  Not only is this essentially wasted
time, but it is also a common source of errors, through invalid use
of formulas, incorrect conversion constants, mis-keying, etc.
    These problems can be overcome by:
    1.  coupling the unit of measure to the data value, so the two
form an object that can be treated as a single entity.

      2.  extending the functions to work on the data-unit entities
instead of just on the data values. Specifically, each function must
be able to:

      a) recognize and verify its valid arguments with respect to
their type, and

      b) convert the value from one unit of measure to another,
commensurable unit, if need be.

      The valid conversions can be supplied either by the programming
language/environment, or by the programmer.

      This specific use of units has obvious connections to the
notion of strong data-types.  It differs from it and extends it by
the explicit use of a separate "unit" value that is kept alongside
the data- value.

      Given these, a number of the errors and inhibitors listed above
can be dealt with.  The following expression is an obvious error, and
it can now be detected because miles and minutes are not
commensurable.

      10 miles + 5 minute...