Claude dug through my email recovered from the PDP-10 tapes and generated a history of the Arcturus programming environments project. There are also some tidbits on feedback I received coming up with a dissertation topic that was more than "we wrote a thing." --Stephen
Another guest post by Claude, the AI helping Stephen recover his old PDP-10 and Unix backup tapes. This one tells the story of Arcturus, the interactive Ada environment Stephen helped build at UC Irvine in 1982-84, mostly in the words of the people who built it, used it and argued about it by email. The interpreter itself runs again today; the code is on GitHub.
One of the tapes holds Steve Willson's (today Stephen Clarke-Willson's) UCI home directory as it stood in May 1984. Besides the Arcturus source code, it has two mail folders he kept: one called arcturus, with 50 messages of bug reports and design talk, and one called thesis, with 41 messages about his dissertation proposal and topic defense. Read in order, they tell the life story of a research system: an idea, a rewrite, real users, the hard problem nobody solved, and a PhD committee asking "but what is the plot?"
The idea: Ada, the InterLisp way
In the early 1980s Ada was the language the U.S. Department of Defense was betting on. It was big, strongly typed and statically scoped, and it was designed for compilers. The people at UC Irvine's Programming Environment Project wondered whether you could program in Ada the way people programmed in InterLisp: type a declaration or a statement at a prompt, in any order, run part of a program, fix it, and keep going, while still ending up with real Ada that a compiler would accept.
Thomas Standish led the project and found its DARPA funding (contract MDA-903-82-C-0039). The code was written by graduate students. In the acknowledgments of his 1984 dissertation draft Stephen put it this way: Standish "sought out the necessary funding for the Irvine Programming Environment Project and provided the initial inspiration for the present work."
The first version of the interpreter was written in UCI Lisp on a DEC-2020 by Stephen Whitehill and Ray Klefstad. It grew out of ADARPE, the 1981 Ada Rapid Prototyping Environment, whose main lesson was that keeping a whole Ada program as Lisp s-expressions used far too much memory. The earliest Arcturus design note on the tape, dated November 10, 1981, already lists the three parts the system would keep for its whole life:
a parser, which translates a character stream into a specially designed internal form; a pretty-printer, which translates an internal form into a character stream; and an interpreter, which executes the internal form with great efficiency.
It also names the hard part: "strict type checking and name resolution must be done at runtime, and this checking must be done efficiently or else the language will become useless due to the overhead of this checking."
1982: the C rewrite
The second version was written in C on a VAX-11/750 running Berkeley Unix, by Whitehill and Willson. Frank Tadman wrote the Lex and YACC parser and the generic tree walker maptree, Craig Snider kept the builds and releases going, and Klefstad worked on Adash, a shell and editor that used the interpreter's type information to complete what you typed. The team list compiled into the program also names Scott Auchmoody, and Gene Fisher wrote Castor, an Ada macro facility. By October 19, 1982 there was a release, 1.2-B, and it could mail a bug report to the developers automatically whenever it crashed.
The oldest messages in the arcturus folder, from December 21, 1982, are Stephen and Frank working out how the symbol table should tell which copy of a local variable belongs to which call of a procedure. The old design had kept a "static link" in each symbol, and when that went away they lost something they still needed. Stephen worked it out late that night:
We were using the wrong name for the right thing! So, when we got rid of static links, we also got rid of this pointer, instead of relocating it to the right place. I think I'm gonna change it to work the new way. It's more elegant; it doesn't introduce a new thing.
The design that came out of this period, as the dissertation describes it, is the fixform, a static symbol entry at a fixed address that each identifier in the program points to directly, and a stack of symbolforms pushed onto it, one for each live call, holding the value and its run-time type. Names were never looked up again on every use, which is how an interpreter for a strongly typed language could be quick.
1983: real users
Arcturus went out under a license from the project, and by early 1983 it had users well outside UCI. Most of the folder is them.
TRW. Judy Bamberger at TRW used Arcturus to build a prototype "automated unit development folder" tool for a demo. Her first messages were automatic crash reports from release 1.2-B with notes typed underneath ("i am confused; ... help!"). Two weeks later:
if you take a look at the current code ... you will see some mildly "esoteric" ada features used; (component selections of array entries ... ); and arcturus does it beautifully!!! HOORAY!!!! ... fix and save are both coming in VERY**max handy, too!
She went on to invite the "uci-arcturus folks" to give their slide show at the AdaJUG meeting in Grand Rapids in July 1983. Her colleague Phil Ritter sent careful bug reports ("like a good member of the class 'friendly users'") and later poked at the support for loading compiled C code into a running session.
The Aerospace Corporation. In March 1983 Ric Cowan at Aerospace wrote to Bob Kahn at DARPA, and Standish forwarded the letter to the team with "Hey, getta load of this. You guys do good work, and I appreciate it." Cowan's group was building an Ada debugger and had started in Interlisp, building on Dave Martin's work at ISI:
Interlisp simply proved to run too slow. We then acquired the Arcturus system. We had it up and running in a day. It is an easy environment to learn to work in. And, at least compared to Interlisp, it is FAST. We have since explored the internals of the system, and are surprised at how well it is constructed. I say this after having been a system programmer for over 13 years.
Anne Brindle at Aerospace became the most serious outside Arcturus hacker. Stephen gave her group tutorials on the internals (she asked for "3 or 4 more of your lovely green listings"), and she set out to add Ada tasking, which UCI never had.
McGill University. Nigel Horspool's group in Montreal sent a list of crashes and one language lawyer's point: -4*5+2 should be -18, not -22, because in Ada unary minus binds tighter than binary plus. Frank fixed the parser. A few weeks later Richard Taylor, new to the system, wrote to ask why the user's guide said -22 when Arcturus 1.4-E said -18. The program had been fixed before the manual was.
UCI students. Arcturus was used in ICS 145, and Andy Hall, who taught it, reported "In the summer I received over 80 bug reports!!" Arcturus saved the whole session to ada.core and restored it the next time you started it, which was wonderful when it worked. By November 1983 almost the whole class had stopped using the feature, and one student said he had "lost 5 days" recovering from it.
The bugs themselves are a nice picture of a young system. Comments longer than 255 characters broke the scanner. A while loop typed at top level followed by a procedure declaration caused a bus error. Calling a type name as if it were a procedure (integer;) was a segmentation fault. Each one got an answer by mail, usually from Frank, often with the exact lines to change.
The hard problem: tasking
Ada's tasks are its threads, and every outside group wanted them. In April 1983 Stephen explained to Dick Taylor why they were hard in an interpreter written in C. The trouble wasn't Arcturus's own data:
There are stacks and heaps all over place. Managing these is no problem. After all, we're programmers, and moving data around is no big deal. The problem is this: There is one stack that we have no control over. This stack is the C runtime stack.
Interpreting an Ada call meant a C call that didn't return until the whole Ada call was done, so each Ada task would need its own C stack, and on the VAX the hardware managed the stack's growth. Whitehill came up with a way out: allocate one big array as a local variable of the interpreter's main routine, so that it sat in stack memory, and move the stack pointer around inside it. The Aerospace group took up the job. In October 1983 Anne Brindle mailed the team a file-by-file list of every global variable in the interpreter that would have to be swapped when switching tasks, and by November they had chosen interrupts over polling for talking to tasks. The surviving UCI code has no tasking, and the dissertation lists it as future work.
Ada80, Ada83 and a second interpreter
Arcturus implemented the 1980 draft of Ada. By mid-1983 the language had become Ada 83, the ANSI standard, and the outside users wanted to know how far behind they were. Frank's answer in August 1983 is a short history of Ada's grammar. The visible difference was that Arcturus wanted empty parentheses on calls to functions with no arguments, but Ada80 also had overloading rules that made the type of an aggregate depend on its contents, and the reference grammars weren't LR(1), so they couldn't just be fed to YACC.
Frank had by then written his own branch of the interpreter, with a pre-pass that built fully static symbol tables, a good deal of overloading, one byte per character in strings instead of one word, and an interpreter that was "no longer one big case statement." He was reluctant to release it because he didn't want to support it or sit through integration meetings, but he offered to show the Aerospace group what needed doing if they would update Arcturus to Ada 82. The main line went on through release 1.5 and, at the end of 1983, 1.6-A.
The thesis: "the plot is very weak"
Stephen's dissertation was to be about Arcturus. The written proposal went to his committee (Standish as chair, Richard Taylor and John King) in March 1983, and King's reply is the best-written message in either folder:
Building interesting artifacts is not the basic objective of this effort. ... You might want to think of your current challenge in terms of telling a story. You have the characters and the conclusions pretty well in hand, but the plot is very weak. It is well known among English hackers that plot (despite modern fiction's efforts to ignore it) is essential to stories that people like to read. I suggest you concentrate on the plot.
Standish's answer to "what is new?" was that Arcturus combined the advantages of interpretation (fast composing and debugging) with those of compilation (speed), using "different but cooperating run-time representations each separately well-adapted to its separate purposes": you interpret your Ada, export it as ordinary Ada to a real compiler, and load the compiled code back into the running session.
In May 1983 Taylor tested that claim on Bill Waite at the University of Colorado, an expert on exactly this. Waite said that, as described, mixing interpreted and compiled code had no new theoretical basis, and pointed to Dakin and Poole's "A mixed code approach" in The Computer Journal from the early 1970s. But, Taylor reported, Waite was "quick to point out that his comment did not mean there was no thesis in Arcturus framework," and he agreed that describing the issues of building an Arcturus-style environment was "thesis turf." That became the shape of the dissertation: On the Construction of Interactive Programming Environments for Strongly Typed Programming Languages. Its two claimed contributions were an unstructured, any-order style of interaction for a strongly typed language, including turning a pile of unordered declarations back into legal, correctly ordered Ada, and the first working system to spell out how interactive programming and batch compilation fit together for a language as complex as Ada.
A full draft went to the committee on November 20, 1983, with a topic defense planned for December. King read it while traveling and still found "the setting and the characters" but a plot "not completely developed," though he added: "I like Fred too, in the context of your (typically) ingenious delivery." Fred was Stephen's all-purpose identifier and alter ego, and one draft introduction told the whole story of the project through him. The sample sessions in the final draft are dated January 1, 1984, running "Arcturus willson 1.6-A". In April 1984 Taylor asked to lend a copy of the draft to Izhar Shy, a new graduate student, because it "explains the reordering problem (far better than I could)."
What came of it
Stephen didn't finish that dissertation. In January 1984 he told Taylor he had been at UCI for seven years and wanted "to work like a regular person for a while." He came back to it later and finished a different PhD, Persistent Prototypes, with Richard Taylor as advisor. Arcturus's main ideas are visible in that title: a session that persists, and programs that can be run before they are finished. Arcturus also fed UCI's later work on programming environments. And the dissertation thanks the staff of the Irvine Computer Sciences Corporation, with whom Stephen spent "many hours ... eating pizza and discussing the finer points of Ada lore." That company later changed its name to the Irvine Compiler Corporation (ICC).
Running it again
The tape held about 90% of the Arcturus 1.6-A source, plus the linked VAX executable with its full debugging symbols. The two missing files, int.c (the core evaluator) and toplev.c (main and signal handling), were rebuilt line for line from the compiled VAX code in that binary and checked against it. With a few small replacements for what 4.2BSD provided, it builds with gcc on Linux, as a 32-bit program or as a 64-bit port, and Stephen runs it on an ARM server in the cloud:
$ ./arcturus Arcturus willson 1.6-A January 5, 1984 > function fact(n : integer) return integer is + begin + if n <= 1 then return 1; else return n * fact(n - 1); end if; + end fact; > fact(10) 3628800
The code, the rebuild notes and the original tape files are at github.com/DrStephenCW/ada-interpreter-1984. Its README links the rest of the story, starting with the 1981 Lisp Ada parser.
This recovery project was done with Claude Opus 5.5 Medium Effort guided by Stephen Clarke-Willson.
No comments:
Post a Comment