Alice Pascal
Brad Templeton's syntax-directed Pascal environment, built for Ontario's ICON school computer and sold as ALICE: The Personal Pascal for the IBM PC and Atari ST, in which beginners filled in templates and could not type a syntax error.
Created by Brad Templeton (Looking Glass Software Limited, Waterloo, Ontario)
Alice Pascal, sold as ALICE: The Personal Pascal, was one of the first commercial syntax-directed programming environments for personal computers. Brad Templeton’s Looking Glass Software in Waterloo, Ontario, wrote it first for the province’s high schools. It was then sold for the IBM PC and the Atari ST. In ALICE you did not type a Pascal program as text. You built it as a tree, filling in on-screen templates, so a syntax error was all but impossible. An interpreter, a debugger that followed execution through the source, and hundreds of context-sensitive help screens were built into the same program. At a time when many beginners met Pascal as an edit–compile–link cycle ending in a list of compiler errors, ALICE tried to make Pascal as immediate as BASIC.
History and Origins
An Ontario project
Templeton had written software for Commodore machines and had worked on the Commodore PET port of VisiCalc. His biography says he owned and operated Looking Glass Software Limited from 1983 to 1991; his home page gives 1983 to 1996. By his account, ALICE was one of the company’s first projects, and “our first sale was a contract to develop it for the Ministry of Education” in Ontario.
The context was the Ministry’s push for standard classroom computers. That push produced the ICON, an Intel 80186 machine with a trackball, networked to a file server and running the QNX operating system. It began reaching Ontario schools in 1984. A design document in the ALICE source tree says that complete programming environments were too big for the sub-32K machines then common in schools, and that “with the advent of the ICON” such a system became practical. It describes ALICE as “the first effort to seriously design a system of this type for high-school education.” A later history note in the same tree calls the ICON and the IBM PC the main targets, “often with only 256 kilobytes of ram”. Ontario schools, it says, “were the first customer for ALICE.”
Dating the language
The catalog year of 1983 fits the founding of Looking Glass, not the language. The evidence for ALICE itself points to 1985:
- The program’s title screen reads “Copyright (c) 1985,2000 by Brad Templeton”.
- Templeton’s page says the small DOS version was “meant for the 256kb DOS computers common in 1985”, and his Wikipedia bibliography dates ALICE to 1985.
- PC Week reported in 1986 that Software Channels was “formed in February 1985” and that ALICE was its first product.
- The earliest dated retail evidence is from January 1986: a full-page ad in Computer Language and a news item in InfoWorld on 27 January 1986.
The history note in the source tree says ALICE “was begun in 1994”. That is clearly a typo for the mid-1980s, since the same note describes the program as being used “15 years later” in an era of Windows NT. The ICON version may have preceded the PC release, but no dated record of its delivery has been found, so this page uses 1985.
Software Channels and Graham Software
The PC version was published by Software Channels Inc., a division of Graham Software Corporation, which also held the ALICE trademark in 1986 ads. Trade press placed Software Channels in Kingwood, Texas, with offices in Toronto. The package cost $95. By mid-1986 its ads promoted it as a companion to Borland’s Turbo Pascal: design and debug in ALICE, then “compile and run them with Turbo”. An internal Looking Glass specification called for an ALICE compiler to be delivered in beta by 1 September 1986. There is no evidence that it ever shipped.
The publisher did not last. In the Ontario legislature on 11 June 1986, Premier David Peterson said Graham Software had first approached the provincial IDEA Corporation in the summer of 1985 and received funding on 18 September 1985. On 14 October 1986 the Industry minister reported that IDEA’s investment had risen to $5 million by March 1986, that “the company is currently winding up its affairs,” and that little or no recovery was expected. Templeton later wrote that Graham Software, “at least according to allegations made in parliament, turned out to be something of a sham, and it closed its doors 7 months after launching ALICE.” An Ontario software evaluation catalogue from the late 1980s or early 1990s lists the MS-DOS version under a different supplier, Softsync Inc.
The Atari ST version
The source-tree history says that “in 1986 ALICE was ported to the Atari ST” as “a full GUI port of the program, using the GEM operating environment”. Looking Glass sold this version itself for $79.95, with a $19.95 ALICE Educator textbook. Ads ran in START magazine’s Winter 1986 issue, and the ST version was reviewed through 1987. Catalogued releases are 1.43 and 1.5, both dated 1987. Templeton described the ST version as “much more sophisticated, with a GUI, and tools to write graphics and GUI programs.” Its separate source code survives only on old Atari media.
Design Philosophy
The design document names its lineage openly: “The ideas behind ALICE are not original.” It credits Tim Teitelbaum’s Cornell Program Synthesizer as “the first such system to gain recognition”. It then divides language-based editors into two schools:
- Template editors (the Cornell approach) build programs from syntactic building blocks and never let the program become syntactically invalid.
- Checking editors look like ordinary text editors but parse incrementally and flag errors. The document notes that Mark Horton, then of Looking Glass Software, had worked in this area.
Looking Glass chose templates. It judged that incremental parsing was too slow on the hardware of the day, and that templates were “a much better teaching tool”. Placeholders show a novice what each construct needs, so a student can write Pascal before understanding everything about it.
The environment extended that choice into a single integrated tool. Because the editor already held a parse tree and symbol table, it could catch undeclared variables as they were typed, and it could interpret the program directly without a separate parse. It also had everything a debugger needs. The user guide argues that this lets novices concentrate “on what is truly important: program logic” instead of “trivialities like unbalanced parentheses.”
Templeton has been candid about the trade-off. Years later he wrote that syntax-directed editors “are somewhat controversial”. If he built one again, he said, he would make it behave “more like a typical text editor, expanding productions when needed, but allowing random editing with re-parsing on the fly.”
Key Features
Template editing
Typing a keyword on a placeholder expands the whole construct. Templeton’s own example is typing for on a Statement placeholder, which immediately produces:
for variable := start to finish do begin
Statement
end;
The user tabs between the underlined placeholders and fills them in. Fixed words such as do and begin cannot be edited. Reviewers noted several related features:
- Automatic parameter templates. Calling a procedure lays out a template for its arguments, based on the procedure’s declaration.
- Undeclared names. Using an undeclared variable produces a warning, and typing
varjumps to the declaration section to add it. - Symbol completion. A partial name is completed, or a menu of the matching names is shown.
- Whole-construct selection. Selecting part of a construct selects the whole of it, so deleting a procedure’s name deletes the procedure.
- Hidden blocks. Blocks of code can be collapsed behind a comment to keep listings readable.
- Automatic indentation.
Help: “What can I type here?”
The help system was a selling point. The earliest ads claimed “over 500 screens of on-line HELP”, and Templeton later cited more than 700. Help was context-sensitive. With the cursor on a variable inside a multiplication inside a writeln inside a for loop, the menu offered help on each of those enclosing constructs. The “What can I type here?” menu listed every input that was legal at the cursor, including the variables and subroutines in scope, and a choice from the menu was inserted into the program. The user guide notes that users “can do most of their programming by menu if they want to.”
Interpreter and debugger
Programs ran immediately inside the editor, with no separate compile step. The debugger could:
- Single-step one statement at a time, or super-step over a whole block such as a loop.
- Set breakpoints.
- Run in “cursor-following” mode, where the cursor tracks the executing statement in the source.
- Run immediate blocks: statements kept in the program but skipped during normal runs, which can be executed on demand while the program is paused. A paused program could run
writeln(X)or reassign a variable this way.
Language dialect
ALICE implemented what Antic’s reviewer described as essentially ISO standard Pascal. It added two sets of extensions:
| Extension family | Examples (from the language manual) |
|---|---|
| Watcom Pascal (University of Waterloo) | StrConcat, direct-access file routines. Random behaves as in ALICE 1.2 and Watcom Pascal when Turbo features are disabled |
| Borland Turbo Pascal | Strings with Copy, Insert, Pos, and Turbo-style Random. Most Turbo extensions were added to the large-model PC version |
| Atari ST GEM (ST version only) | Menus, alert boxes, windows with sliders, GETEVENT / EVENTPARAMETER, some VDI graphics, and a VDI library on disk |
Companion tools rounded out the system. APIN parsed plain-text Pascal files into ALICE’s internal .ap tree format, so existing programs could be imported. APRUN was a standalone interpreter for running saved ALICE programs outside the editor.
Implementations and Platforms
The source-tree history lists these versions:
| Platform | Notes |
|---|---|
| CEMCorp/Burroughs ICON (QNX) | First customer platform; ALICE Basic was also written for it |
| IBM PC (MS-DOS) | Two builds: a small model limited to 128K of ALICE memory (for 256K PCs) and a “large” model able to use up to 640K. The last PC release was 1.3.1 (large) |
| Atari ST (GEM) | Full GUI port, 1986–1987 |
| QNX on a PC | Built but “never marketed” |
| Siemens 8086 MS-DOS (non-PC-DOS) machine | Port for a now-defunct system |
| Unix (Onyx, System III variant) | Development host only; “never provided to users” |
| Linux | Templeton’s c. 2000 cleanup of the released source |
For the DOS version, the help files were Huffman-compressed into a single file so that ALICE fit on two 360K floppies.
Reception
Reviews were mostly warm, especially for beginners. InfoWorld quoted a user who could not “imagine trying to pick up Pascal again without Alice.” Antic’s 1987 review called it “ideally suited to beginners”, though it faulted the ST version for having no runtime or compiler, which made it unusable for distributing commercial programs. ST-Computer greeted it as, to the reviewer’s knowledge, the first Pascal interpreter for the ST.
Not everyone agreed about beginners. A November 1986 review in Educational Technology reportedly concluded that “ALICE is an advanced PASCAL environment. It is not for the novice.” The Ontario catalogue that later listed the Softsync edition rejected it with the comment that “because syntax errors are trapped as they occur, programming in this environment is slow”. That is the same objection experienced programmers had long raised against template editors.
Evolution and Legacy
After the commercial period, ALICE sat unused until the late 1990s. By May 1999, Templeton’s website offered the DOS version as freeware, with the manuals converted to HTML. He asked schools to use it with donated old PCs and warned that “absolutely no support will be available.” By February 2000 he had also posted the C source, “ready to compile on linux”, under the Perl Artistic Licence. He cautioned that it was “in pretty rough shape” and “suffering from bit rot”. The Atari ST binaries and disk images followed by late 2001. A Russian translation and a Belorussian translation of the documentation were later linked from the page.
In 2013 the released source was mirrored on GitHub. One fork removed QNX and Atari conditional code and got ALICE to compile with clang.
Templeton has claimed that several of ALICE’s features “were later repeated in products like Microsoft Visual Basic”. In the source history he adds that he had “been told” Visual Basic’s designers borrowed from it. There is no independent confirmation, so this page does not list any language as influenced by ALICE.
Current Relevance
ALICE is a historical artifact, not a living tool. Templeton’s page still offers the DOS and Atari ST versions and the source archive. The DOS version runs under DOS emulation, and the ST version comes as disk images for emulators. There are no active releases or community, and the Linux build remains an unfinished cleanup.
The ideas behind it, however, are thriving. Block-based beginner environments, IDE code completion and live templates, and research on structure editors that are always syntactically valid all revisit the questions ALICE’s designers faced about editing trees versus editing text.
Why It Matters
ALICE shows how far the university research on syntax-directed editing had reached into commercial software by the mid-1980s. It combined a template editor, context-sensitive help, an interpreter and a source-level debugger into one package that ran in 256K of memory. It was built for a province-wide school computing program and then sold to PC and Atari ST owners, years before integrated environments were routine.
Its story also captures the period’s commercial risks. The publisher collapsed within about a year amid questions in the Ontario legislature, while Borland’s inexpensive Turbo Pascal won what Templeton called “the pascal wars for serious users”. The long argument over whether an editor should stop you from making mistakes, or simply point them out, is one ALICE took a clear side on.
Timeline
Notable Uses & Legacy
Ontario Ministry of Education / ICON computers
ALICE was written first for Ontario high schools. The Ministry was its first customer, and it ran on the QNX-based ICON classroom computer, where the trackball emulated arrow keys for moving between template placeholders. A companion ALICE Basic was written for the ICON only
Pascal teaching on the IBM PC
Sold by Software Channels as a $95 package for PCs with 256K of memory. It was pitched as a way to learn Pascal and to prototype and debug programs that were then compiled with Borland's Turbo Pascal
GEM programming on the Atari ST
The ST version let hobbyists write GEM programs from an interpreter. ALICE itself handled window moving, resizing and redrawing, and it offered calls for menus, alert boxes and events
Freeware classroom use
Since 1999 Templeton has offered the DOS binaries and HTML manuals free for schools to teach programming on donated older PCs, with the stated condition that no support is provided