HOME

TheInfoList



OR:

ALGOL 68C is an imperative
computer programming Computer programming or coding is the composition of sequences of instructions, called computer program, programs, that computers can follow to perform tasks. It involves designing and implementing algorithms, step-by-step specifications of proc ...
language Language is a structured system of communication that consists of grammar and vocabulary. It is the primary means by which humans convey meaning, both in spoken and signed language, signed forms, and may also be conveyed through writing syste ...
, a dialect of
ALGOL 68 ALGOL 68 (short for ''Algorithmic Language 1968'') is an imperative programming language member of the ALGOL family that was conceived as a successor to the ALGOL 60 language, designed with the goal of a much wider scope of application and ...
, that was developed by Stephen R. Bourne and Michael Guy to program the Cambridge Algebra System (CAMAL). The initial
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
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 ref ...
CAP computer at
University of Cambridge The University of Cambridge is a Public university, public collegiate university, collegiate research university in Cambridge, England. Founded in 1209, the University of Cambridge is the List of oldest universities in continuous operation, wo ...
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 recyclable ...
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 platform A computing platform, digital platform, or software platform is the infrastructure on which software is executed. While the individual components of a computing platform may be obfuscated under layers of abstraction, the ''summation of the requi ...
s. Aside from the CAP computer, the compiler was ported to systems including Conversational Monitor System (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 earlier "Mo ...
, and
Zilog Z80 The Zilog Z80 is an 8-bit computing, 8-bit microprocessor designed by Zilog that played an important role in the evolution of early personal computing. Launched in 1976, it was designed to be Backward compatibility, software-compatible with the ...
.


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 C (''pronounced'' '' – like the letter c'') is a general-purpose programming language. It was created in the 1970s by Dennis Ritchie and remains very widely used and influential. By design, C's features cleanly reflect the capabilities of ...
, or import found in Python. 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 C (''pronounced'' '' – like the letter c'') is a general-purpose programming language. It was created in the 1970s by Dennis Ritchie and remains very widely used and influential. By design, C's features cleanly reflect the capabilities of ...
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 announced by IBM on April 7, 1964, and delivered between 1965 and 1978. System/360 was the first family of computers designed to cover both commercial and scientific applicati ...
and several other computers.


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 is an 18-bit computing, 18-bit minicomputer produced by Digital Equipment Corporation as part of the Programmed Data Processor, PDP series. Introduced in 1964, shipped since 1965, it was the first to use their Flip-Chip module, Flip- ...
with a DEC 340 display. Various '' Liverpool Software Gazette'' 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, or an
IBM System/370 The IBM System/370 (S/370) is a range of IBM mainframe computers announced as the successors to the IBM System/360, System/360 family on June 30, 1970. The series mostly maintains backward compatibility with the S/360, allowing an easy migrati ...
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, enterprise ...
.


Algol 68C and Unix

Stephen Bourne subsequently reused
ALGOL 68 ALGOL 68 (short for ''Algorithmic Language 1968'') is an imperative programming language member of the ALGOL family that was conceived as a successor to the ALGOL 60 language, designed with the goal of a much wider scope of application and ...
'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, multi-user 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, a ...
Bourne shell The Bourne shell (sh) is a shell command-line interpreter for computer operating systems. It first appeared on Version 7 Unix, as its default shell. Unix-like systems continue to have /bin/sh—which will be the Bourne shell, or a symbolic lin ...
, 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, commonly referred to as ''Bell Labs'', is an American industrial research and development company owned by Finnish technology company Nokia. With headquarters located in Murray Hill, New Jersey, Murray Hill, New Jersey, the compa ...
with the
Version 7 Unix Version 7 Unix, also called Seventh Edition 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 commerc ...
(Seventh Edition Unix) team. As well as developing the Bourne shell, he ported ALGOL 68C to Unix on the DEC
PDP-11 The PDP–11 is a series of 16-bit minicomputers originally sold by Digital Equipment Corporation (DEC) from 1970 into the late 1990s, one of a set of products in the Programmed Data Processor (PDP) series. In total, around 600,000 PDP-11s of a ...
-45 and included a special option in his Unix
debugger A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
''
Advanced Debugger The advanced debugger adb is a debugger that first appeared in Seventh Edition UNIX. It is found on Solaris (operating system), Solaris, HP-UX, OpenServer, SCO and Venix. It is the successor of a debugger called db. Overview The initial version ...
'' (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 ">corfil_.html" ;"title="objfil [ corfil ">objfil [ corfil [...">corfil_">objfil_[_corfil_<_a>.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.


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