ALGOL 68C

ALGOL 68C

The ALGOL68C computer programming language compiler was developed for the CHAOS OS for the CAP capability computer at Cambridge University in 1971 by Stephen Bourne and Mike Guy as a dialect of ALGOL 68. Other early contributors were Andrew D. Birrell [cite web |url=http://birrell.org/andrew/papers/thesis.pdf |title=System Programming in a High Level Language |accessyear=2007 | accessmonthday=04-22 |author=Andrew D Birrell |authorlink=Andrew D. Birrell |date= |year=1977 |month=December |format=PDF |work=Dissertation submitted for the degree of Doctor ofPhilosophy |publisher=University of Cambridge |pages= |language= |archiveurl= |archivedate= |quote= ] and Ian Walker.

A very early predecessor of this compiler was used by Guy and Bourne to write the first life game programs on the PDP-7 with a [http://www.aceware.iinet.net.au/acms/ItemDetail.asp?lngItemId=175& DEC 340] display (see Scientific American article) "For long-lived populations such as this one Conway sometimes uses a "PDP-7" computer with a screen on which he can observe the changes. The program was written by M. J. T. Guy and S. R. Bourne. Without its help some discoveries about the game would have been difficult to make." Scientific American 223 (October 1970): 120-123.

Subsequent work was done on the compiler after Bourne left Cambridge University in 1975. Garbage collection was added and the code base is still running on an emulated OS/MVT using Hercules.

ALGOL68C "compiler" generated "ZCODE" output, that could then be either compiled into the local machine code by a "ZCODE" translator or run interpreted. "ZCODE" is a register based intermediate language.

Algol 68C and Unix

Stephen Bourne subsequently reused ALGOL 68's reverent if ~ then ~ else ~ fi, case ~ in ~ out ~ esac and for ~ while ~ do ~ od clauses in the common Unix Bourne shell, but with in's syntax changed, out removed, and od replaced with done (to avoid conflict with the od utility).

After Cambridge, Bourne spent nine years at Bell Labs with the Seventh Edition Unix team. As well as developing the Bourne shell, he ported ALGOL 68C to Unix on the DEC PDP-11-45 and included a special option in his Unix debugger "adb" to obtain a stack backtrace for programs written in ALGOL68C. Here is an extract from the Unix 7th edition [http://modman.unixdev.net/?sektion=1&page=adb&manpath=v7man adb] manual pages: NAME adb - debugger SYNOPSIS adb [-w] [ objfil [ corfil ] ] [...] COMMANDS [...] $modifier Miscellaneous commands. The available modifiers are: [...] a ALGOL 68 stack backtrace. If address is given then it is taken to be the address of the current frame (instead of r4). If count is given then only the first count frames are printed.

ALGOL 68C extensions to Algol 68

Below is a sampling of some notable extensions:
* Automatic "op":= for any operator, eg *:= and +:=
* UPTO, DOWNTO and UNTIL in loop-clauses;
* displacement operator (:=:=)
* ANDF, ORF and THEF "syntactic elements".
* separate compilation - ENVIRON clause and USING clause
* scopes not checked
* bounds in formal-declarers
* CODE ... EDOC clause - for embedding ZCODE

The ENVIRON and USING clauses.

These clauses are kind of the "inverse" of the #include found in the C programming language, or import found in Python. The purpose of the ENVIRON mechanism is to allow a program source to be broken into manageable sized pieces. Note that it is only necessary to parse the shared source file once, unlike a #include found in the C programming language where the include file needs to be parsed for each source file that includes it.

Example of ENVIRON clause

A file called "mylib.a68":

BEGIN INT dim = 3; # a constant # INT a number := 120; # a variable # ENVIRON EXAMPLE1; MODE MATRIX = [dim, dim] REAL; # a type definition # MATRIX m1; a number := ENVIRON EXAMPLE2; print((a number))END

Example of USING clause

A file called "usemylib.a68":

USING EXAMPLE2 FROM mylibBEGIN MATRIX m2; # example only # print((a number)); # declared in mylib.a68 # print((2 UPB m1)); # also declared in mylib.a68 # ENVIRON EXAMPLE3; # ENVIRONs can be nested # 666END

Restrictions to the language from the standard ALGOL 68

* no algol68 FLEX and variable length arrays.
* MODE STRING implemented without FLEX.
* The PAR parallel clause was not implemented.
* nonstandard transput.
* others...

A translator/compiler for ALGOL 68C was available for the PDP-10 and System/360 as well as a number of other computers.

References


* S.R. Bourne, A.D. Birrell and I. Walker, "Algol68C reference manual", Cambridge University Computer Laboratory, 1975

See also

* ALGOL 68
* C
* C++
* Bourne shell
* Bash

External links

* [http://hopl.murdoch.edu.au/showlanguage.prx?exp=667 Cambridge Algol 68: on the historical roster of computer languages] - includes 10+ publication references.
* [http://portal.acm.org/ft_gateway.cfm?id=807148&type=pdf A TRANSPORTATION OF ALGOL68C - PJ Gardner, University of Essex] - March 1977 (From 370 to DECsystem-10)


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • ALGOL 68 — Infobox programming language name = ALGOL 68 paradigm = multi paradigm: concurrent bull; imperative year = 1968, last revised 1973 designer = A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck and C.H.A. Koster, et al. developer = latest release… …   Wikipedia

  • Comparison of ALGOL 68 and C++ — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

  • Cross compiler — A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is run. Cross compiler tools are used to generate executables for embedded system or multiple platforms. It is used to… …   Wikipedia

  • Michael J. T. Guy — For the American musician, see Michael Guy. Michael Guy (born c.1942) is a British computer scientist and mathematician. He is known for early work on computer systems, such as the Phoenix system at the University of Cambridge,[1] and for… …   Wikipedia

  • NAG Numerical Libraries — is a software product sold by The Numerical Algorithms Group Ltd (a non profit company). The product is a software library of numerical analysis routines. It comprises a collection of 1500 mathematical and statistical algorithms. Areas covered… …   Wikipedia

  • List of computer scientists — Expand list|date=August 2008This is a list of well known computer scientists, people who do work in computer science, in particular researchers and authors.Some persons notable as programmers are included here because they work in research as… …   Wikipedia

  • Bourne shell — The Bourne shell, or sh, was the default Unix shell of Unix Version 7, and replaced the Thompson shell, whose executable file had the same name, sh. It was developed by Stephen Bourne, of AT T Bell Laboratories, and was released in 1977 in the… …   Wikipedia

  • Timeline of operating systems — This article presents a timeline of events in the history of computer operating systems from 1951 to the current day. For a narrative explaining the overall developments, see the History of operating systems. Contents 1 1950s 2 1960s 3 1970s …   Wikipedia

  • Liverpool Software Gazette — was a short lived computer magazine published by Bruce Everiss Microdigital company who were based in Liverpool, UK.HistoryThe magazine ran to only eight issues of which the last was a double. Issues were bi monthly from November 1979 to February …   Wikipedia

  • Stephen R. Bourne — Steve Bourne is a computer scientist, most famous as the author of the Bourne shell (sh), which is the foundation for the standard command line interfaces to Unix.Bourne has a Bachelor s degree in mathematics from King s College London. He has a… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”