Heading:
IDL DESIGN: PPL Version Design Flaws
Page Numbers: Yes X: 527 Y: 10.5"
XEROX Palo Alto Research Center9 February 1977
Inter-Office Memorandum
ToIDL GroupFromBeau Sheil
File<IDL>Design.PPLFlawsIDL Design Note Number: 2
Subject Flaws in the PPL version
This document describes various shortcomings in the PPL version of IDL - both differences from the IDL Reference Manual, and some internal "features" of the PPL version that should not be copied over into INTERLISP. The function of this memo is to list the lacunae of the PPL version so that one does not become confused by known omissions/errors when either (a) using the behavior of the PPL code as a reference against which to compare the INTERLISP version, or (b) extracting the algorithms from the PPL code. Design flaws in the actual specifications for the PPL version are treated in a separate memo entitled "Extensions".
The PPL version should be regarded as a definitional interpreter, not a production program. For this reason, it is very slow and does not contain certain features whose implementation was both tedious and well understood. This should be born in mind when reading this memo. Furthermore, expect this memo to grow in length as our understanding of the PPL version grows during the transcription!
The known deviations from the specifications include
1.File resident arrays are not supported, although the code occasionally traps for them at the right places.
2.The DATAFILE program was not implemented as a part of the PPL version, but as a separate stand alone program for the PDP-11.
3.As noted in the manual, the probability distribution functions are neither specified or implemented. For this reason, functions like ANOVA (only case known at present) return NULL where they would otherwise return a probability value.
4.Neither the trigonometric nor mathematical functions accept arrays or virtual scalars.
5.The functions ABS, MAX, MIN, MOD, PLOT, and RANDOMN are not yet implemented.
6.PRODCOMPR is not implemented, and */ is therefore not bound to it.
7.RECODE does not check recoded values against the value specifications given.
8.BIND could not be implemented in PPL. Therefore, (a) the functions BINDn where n is the number of arguments e.g. BIND2(A,B) are used instead, (b) REDUCE (and other functionals) cannot be, and therefore are not, mapped.
9.The results of INVERT and SWEEP on full arrays are incorrect.
10.The assignment operator, <-, does not return a value.
Known deficiencies in the internal code (i.e. algorithms which are correct but sub-optimal because of lack of time to do any better) include
1.The internal sorting function - called both by user and system routines - is a bubble sort!
2.The DEAL function generates a random permutation by sorting a random vector. There is an ~n algorithm in Knuth.
3.The INDEX function (used for searching linear structures such as strings, tuples and vectors) is far too general and inefficient. It should be replace by one or more functions which know what they are searching (i.e. in particular, strings). There may be no need for the function EQUAL when this is done.
In case you need to check the behavior of the PPL version, the otherwise undocumented operating procedure for it is as follows: Run PPL. Read the source file <IDL>IDL.PPL (this will take a while). When done, start IDL by typing IDL. Then type
IDL.SAVEFLG <- TRUE; SAVE("IDL")
which will write a file IDL.ENV in your directory. This file may now be RESTOREd into a running PPL to provide a running IDL. If an error occurs while running IDL, an error message will be printed and a reset to top level will take place. The prompt PPL> will then appear, indicating that PPL (not IDL) is listening to you. To restart IDL, type IDL in response to this prompt.