Browse Prior Art Database

SOME REMARKS ON DATA, TYPES

IP.com Disclosure Number: IPCOM000128613D
Original Publication Date: 1978-Dec-31
Included in the Prior Art Database: 2005-Sep-16
Document File: 15 page(s) / 47K

Publishing Venue

Software Patent Institute

Related People

J.A. Feldman: AUTHOR [+4]

Abstract

In current programming languages, data types and the associated type machinery are used for a variety of purposes. We will discuss how in some cases alternatives to ordinary data types may serve better, providing :Language facilities which are more expressive, and more extensible.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 8% of the total text.

Page 1 of 15

THIS DOCUMENT IS AN APPROXIMATE REPRESENTATION OF THE ORIGINAL.

SOME REMARKS ON DATA, TYPES

J.A. Feldman and G.J. Williams Computer Science Department The University of Rochester Rochester, New Fork

TR28

April 1978 The preparation of this paper was supported in part by the Alfred P. Sloan Foundation under Grant Number 74-12-5, and in part by the National Science Foundation under Grant Number MSC76-1825. >

1. Introduction

In current programming languages, data types and the associated type machinery are used for a variety of purposes. We will discuss how in some cases alternatives to ordinary data types may serve better, providing :Language facilities which are more expressive, and more extensible.

For simple variables, a data type can be characterized as the set of operations specifying the interpretation of a given bit string in the memory of the computer. This approach is taken by [Demers et al., 1978]. The distinction between real and integer is a common example, directly related to the difference in hardware operations for real and integer variables. In a tagged architecture where reals and integers use the same set of operations, there might be a single type number. At a lower level, a type bits could be provided, to allow the interpretation of a bit string simply as a bit string.

Since the number of types which have a distinct, direct hardware interpretation is small and fixed, it seems appropriate to regard them as primitive. The present data type machinery is perfectly adequate for this purpose, allowing each simple variable a single interpretation. The compiler will ensure that we do not mix different types in an incorrect way. It is central to the present conception of data type that the compiler checks type correctness.

This has led to the unfortunate notion that if the compiler is to check something, then the thing to be checked must be a data type. Data types are now being used to encode all those properties of a variable which the compiler checks. This is one instance of a common situation, in which programming language form is restricted by an implicitly held model of a very crude compiler. We are engaged in exploring the implications for language design of explicitly taking account of the current capabilities in optimization and verification. This paper will discuss how the design of the data types in a language interacts with flow analysis, value propagation, assertion handling and so on. Our group is also working on the design of language facilities for distributed computing [Feldman, 1976] and data base systems [Shopiro, 1978], and on automatic selection of data structures [Low and Rovner, 1976].

Consider the subrange type of PASCAL. A variable

(Equation Omitted)

Columbia University Page 1 Dec 31, 1978

Page 2 of 15

SOME REMARKS ON DATA, TYPES

has a hardware representation (or underlying type) of integer. However it is guaranteed by the compiler to lie between d 100. This type can then be used to define an array...