Atlas Autocode(ID:1840/atl003)

Algol-like high-level Autocode 


Atlas Autocode (AA) was a programming language developed at Manchester University for the Atlas Computer. It was developed by Tony Brooker as an improvement on the ALGOL programming languages, removing some of Algol's poorer features such as passing parameters by name. It featured explicitly typed variables, subroutines and functions. The AA compiler generated range-checking for array accesses, and the language allowed an array to have dimensions that were determined at run-time (i.e. you could declare an array as %integer %array Thing (i:j), where i and j were calculated values). Atlas Autocode included a "%complex" data type which would support imaginary numbers (eg the square root of -1), a feature which was dropped when the language later morphed into the Edinburgh IMP programming language. (Imp was an extension of AA and was notable for being used to write the EMAS operating system.)

Keywords in AA were represented as being underlined, however for the sake of easy typing it was possible to strop keywords by placing a "%" sign in front of them. There were no reserved words in the language. For example "%if token=if %then %result = token" refers to a variable called "if".

Because of this keyword stropping, it was possible for AA to allow spaces in variable names, such as "%integer previous value". Spaces were not significant and were removed prior to parsing.

The syntax for expressions was very close to mathematical standards and allowed implicit multiplication such as "z = 3x + y" as an alternative to the more common "z = x * 3 + y".

Atlas Autocode's syntax was influenced by the output device which the author had available, a Flexowriter. Consequently it allowed symbols like "1\over 2" and superscripts for "i^2". The flexowriter supported overstriking and therefore AA did as well - up to three characters could be overstruck as a single symbol. For example the character set had no "^" symbol, so exponentiation was an overstrike of "|" and "*". (The underlining of keywords mentioned above could also be done using overstriking.)

When AA was ported to the KDF-9 computer, the character set was changed to ISO and that compiler has actually been recovered from an old paper tape by the Edinburgh Computer History Project and is available online, as is a high-quality scan of the original Atlas Autocode manual.

Atlas Autocode's second-greatest claim to fame (after being the progenitor of Imp and EMAS) was that it was the original "Compiler Compiler" of which "Yacc" was a later derivative. A variant of the AA compiler included run-time support for a top-down recursive descent parser. The style of parser used in the Compiler Compiler was in use continuously at Edinburgh from the 60's until almost the turn of the millennium.


Autocode for the Ferranti Atlas, which may have been the first commercial machine with hardware-paged virtual memory. The Atlas was based on the Manchester MUSE (for MIcroSEcond) computer, which was designed to put British large-scale back to international competitivity. Whereas other autocodes were basically symbolic assembly languges, Atlas Autocode was high-level and block-structured, resembling a cross between FORTRAN and ALGOL 60. It had call-by value, loops, declarations, complex numbers, pointers, heap and stack storage generators, dynamic arrays, extensible syntax, etc.

Not an Algol though - drew heavily on the other Autocodes and the experience they gave

Had first complier compiler extensions thanks to Tony Brooker


Structures:
Related languages
ALGOL 60 Revised => Atlas Autocode   Influence
Compiler-Compiler => Atlas Autocode   Incorporated features of
EMA => Atlas Autocode   Evolution of
Atlas Autocode => Atlas Commercial Language   Based on
Atlas Autocode => ATLAS LISP   Written using
Atlas Autocode => CLAM   Written using
Atlas Autocode => IMP   Augmentation of
Atlas Autocode => MU5 Autocode   Evolution of

