HOME

TheInfoList



OR:

ALGOL 68C is an imperative
computer programming Computer programming is the process of performing a particular computation (or more generally, accomplishing a specific computing result), usually by designing and building an executable computer program. Programming involves tasks such as ana ...
language Language is a structured system of communication. The structure of a language is its grammar and the free components are its vocabulary. Languages are the primary means by which humans communicate, and may be conveyed through a variety of met ...
, a dialect of
ALGOL 68 ALGOL 68 (short for ''Algorithmic Language 1968'') is an imperative programming language that was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and more rigorously d ...
, that was developed by Stephen R. Bourne and
Michael Guy Michael J. T. Guy (born 1 April 1943) 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, and for contributions to number theory, comput ...
to program the
Cambridge Algebra System Cambridge Algebra System (CAMAL) is a computer algebra system written in Cambridge University by David Barton, Steve Bourne, and John Fitch. It was initially used for computations in celestial mechanics and general relativity. The foundation code ...
(CAMAL). The initial
compiler In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
was written in the Princeton Syntax Compiler (PSYCO, by Edgar T. Irons) that was implemented by J. H. Mathewman at Cambridge. ALGOL 68C was later used for the CHAOS OS for the
capability-based security Capability-based security is a concept in the design of secure computing systems, one of the existing security models. A capability (known in some systems as a key) is a communicable, unforgeable token of authority. It refers to a value that refer ...
CAP computer The Cambridge CAP computer was the first successful experimental computer that demonstrated the use of security capabilities, both in hardware and software.Levy, p.96 It was developed at the University of Cambridge Computer Laboratory in the 19 ...
at
University of Cambridge , mottoeng = Literal: From here, light and sacred draughts. Non literal: From this place, we gain enlightenment and precious knowledge. , established = , other_name = The Chancellor, Masters and Schola ...
in 1971. Other early contributors were Andrew D. Birrell and Ian Walker. Subsequent work was done on the compiler after Bourne left Cambridge University in 1975.
Garbage collection Waste collection is a part of the process of waste management. It is the transfer of solid waste from the point of use and disposal to the point of treatment or landfill. Waste collection also includes the curbside collection of recyclabl ...
was added, and the code base is still running on an emulated OS/MVT using
Hercules Hercules (, ) is the Roman equivalent of the Greek divine hero Heracles, son of Jupiter and the mortal Alcmena. In classical mythology, Hercules is famous for his strength and for his numerous far-ranging adventures. The Romans adapted the Gr ...
. The ALGOL 68C compiler generated output in ''ZCODE'', a register-based intermediate language, which could then be either interpreted or compiled to a native executable. This ability to interpret or compile ZCODE encouraged the porting of ALGOL 68C to many different computing platforms. Aside from the
CAP computer The Cambridge CAP computer was the first successful experimental computer that demonstrated the use of security capabilities, both in hardware and software.Levy, p.96 It was developed at the University of Cambridge Computer Laboratory in the 19 ...
, the compiler was ported to systems including
Conversational Monitor System The Conversational Monitor System (CMS – originally: "Cambridge Monitor System") is a simple interactive computing, interactive single-user operating system. CMS was originally developed as part of IBM's CP/CMS operating system, which went ...
(CMS),
TOPS-10 TOPS-10 System (''Timesharing / Total Operating System-10'') is a discontinued operating system from Digital Equipment Corporation (DEC) for the PDP-10 (or DECsystem-10) mainframe computer family. Launched in 1967, TOPS-10 evolved from the earlie ...
, and
Zilog Z80 The Z80 is an 8-bit microprocessor introduced by Zilog as the startup company's first product. The Z80 was conceived by Federico Faggin in late 1974 and developed by him and his 11 employees starting in early 1975. The first working samples wer ...
.


Popular culture

A very early predecessor of this compiler was used by Guy and Bourne to write the first Game of Life programs on the
PDP-7 The PDP-7 was a minicomputer produced by Digital Equipment Corporation as part of the PDP series. Introduced in 1964, shipped since 1965, it was the first to use their Flip-Chip technology. With a cost of , it was cheap but powerful by the s ...
with a DEC 340 display. Various ''
Liverpool Software Gazette ''Liverpool Software Gazette'' was a short-lived computer magazine published by Microdigital Ltd, a company who were based in Liverpool, England and run by Bruce Everiss. History The magazine was in print for only eight issues of which the last w ...
'' issues detail the Z80 implementation. The compiler required about 120 KB of memory to run; hence the Z80's 64 KB memory is actually too small to run the compiler. So ALGOL 68C programs for the Z80 had to be cross-compiled from the larger
CAP computer The Cambridge CAP computer was the first successful experimental computer that demonstrated the use of security capabilities, both in hardware and software.Levy, p.96 It was developed at the University of Cambridge Computer Laboratory in the 19 ...
, or an
IBM System/370 The IBM System/370 (S/370) is a model range of IBM mainframe computers announced on June 30, 1970, as the successors to the System/360 family. The series mostly maintains backward compatibility with the S/360, allowing an easy migration path ...
mainframe computer A mainframe computer, informally called a mainframe or big iron, is a computer used primarily by large organizations for critical applications like bulk data processing for tasks such as censuses, industry and consumer statistics, enterpris ...
.


