20.03.2013 Views

II. Notes on Data Structuring * - Cornell University

II. Notes on Data Structuring * - Cornell University

II. Notes on Data Structuring * - Cornell University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NOTES ON DATA STRUCTURING 89<br />

easy for a compiler to check the c<strong>on</strong>sistency of the program, and prevent<br />

errors from reaching the executi<strong>on</strong> stage.<br />

1.4. NOTATIONS<br />

In presenting a theory ofdata structuring, it is necessary to introduce some<br />

c<strong>on</strong>venient notati<strong>on</strong> for expressing the abstracti<strong>on</strong>s involved. These notati<strong>on</strong>s<br />

are based to a large extent <strong>on</strong> those already familiar to mathematicians,<br />

logicians and programmers. They have also been designed for direct expres-<br />

si<strong>on</strong> of computer algorithms, and to minimise the scope for programming<br />

error in running programs. Finally, the notati<strong>on</strong>s are designed to ensure the<br />

existence of efficient data representati<strong>on</strong>s <strong>on</strong> digital computers.<br />

Since the notati<strong>on</strong>s are intended to be used (am<strong>on</strong>g other things) for the<br />

expressi<strong>on</strong> of algorithms, it would be natural to c<strong>on</strong>clude that they c<strong>on</strong>stitute<br />

a form of programming language, and that an automatic translator should be<br />

written for c<strong>on</strong>verting programs expressed in the language into the machine<br />

code of a computer, thereby eliminating the expensive and error-pr<strong>on</strong>e<br />

coding stage in the development of programs.<br />

But this c<strong>on</strong>clusi<strong>on</strong> would be a complete misunderstanding of the reas<strong>on</strong><br />

for introducing the notati<strong>on</strong>s, and could have some very undesirable c<strong>on</strong>se-<br />

quences. The worst of them is that it could lead to the rejecti<strong>on</strong> of the main<br />

benefits of the programming methodology expounded in this m<strong>on</strong>ograph, <strong>on</strong><br />

the grounds that no compiler is available for the language, nor likely to be<br />

widely accepted if it were.<br />

But there are sound reas<strong>on</strong>s why these notati<strong>on</strong>s must not be regarded as a<br />

programming language. Some of the operati<strong>on</strong>s (e.g., c<strong>on</strong>catenati<strong>on</strong> of<br />

sequences), although very helpful in the design of abstract programs and the<br />

descripti<strong>on</strong> of their properties, are grotesquely inefficient when applied to<br />

large data objects in a computer; and it is an essential part of the program<br />

design process to eliminate such operati<strong>on</strong>s in the transiti<strong>on</strong> between an<br />

abstract and a c<strong>on</strong>crete program. This eliminati<strong>on</strong> will sometimes involve<br />

quite radical changes to both algorithm and representati<strong>on</strong>, and could not in<br />

general be made by an automatic translator. If such expensive operators were<br />

part of a language intended for automatic compilati<strong>on</strong>, it is probable that<br />

many programmers would fail to realise their obligati<strong>on</strong> to eliminate them<br />

before approaching the computer; and even if they wanted to, they would<br />

have little feeling for what alternative representati<strong>on</strong>s and operati<strong>on</strong>s would<br />

be more ec<strong>on</strong>omic. In taking such vital decisi<strong>on</strong>s, it is actually helpful if a<br />

programming language is rather close to the eventual machine, in the sense<br />

that the efficiency of the machine code is directly predictable from the form<br />

and length of the corresp<strong>on</strong>ding source language code.<br />

There is a more subtle danger which would be involved in the automatic<br />

implementati<strong>on</strong> of the notati<strong>on</strong>s" that the good programmer would so<strong>on</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!