ALGOL 68RS facts for kids
Original author(s) | I. F. Currie, J. D. Morrison |
---|---|
Developer(s) | Royal Signals and Radar Establishment |
Initial release | August 1977 |
Stable release |
algol68toc 1.14 / 25 August 2012
|
Written in | ALGOL 68 |
Operating system | VMS |
Platform | ICL 2900 Series, Multics, VAX |
Available in | English |
Type | Compiler, translator |
License | Freeware, public domain (parts) |
ALGOL 68RS is a special computer program called a compiler. It was created by I. F. Currie and J. D. Morrison. They worked at a place called the Royal Signals and Radar Establishment (RSRE).
This compiler was designed to be portable. This means it could work on many different types of computers. It also used the most up-to-date version of the ALGOL 68 programming language.
ALGOL 68RS was made for computers like the ICL 2900 Series, Multics systems, and VAX computers that ran VMS. Later, parts of this compiler were made free for everyone to use. These parts helped translate ALGOL 68 code into another language called C. This was done as part of a release for a hardware design language called ELLA.
Contents
History of ALGOL 68RS
The first ALGOL 68 compiler, called ALGOL 68-R, was very successful. But it had two main issues. First, it was made for an older computer, the ICL 1900. Second, it used an older version of the ALGOL 68 language.
The RSRE needed a new compiler for their projects. So, Currie and Morrison created ALGOL 68RS. They wanted it to be able to run on many different computer systems.
How the Compiler Works
The compiler first reads the ALGOL 68 code. Then it turns it into a special intermediate language. This language is called stream language. After that, another part of the compiler, called a translator, turns the stream language into machine code. Machine code is what the computer directly understands.
The compiler itself was written in ALGOL 68. It was first set up using the older ALGOL 68-R compiler. This process is called bootstrapping.
Developing for Different Computers
A team at Oxford University Computing Services helped make the compiler work for the ICL 2900 series computers. A company called International Computers Limited (ICL) even sold it as an official product.
Later, a group using Multics computers asked for a version of ALGOL 68RS for their systems. A version for Digital Equipment Corporation (DEC) VAX computers was also created.
Eventually, the team that worked on these versions formed a company called Praxis. They first helped support the Multics version of ALGOL 68RS.
The RSRE also used ALGOL 68RS for their own projects. This included the Flex machine and the ELLA hardware design language. When ELLA was made free, Praxis was asked to create a tool. This tool, called ctrans, could translate ALGOL 68 code into C. It was based on the ALGOL 68RS compiler.
Special Features of ALGOL 68RS
Like the earlier ALGOL 68-R, ALGOL 68RS processed code in one pass. This meant it had some specific rules for how programs had to be written.
Declaring Things First
In ALGOL 68RS, you usually had to tell the compiler about something before you used it. For example, if two parts of your program needed to talk to each other, you had to declare one first. This was like telling the compiler, "Hey, this thing is coming later, so don't worry!"
Handling Different Data Types for Printing
One tricky part of ALGOL 68 was printing different kinds of information. Imagine you have a complex piece of data, like a mix of numbers and text. The standard way to print it was difficult.
ALGOL 68RS made this easier with a feature called straightening. It allowed the compiler to automatically break down complex data into simpler parts. These simpler parts could then be easily printed.
Making Arrays More Efficient
Arrays in ALGOL 68 are powerful. They let you store lists of items, like a list of numbers or names. They can have multiple dimensions, like a grid.
ALGOL 68RS added simpler ways to handle arrays to make them work even faster.
Indexable Structures
ALGOL 68RS allowed you to define structures with a fixed size. For example, you could say a variable holds exactly 4 characters. This made it very efficient for handling small pieces of data.
Vectors
A VECTOR is a simpler kind of array. It only has one dimension, like a single list. Its first item is always at position 1. This made it easier to use for simple lists of data.
FORALL Statement
The FORALL statement is a special command. It helps you go through each item in an array very efficiently.
For example, if you have a list of numbers, you can use FORALL to double every number in that list. It's a quick way to apply an action to many items.
Building Programs with Modules
ALGOL 68RS helped programmers build large programs from smaller, organized parts. This is like building with LEGOs, where each block is a small piece of code.
Declaration Modules
You could create declaration modules which are like libraries of code. These modules contain definitions for things like data types, variables, and procedures. You could then choose which of these definitions would be visible to other parts of your program.
To use a library, your program would include a USE command. This tells the compiler to bring in the definitions from that library. This helps keep code organized and reusable.
Nested Modules
ALGOL 68RS also supported a way to design programs from the top down. This means you start with the big picture and then fill in the details.
You could mark parts of your program with a HERE tag. This meant that the actual code for that part would be written later. Then, a separate piece of code could be written using a CONTEXT command. This code would fill in the details for the HERE section. This method helps teams work on different parts of a big program at the same time.
Availability
The ALGOL 68 to C translator, called ctrans, contains most of the ALGOL 68RS compiler. This translator was created by Praxis for the ELLA system.
As of September 2020, you can find ALGOL 68RS available for download from SourceForge.