References:
  • DJ Howarth, RB Payne and FH Sumner "The Manchester University Atlas operating system part II: users' description" pp226-229 view details Abstract: A system of operating Atlas is described from the point of view of the user. The simple additional statements required from the programmer are supplied to the computer rather than a human operator. External link: Online copy
          in The Computer Journal 4(3) October 1961 view details
  • T Kilburn, DJ Howarth, RB Payne and FH Sumner "The Manchester University Atlas operating system part I: internal organization" pp222-225 view details Abstract: The organization of input and output on the Atlas is described. This is controlled by the supervisor program, and uses varying amounts of core and drum store, supplemented where necessary by magnetic tapes, to obtain, when possible, the maximum overlap between input, computing and output. The system will be used on the Manchester University Atlas, but is suitable for any Ferranti Atlas Installation
    External link: Online copy
          in The Computer Journal 4(3) October 1961 view details
  • J.S. Rohl, "An Introduction to ATLAS Autocode" view details
          in The Computer Journal 4(3) October 1961 view details
  • G.P. Mitchell, A.J. Willmott, "Programming a computer in Atlas Autocode", Manchester University Press, Liverpool, 1965 view details
          in The Computer Journal 4(3) October 1961 view details
  • W.F. Lunnon and G. Riding, "The ATLAS Autocode Mini Manual", Manchester University Computer Science Department, July 1965 view details
          in The Computer Journal 4(3) October 1961 view details
  • Brooker, R.A., Morris, D. and Rohl, J. S. "Compiler Compiler facilities in Atlas Autocode" pp350-352 view details Abstract: This paper describes how the essential phrase structure facilities of the Compiler Compiler have been added to Atlas Autocode. Although the description is in terms of Atlas Autocode they could just as easily be inserted in other languages.
    External link: Online copy
          in The Computer Journal 9(4) 1967 view details
  • Brooker, RA "Atlas Austocode" Manchester University 1967 view details External link: Online copy Extract: Statements
    An ATLAS AUTOCODE PROGRAM consists of a series of STATEMENTS which describe in algebraic notation the calculation to be executed. The statements are of two kinds, declarative'statements giving; the nature of the quantities involved, and imperative statements which describe the actual operations to be performed on them, and the sequence in which they are to be carried out.  The statements are not immediately recognisable by the computer and must first be converted into an equivalent sequence of basic MACHINE INSTRUCTIONS.   This is done by a special translation program called a COMPILER which is held permanently available in the machine.  Not until the program has been 'compiled' can it be executed.

          in The Computer Journal 9(4) 1967 view details
  • McEwan, AT "An Atlas Autocode to ALGOL 60 translator" pp353-359 view details Abstract: An Atlas Autocode to ALGOL 60 program translator has been used to translate a large number of programs developed by the user of the Cripps Computing Centre. The translator was written in Atlas Autocode in a machine independent subset, and successfully translated itself. It developed through four main phases in a modular form using earlier working versions designed to achieve partial translation. External link: Online copy
          in The Computer Journal 9(4) 1967 view details
  • Clark, S. R. [Letters to the editor: Endorsing the Illinois post mortem dump] CACM 11(03) March 1968 view details
          in The Computer Journal 9(4) 1967 view details
  • Feldman, Jerome and Gries, David "Translator writing systems" p77-113 view details Abstract: A critical review of recent efforts to automate the writing of translators of programming languages is presented. The formal study of syntax and its application to translator writing are discussed in Section II. Various approaches to automating the postsyntactic (semantic) aspects of translator writing are discussed in Section III, and several related topics in Section IV.
          in [ACM] CACM 11(02) (February 1968) view details
  • Rohl, JS and Coringley, G "List processing facilities in Atlas Autocode" pp20-24 view details Abstract: Education is becoming a major part of the computer science scene. This paper describes the list processing facilities formally embedded in Atlas Autocode for use in teaching undergraduates.
    External link: Online copy
          in The Computer Journal 13(1) January 1970 view details
  • Evershed, DG and Rippon, GE "High level languages for low level users" pp. 87-90 view details Abstract: Despite the presence of 'high level' languages, a communication barrier still exists between the majority of people and computers. This paper suggests how some present computer languages may be improved, and attempts to justify the application of increased effort to this subject.


          in The Computer Journal 14(1) 1971 view details
  • Lavington, SH "The Manchester Mark I and Atlas: a Historical Perspective" pp4-12 view details Abstract: In 30 years of computer design at Manchester University two systems stand out: the Mark I (developed over the period 1946-49) and the Atlas (1956-62). This paper places each computer in its historical context and then describes the architecture and system software in present-day terminology. Several design concepts such as address-generation and store management have evolved in the progression from Mark I to Atlas. The wider impact of Manchester innovations in these and other areas is discussed, and the contemporary performance of the
    Mark I and Atlas is evaluated. Extract: Atlas Autocode
    The standard Atlas compilers were mostly implemented using the Compiler Compiler, a formal language for the transparent description of syntax and semantics. While compilers for all the common high-level languages such as Algol, Cobol, and Fortran were eventually written for Atlas, the Manchester users programmed extensiyely in Atlas Autocode to begin with. Atlas Autocode was a block-structured
    language specified at about the same time as Algol 60, but implemented sooner. Except for a more limited concept of compound statements and for clauses, Atlas Autocode was very similar to Algol 60. As an example the root mean square calculation given in Section 2.2 might be programmed in Atlas Autocode as follows:
    RMS = 0
    cycle i = 1, 1, 100
    RMS = RMS + X ( i ) * X(i); repeat
    print (sqrt (RMS/100), 6, 4)
          in [ACM] CACM 21(01) (January 1978) view details
  • Rohl, J S "The influence of programming languages on the design of MU5" view details External link: Online copy Abstract: Atlas was a wonderful machine, with over 1000 instructions, 128 registers in an architecture that allowed double modification, and an address space of 24 bits at a time when stores were measured in kilobytes. Unfortunately compiler writers were unable to use these facilities to the full - or anywhere near it. Almost all of the bits of compiled code were zeroes! For MU5, for the first - and probably the only - time programmers were given the task of designing the order so that they could fully utilise it. In this paper I describe why compiler writers were unable to use Atlas at all well, and how we designed the MU5 order code to enable us to compile code more effectively.

    Extract:
    As Tony Brooker has pointed out, when Atlas became operational, a wide variety of programming languages was in use throughout the world. He mentions both general-purpose, scientific and commercial languages such as Fortran, Algol and Cobol, and special-purpose languages, such as APL (for processing arrays) and Simula (for simulation). We add here others such as Lisp, a list processing language, and Snobol, a string-processing language.

    On Atlas we dealt with the general-purpose languages fairly well. We created Atlas Autocode, the last in the line of workaday autocodes. This was an Algol-like language, which melded the newer language features that Algol was pioneering, with the one-pass, line-by-line structure of the earlier autocodes.

    We didn't attack the special-purpose ones specifically. We did though extend Atlas Autocode to list processing facilities and even compiler-compiler facilities. A very versatile language it became!

    This was a radically different situation from those that pertained with the earlier machines. In those earlier times the compiler writer was a language designer; and the languages designed reflected very closely the hardware for which they were designed. In Manchester these languages were called "autocodes", a term that later came to refer to lower-level languages. This was quite unfair, of course: the autocodes were the first step in the development of programming languages.

    The newer languages, on the other hand, were designed quite independently of any computing machine. The Algol 60 Report, a classic example of a formal language definition - and a model still today - does not mention the word "computer". This was clearly the right approach, what we today call the "top-down approach". The language designer had in mind the problems that the users needed to solve, and the ways in which they thought about the problems: the language design reflected all these aspects. In later times E. W. Dijkstra was to phrase this idea as - since I cannot remember where he said it my quotation is approximate - "we are not here to program computers: computers are here to run our programs."

    How this was to be achieved was not of major concern to language designers. They assumed that it was a fairly mechanical process, which could be left to the professional compiler writer. Sometimes they were wrong, and languages were designed that were impossible to compile. In Algol the dynamic own array could not be implemented. (It's not clear what it meant either - itself a pointer to the compiling problem that it presented.)

    The world of the compiler writer had become quite separate from that of the language designer, though, of course, there were areas, generally close to the machine itself where the two worlds merged. A simple picture says it all.




    Extract: Facilities of Atlas that we could not utilise
    Facilities of Atlas that we could not utilise
    It is said that the best car you ever have is your first. I believe it is true of computers, too; and so I still see Atlas as a wonderful machine. Yet there were many of its facilities of its instruction set that we could not use. The instruction occupied 48 bits partitioned as follows:



    The rich instruction set
    Atlas had 1024 instructions - machine codes and extracodes - of a wondrous variety. Yet the compilers could make use of only a few, perhaps 30 or 40. It simply wasn't possible for a compiler writer to use floating point instructions that had special rounding, for example, or extracodes corresponding to mathematical functions that weren't available in the language being compiled.

    The very large address field
    Atlas had a 24-bit address, which, given the very high costs of core-store, was generous in the extreme. We used the full address space very effectively, by treating it as a virtual address - the one-level store concept did all the store management for us. But the code itself had very short addresses, typically no more than 4 or 5 bits. The full address was spanned by using modification. That is the registers tended to hold large addresses, rather than the instructions.

    The possibilities of double modification
    The instruction set dealt with both floating point numbers in the accumulator, and integer arithmetic in the 127 registers that we called B-lines. For the integer arithmetic BA specified the register in which the operation took place, and BM could modify the address part. For floating point arithmetic an address could be modified by 2 registers. For stack-based languages it was impossible to use double modification. Static variables, such as scalars, were at a known position from the start of a stack frame, whose origin was held in a register; dynamic variables, such as arrays, had their (full) addresses held in some static variable. For both types of static variable, an address of only a few bits was required.

    The large number of registers
    The Atlas compilers, constructed with the aid of the Compiler Compiler (CC), made good use of the registers. The name Compiler Compiler is a misnomer: it didn't compile compilers; it expanded to become a compiler for each of the languages it was used to develop. Compilers process characters, not numbers, so they have the potential to use the registers. Since the CC made good use of the registers, so too did the resulting compilers. This was done by hand: during development, well before the machine became available, the routines were written with symbolic registers; towards the end a large tree structure describing the interdependencies of the routines was drawn up, and an allocation of registers was made.

    The compiled programs, on the other hand, could not make much use of the registers. All floating point operations used the (single) accumulator, and the registers were used as stack pointers, which marked the start of the active stack frames. For most programs two or three were adequate. We set a limit of 10, though this was never ever reached. Because no facilities were provided for operating between floating point numbers and integers, we could not hold the integers in registers: we had to store them as floating point numbers. They were in a special non-standard form, because we needed to be able to put them into a register for implementing array subscripting. High-level languages do not generally distinguish between integers that are to be used for subscripting and loop control and integers that are the data type of the calculation.

          in [ACM] CACM 21(01) (January 1978) view details
  • Ponton, Jack "The Autocodes: Sirius to IMP, a User's Perspective" view details External link: Online copy
          in [ACM] CACM 21(01) (January 1978) view details
    Resources