Algol 68C and Unix

Stephen Bourne subsequently reused
ALGOL 68 ALGOL 68 (short for ''Algorithmic Language 1968'') is an imperative programming language that was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and more rigorously d ...
's if ~ then ~ else ~ fi, case ~ in ~ out ~ esac and for ~ while ~ do ~ od clauses in the common
Unix Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, and ot ...
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 Nokia Bell Labs, originally named Bell Telephone Laboratories (1925–1984), then AT&T Bell Laboratories (1984–1996) and Bell Labs Innovations (1996–2007), is an American industrial research and scientific development company owned by mult ...
with the
Version 7 Unix Seventh Edition Unix, also called Version 7 Unix, Version 7 or just V7, was an important early release of the Unix operating system. V7, released in 1979, was the last Bell Laboratories release to see widespread distribution before the commercial ...
(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 A debugger or debugging tool is a computer program used to test and debug other programs (the "target" program). The main use of a debugger is to run the target program under controlled conditions that permit the programmer to track its executi ...
''
Advanced Debugger The advanced debugger adb is the standard UNIX debugger found on Solaris 1 and 2, HP-UX, SCO and Venix. It is the successor of a debugger called db. Overview The initial version was written by Stephen R. Bourne. ADB is the standard debugger o ...
'' (adb) to obtain a stack backtrace for programs written in ALGOL 68C. Here is an extract from the Unix 7th edition manual pages: NAME adb - debugger SYNOPSIS adb w objfil_[_corfil_.html"_;"title="corfil_.html"_;"title="objfil_[_corfil_">objfil_[_corfil_">corfil_.html"_;"title="objfil_[_corfil_">objfil_[_corfil__[....html" ;"title="corfil_">objfil_[_corfil_.html" ;"title="corfil_.html" ;"title="objfil [ corfil ">objfil [ corfil ">corfil_.html" ;"title="objfil [ corfil ">objfil [ corfil [...">corfil_">objfil_[_corfil_.html" ;"title="corfil_.html" ;"title="objfil [ corfil ">objfil [ corfil ">corfil_.html" ;"title="objfil [ corfil ">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, e.g. *:= 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

Separate compilation in ALGOL 68C is done using the ENVIRON and USING clauses. The ENVIRON saves the complete environment at the point it appears. A separate module written starting with a USING clause is effectively inserted into the first module at the point the ENVIRON clause appears. ENVIRON and USING are useful for a ''top-down'' style of programming, in contrast to the ''bottom-up'' style implied by traditional library mechanisms. These clauses are kind of the ''inverse'' of the #include found in the
C programming language ''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as ...
, or import found in
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
. The purpose of the ENVIRON mechanism is to allow a program source to be broken into manageable sized pieces. It is only necessary to parse the shared source file once, unlike a #include found in the
C programming language ''The C Programming Language'' (sometimes termed ''K&R'', after its authors' initials) is a computer programming book written by Brian Kernighan and Dennis Ritchie, the latter of whom originally designed and implemented the language, as well as ...
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 =  im, dimEAL; # 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 "mylib"
BEGIN
  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 #
  666
END


Restrictions to the language from the standard ALGOL 68

*No ALGOL 68 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 Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, especi ...
,
IBM System/360 The IBM System/360 (S/360) is a family of mainframe computer systems that was announced by IBM on April 7, 1964, and delivered between 1965 and 1978. It was the first family of computers designed to cover both commercial and scientific applica ...
and several other computers.


References


External links

*
Cambridge ALGOL 68: on the historical roster of computer languages
– includes 10+ publication references.
A Transportation of ALGOL 68C – PJ Gardner, University of Essex
– March 1977 (From 370 to DECsystem-10)

- how to install ALGOL 68C on an emulated MVS system {{DEFAULTSORT:Algol 68c Cambridge CHAOS CAP computer Virtualization software