Atlas Autocode(ID:1840/atl003)Algol-like high-level AutocodeAtlas 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
References: in The Computer Journal 4(3) October 1961 view details External link: Online copy in The Computer Journal 4(3) October 1961 view details in The Computer Journal 4(3) October 1961 view details in The Computer Journal 4(3) October 1961 view details in The Computer Journal 4(3) October 1961 view details External link: Online copy in The Computer Journal 9(4) 1967 view details 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 in The Computer Journal 9(4) 1967 view details in The Computer Journal 9(4) 1967 view details in [ACM] CACM 11(02) (February 1968) view details External link: Online copy in The Computer Journal 13(1) January 1970 view details in The Computer Journal 14(1) 1971 view details 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 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 in [ACM] CACM 21(01) (January 1978) view details Resources
|