Notes on SDC LISP 1.5 System for IBM 360 Computers
by Jeff Barnett
June 2010
The System Development Corporation (SDC) by the early 1960s had made a commitment to provide its research community with first class Lisp tools. A full compile Lisp 1.5 and the only implementation of Lisp 2 were hosted on their AN/FSQ-32 computer. However, that computer was to be retired and replaced with an IBM 360 Model 50 in the late 1960s so a new Lisp was needed. The 360, like the Q-32 would provide time-sharing to as many as 20 simultaneous online users. The memory on the 360 available to a user was to be in the neighborhood of ¼ megabyte. Note, virtual memory was not available at that time and would not be for several years. Jeff Barnett and Bob Long implemented the new Lisp system in 1968.
SDC was aware that IBM Yorktown Heights intended to build a Lisp too. So IBM and SDC discussed jointly developing a Lisp that would be made available to most of the computer users in the United States. However, there were two issues. The first was OS; SDC was developing the ADEPT time-sharing system for the IBM 360 on DARPA money and IBM had their own OS. The second issue was pointer size; SDC planned to use a 16-bit word (4 bytes per word) pointers and IBM was committed to 32-bit byte pointers. The differences in OS were easy to resolve since the linguistic mechanisms of a decent Lisp are fairly OS independent. The second issue was the deal breaker. With real memory restricted to about ¼ megabyte and no virtualization mechanism, the use of large pointers cut the number of Lisp objects in half. IBM and SDC decided to follow their own muses.
The 1968 SDC document SP-3043, J. A. Barnett and R. E. Long, “The SDC Lisp 1.5 System for IBM 360 Computers” provides a reasonable description of the resulting Lisp. However, there are a few points of interest that are not covered in that document:
- The compiler and EVAL were absolute compatible. Compiled code and interpreted code produced identical results. The reason was simple. EVAL cons’ed its argument into the body of a DEFUN, compiled it, and ran the compile function to produce a value.
- Techniques were developed to support near bug-free compiler implementation. In fact only two compiler/assembler bugs were found in over a decade of system use. The second bug was the same as the first one which wasn’t fixed properly.
- Code execution times were extraordinarily fast. This was counterintuitive since basic functions like CAR were not open-coded. The way to achieve fast code in limited-memory systems is to cut down code size; slick tricky code clichés are harmful if their size contributes to garbage collection frequency. What was highly optimized were conditional branching and consumption of previously computed results when Lisp evaluation rules permitted one to do so.
- The system provided for infix as well as Polish Lisp. Even Lisp old timers seemed to prefer infix for most coding chores. An infix expression could contain a prefix expression and the latter could contain assembly language sequences. So there never was a complete loss of some language form when infix was used.
The SDC Lisp 1.5 for 360 computers was used by hundreds of research programs over its lifetime. As it was a child of the SDC Lisp for the AN/FSQ-32, it was the bootstrap parent of CRISP. The Q-32 Lisp and CRISP are described elsewhere in these archives.
The following is a function, written in infix, which was part of an early 1970s speech understanding system:
FUNCTION LEFTLIMIT () BEGIN BIND D = 0, INX = SYLINX, S; L: IF INX EQ 1 THEN RETURN TIMEL+D/2; INX = INX-1; S=BLKBD[INX]; IF S[SSCR] NQ 0 THEN RETURN S[SEND]+D/2; D = DURATION(S[VNAM]); FOR BIND B = S[BCLU]; X LOOP B[I], I = S[BLEN] STEP -1 UNTIL I EQ 0 DO D = D+DURATION(GETNAME(X,I)); FOR BIND E = S[ECLU]; X LOOP E[I], I = S[ELEN] STEP -1 UNTIL I EQ 0 DO D = D +DURATION(GETNAME(X,I)); GO L; END;
Note that “=” is the assignment operator in the above and square brackets indicate subscript usage. This Lisp supported only 1-D arrays so multidimensional arrays were implemented by the user as arrays of arrays. Free variable references are to specials.