Disk images of the PDP-11/23 version of Edison

Jos Dreessen received a disk set of the Edision system from Günter Dotzel of Modulaware.
And he made images of it.

This diskset contains the whole Edison system, binaries and sources of all programs.
Even the sources not published in the book Programming a Personal Computer by per Brinch hansen
like the Alva PDP-11 ‘assembler’.
The program edisonFiledump is written to extract the files from the disk images.
Therefore the structure of the disk was studied, most of it was somehow documented in the book.

Read further here

Run the Edison system in simh PDP-11 emulator
In the Edison archive you find a folder called simh.
In it is the PDP-11 simh windows precompiled executable and a simh config file called config.simh.
You can also compile simh yourself on other systems.
The config file contains the bootloader, Peter de Wachter constructed this.

With this and the disk images dumped you can run the Edison system.

>simh config.sys
PDP-11 simulator Open SIMH V4.1-0 Current git commit id: 6e9324e0+uncommitted-changes
#
# Load two disk images using the commands:
#
# attach ry0 disk1.dsk
# attach ry1 disk2.dsk
#
# and boot using:
#
# go 0
#
%SIM-INFO: RY0: buffering file in memory
sim> att ry0 rx02_kernel.bin
%SIM-INFO: RY0: buffering file in memory
sim> att ry1 rx02_system.bin
%SIM-INFO: RY1: buffering file in memory
sim> go 0

The Edison system

insert two disks and type

s if both disks are standard
0 if only disk 0 is standard
1 if only disk 1 is standard
b if both disks are blank
s

Command =

post

Per Brinch Hansen pages updated

After the scan of Brinch Hansen on Pascal compilers I went on and also scanned the book on Edison: Programming a Personal Computer.

The Per Brinch Hansen now are updated too, the Alfred Hartmann book on Concurrent Pascal added, the Software: Practice and Experience issue on Edision scanned and converted, all articles by per Brinch Hansen listed. Enjoy the works of one of the pioneers: simplicity and parallel programming Per Brinch Hansen!

post

Joyce

Joyce is a secure programming language for concurrent computing designed by Per Brinch Hansen in the 1980s. It is based on the sequential language Pascal and the principles of communicating sequential processes (CSP). It was created to address the shortcomings of CSP to be applied as a programming language, and to provide a tool, mainly for teaching, for distributed computing system implementation.

The language is based around the concept of agents; concurrently executed processes that communicate only by the use of channels and message passing. Agents may activate subagents dynamically and recursively. The development of Joyce formed the foundation of the language SuperPascal, also developed by Hansen around 1993. No source has been published.

Joyce – A Programming Language for Distributed Systems, 1987
Joyce A Language for Computer Networks, November 1979
A Multiprocessor Implementation of Joyce, 1989
Joyce performance on a Multiprocessor, 1988
The Joyce Language Report, 1989

Edison – a Multiprocessor Language

The Edison System, 1982, is comprised of both an operating system and programming environment. The system language, also named Edison, is simple yet powerful. The Edison language is comprised of only a few basic commands and structures. However, these basic fundamentals have been carefully chosen to establish the necessary foundation to produce powerful and extensive applications. The Edison System possesses adequate development facilities, yet is contained in a very small quantity of code. Per Brinch Hansen’s final development system for a PDP-11 contains approximately 10,000 lines of program text. This text includes the operating system, the compiler, the editor, the diskette formatting program, necessary assembly code, and other utility programs. This establishes a powerful yet small environment for the development of concurrent programs.

On this page:

Documents

Software Practice and Experience, Volume 11 No 4.
Devoted to the Edison papers, Per Brinch Hansen.
Programming a Personal Computer, Per Brinch Hansen
The book describing thee Edison system, design, development, and listing of programs including compiler in the Edison language, and the interpreter/runtime written in PDP-11 Alva language.
The Design of Edison
(from Software Practice and Experience Vol 11, No 4), Per Brinch Hansen
The Development of Edison, Michael Wonderlich
The EDISON Multiprocessor Language and it’s port to OpenVMS
The Edison-ES programming language

Disk images of the PDP-11/23 version of Edison

Jos Dreessen received a disk set of the Edison system from Günter Dotzel of Modulaware. And he made images of it.

This diskset contains the whole Edison system, binaries and sources of all programs.
Even the sources not published in the book Programming a Personal Computer by per Brinch Hansen like the Alva PDP-11 ‘assembler’.

All these images, the files extracted and the simh runtime are in this archive.
Note that the user disks (edison_bu1, edison_bu2) contain bad blocks.

The program edisonFiledump is written to extract the files from the disk images.
Therefore the structure of the disk was studied, most of it was somehow documented in the book.
A detailed look with an hex editor was helpful also!
The relevant information is available in the document ‘edison disk structure.txt’.

The program runs as a command line.

Syntax: edisonfiledump <name of diskfile with files to dump> [<name of output disk de-interleaved> [verbose]]'

With only the name of the disk image the files on the disk are extracted as binary files.
If a filename contains the string ‘text’ or ‘txt’ it is assumed to be a source file and also extracted in normal text format.
This appears to be true for all text files in the disk images.

If the second optional argument is given, the disk image is written into it as file but without the interleaving. Useful for study/debugging, not for running!

A third parameter ‘verbose’ shows a lot of the internal dats structures of the disk. That was very helpful, in combination with a hex editor,
to find out how the disk structure really works and is interpreted the right way.

The program is written in portable Freepascal. A Windows and Ubuntu executable is included. For other Linux or Mac use Freepascal and the source to compile to a command line program.

Here an example of the basic usage:

> EdisonFiledump rx02_system.bin
Dump Edison PDP=11/23 files from RX01 floppy dumps
V1.0 Hans Otten, 2026

Catalog of edison_progs1.bin
alva1text    58698 bytes
alva2text    9616 bytes
assembletext 14326 bytes
compiletext  16404 bytes
edison1text  18928 bytes
edison2text  49726 bytes
Number of files = 6

Created alva1text, also created text file alva1text.txt
Created alva2text, also created text file alva2text.txt
Created assembletext, also created text file assembletext.txt
Created compiletext, also created text file compiletext.txt
Created edison1text, also created text file edison1text.txt
Created edison2text, also created text file edison2text.txt

In the folder diskimages you find all the disk images as dumped by Jos Dreessen and the files extracted with EdisonFiledump as binaries without type and with type .txt as sources.

Run the Edison system in simh PDP-11 emulator

In the Edison archive you find a folder called simh.
In it is the PDP-11 simh windows precompiled executable and a simh config file called config.simh.
You can also compile simh yourself on other systems.
The config file contains the bootloader, Peter de Wachter constructed this.

With this and the disk images dumped you can run the Edison system.

>simh config.sys
PDP-11 simulator Open SIMH V4.1-0 Current        git commit id: 6e9324e0+uncommitted-changes
#
# Load two disk images using the commands:
#
#     attach ry0 disk1.dsk
#     attach ry1 disk2.dsk
#
# and boot using:
#
#     go 0
#
%SIM-INFO: RY0: buffering file in memory
sim> att ry0 rx02_kernel.bin
%SIM-INFO: RY0: buffering file in memory
sim> att ry1 rx02_system.bin
%SIM-INFO: RY1: buffering file in memory
sim> go 0

The Edison system

insert two disks and type

s if both disks are standard
0 if only disk 0 is standard
1 if only disk 1 is standard
b if both disks are blank
s

Command =

The bootloader in the config.simh file is sector 26 on the disk (location D000-D07F).

In simh the numbers are in octal
deposit 0000000 000240 = A0 00
deposit 0000002 000412 = 0A 01
etc

Other Edison systems

Edison v1 compiler/interpreter
1987, R Kym Horsell
Compiler/interpreter for the Edison language, written in C.
Edisonv1 includes:
– a C preprocessor, cpp, which handles #include and #define commands inside Edison programs.
– an Edison compiler, edcomp, that translates Edison source code into a virtual (stack) machine code.
– an Edison interpreter, edrun, that loads and links machine code files.
– a runtime system stub.
– example programs culled from various textbooks on parallel and concurrent programming.
Local copy of the archive now lost on the internet

Peter de Wachter Edison compiler archive
Compiler for Edison in C and lex

Sources of Edison (compiler, operating system)



(photos by Jos Dreessen of the disks given by Günter Dotzel)

post

Concurrent and Sequential Pascal, Solo

Per Brinch Hansen announced Sequenatila and Concurrent Pascal in the Pascal User Group Newsletter nr 4, July 1976:

Concurrent Pascal is a programming language designed by Per Brinch Hansen for writing concurrent computing programs such as operating systems and real-time computing monitoring systems on shared memory computers. A separate language, Sequential Pascal, is used as the language for applications programs run by the operating systems written in Concurrent Pascal. Both languages are extensions of Niklaus Wirth’s Pascal, and share a common threaded code interpreter.
Several constructs in Pascal were removed from Concurrent Pascal for simplicity and security:
– Variant records
– Goto statement, and labels
– Procedures as parameters
– Packed arrays
– Pointer types
– File types, and associated standard input/output procedures
These omissions make it possible to guarantee, by a combination of compile-time checks and minimal run-time checking in the threaded-code interpreter, that a program can not damage itself or another program by addressing outside its allotted space.

Concurrent Pascal includes class, monitor, and process data types. Instances of these types are declared as variables, and initialized in an init statement.
Classes and monitors are similar: both package private variables and procedures with public procedures (called procedure entries). A class instance can be used by only one process, whereas a monitor instance may be shared by processes. Monitors provide the only mechanism for interprocess communication in a Concurrent Pascal program.
Only one process can execute within a given monitor instance at a time. A built in data type, the queue, together with operations delay and continue, are used for scheduling within monitors. Each variable of type queue can hold one process. If many processes are to be delayed in a monitor, multiple queue variables, usually organized as an array, must be provided. The single process queue variable gives a monitor full control over medium-term scheduling, but the programmer is responsible for unblocking the correct process.
A process, like a class or monitor, has local variables, procedures, and an initial statement, but has no procedure entries. The initial statement ordinarily executes forever, calling local procedures, class procedures, and monitor procedures. Processes communicate through monitor procedures. Language rules prevent deadlock by imposing a hierarchy on monitors. But nothing can prevent a monitor from erroneously forgetting to unblock a delayed process (by not calling continue) so the system can still effectively hang up through programming errors.
The configuration of processes, monitors, and classes in a Concurrent Pascal program is normally established at the start of execution, and is not changed thereafter. The communication paths between these components are established by variables passed in the init statements, since class and monitor instance variables cannot be used as procedure parameters.
Solo
The single-user operating system Solo is written in the programming language Concurrent Pascal. It supports the development of Sequential and Concurrent Pascal programs for the PDP 11/45 computer. Input/output are handled by concurrent processes. Pascal programs can call one another recursively and pass arbitrary parameters among themselves. This makes it possible to use Pascal as a job control language. Solo is the first major example of a hierarchical concurrent program implemented in terms of abstract data types (classes, monitors and processes) with compile-time control of most access rights

The Architecture of Concurrent Programs, 1977.
About the languages and Solo operating system.
Most of the book is covered in the following articles.
A Concurrent Pascal Compiler for Minicomputers
Afred C. Hartmann (who wrote the compiler!)
Concurrent Pascal Introduction July 1975
Concurrent Pascal Machine October 1975
Concurrent Pascal Report June 1975
Distributed processes:
a Concurrent Programming Concept, 1978
Experience with Modular Concurrent Programming, 1977
IEEE Programming Language Concurrent Pascal, 1975
Monitors and Concurrent Pascal:
A Personal History, 1993
Multiprocessor architecture for Concurrent Programs, 1978
The Structure of the Nadex Operating System
Robert Ypung, Virgil Wallentine 1981
Network: A Multiprocessor Program
Overview of Concurrent Pascal for the Interdata, 1978
The Programming Language Concurrent Pascal, 1975
Reproducable Testing of Monitors, 1978
Scheduling in Concurrent Pascal
Schneider, Bernmstein, 1978
The Solo Operating System:
Processes, Monitors and Classes, 1976
The Solo Operating system:
A Concurrent Pascal Program, 1976
Solo32: A Concurrent Pascal Operating System
with Unix Interface, Martin Wilde, 1984

The archive with the sources of Solo and the Pascal compilers Concurrent and Sequential Pascal for a PDP-11/34

From http://www.bitsavers.org/bits/DEC/pdp11/Brinch_Hansen_SOLO/

LIST(CATALOG,ALL,CONSOLE)
CONSOLE: 
SOLO SYSTEM FILES

AUTOLOAD     SCRATCH      PROTECTED         1 PAGES
BACKUP       SEQCODE      PROTECTED         4 PAGES
BACKUPMAN    ASCII        PROTECTED         3 PAGES
BACKUPTEXT   ASCII        PROTECTED        14 PAGES
BUILDBATTEXT ASCII        UNPROTECTED       1 PAGES
BUILDTEXT    ASCII        UNPROTECTED       4 PAGES
CARDS        SEQCODE      PROTECTED         5 PAGES
CARDSMAN     ASCII        PROTECTED         2 PAGES
CARDSTEXT    ASCII        PROTECTED        12 PAGES
CATALOG      SCRATCH      PROTECTED        15 PAGES
CDISKTEXT    ASCII        UNPROTECTED      10 PAGES
COMMANDS     ASCII        UNPROTECTED       1 PAGES
CONSOLE      SEQCODE      PROTECTED         1 PAGES
CONSOLEMAN   ASCII        PROTECTED         1 PAGES
CONSOLETEXT  ASCII        PROTECTED         8 PAGES
COPY         SEQCODE      PROTECTED         4 PAGES
COPYMAN      ASCII        PROTECTED         2 PAGES
COPYTEXT     ASCII        PROTECTED        12 PAGES
CPASCAL      SEQCODE      PROTECTED         7 PAGES
CPASCALMAN   ASCII        PROTECTED         3 PAGES
CPASCALTEXT  ASCII        PROTECTED        18 PAGES
CPASS1       SEQCODE      PROTECTED        20 PAGES
CPASS1TEXT   ASCII        PROTECTED        54 PAGES
CPASS2       SEQCODE      PROTECTED        26 PAGES
CPASS2TEXT   ASCII        PROTECTED        72 PAGES
CPASS3       SEQCODE      PROTECTED        35 PAGES
CPASS3TEXT   ASCII        PROTECTED        90 PAGES
CPASS4       SEQCODE      PROTECTED        27 PAGES
CPASS4TEXT   ASCII        PROTECTED        71 PAGES
CPASS5       SEQCODE      PROTECTED        20 PAGES
CPASS5TEXT   ASCII        PROTECTED        56 PAGES
CPASS6       SEQCODE      PROTECTED        16 PAGES
CPASS6TEXT   ASCII        PROTECTED        53 PAGES
CPASS7       SEQCODE      PROTECTED        18 PAGES
CPASS7TEXT   ASCII        PROTECTED        56 PAGES
CPTEXT       ASCII        UNPROTECTED       2 PAGES
DISK         SEQCODE      PROTECTED         2 PAGES
DISKMAN      ASCII        PROTECTED         1 PAGES
DISKTEXT     ASCII        PROTECTED         9 PAGES
DO           SEQCODE      PROTECTED        11 PAGES
DOMAN        ASCII        PROTECTED         3 PAGES
DOTEXT       ASCII        PROTECTED        26 PAGES
EDIT         SEQCODE      PROTECTED         8 PAGES
EDITMAN      ASCII        PROTECTED         5 PAGES
EDITTEXT     ASCII        PROTECTED        20 PAGES
FILE         SEQCODE      PROTECTED        20 PAGES
FILEMAN      ASCII        PROTECTED         3 PAGES
FILETEXT     ASCII        PROTECTED        54 PAGES
IO           SEQCODE      PROTECTED         4 PAGES
IOTEXT       ASCII        PROTECTED        13 PAGES
JOB          SEQCODE      PROTECTED        40 PAGES
JOBBUFFER1   SCRATCH      PROTECTED        20 PAGES
JOBBUFFER2   SCRATCH      PROTECTED        20 PAGES
JOBINPUT     SEQCODE      PROTECTED         3 PAGES
JOBINPUTTEXT ASCII        PROTECTED         6 PAGES
JOBOUTPUT    SEQCODE      PROTECTED         2 PAGES
JOBOUTPUTTXT ASCII        PROTECTED         6 PAGES
JOBPREFIX    ASCII        PROTECTED         1 PAGES
JOBSERVICE   SEQCODE      PROTECTED         3 PAGES
JOBSERVICETX ASCII        PROTECTED         8 PAGES
JOBSTREAM    CONCODE      PROTECTED        17 PAGES
JOBSTREAMTXT ASCII        PROTECTED        50 PAGES
KERNELTEXT1  ASCII        UNPROTECTED     134 PAGES
KERNELTEXT2  ASCII        UNPROTECTED     129 PAGES
KERNELTEXT3  ASCII        UNPROTECTED     147 PAGES
KERNELTEXT4  ASCII        UNPROTECTED     171 PAGES
LIST         SEQCODE      PROTECTED         7 PAGES
LISTMAN      ASCII        PROTECTED         2 PAGES
LISTTEXT     ASCII        PROTECTED        19 PAGES
MAKETEMP     SEQCODE      PROTECTED         4 PAGES
MAKETEMPMAN  ASCII        PROTECTED         1 PAGES
MAKETEMPTEXT ASCII        PROTECTED        12 PAGES
MOVE         SEQCODE      PROTECTED         2 PAGES
MOVEMAN      ASCII        PROTECTED         1 PAGES
MOVETEXT     ASCII        PROTECTED        10 PAGES
MTOPTEXT     ASCII        UNPROTECTED       4 PAGES
NEXT         SCRATCH      PROTECTED       255 PAGES
PIPELINE     CONCODE      PROTECTED         4 PAGES
PIPELINETEXT ASCII        PROTECTED         8 PAGES
PREFIX       ASCII        PROTECTED         6 PAGES
PRINTER      SEQCODE      PROTECTED         3 PAGES
PRINTERMAN   ASCII        PROTECTED         2 PAGES
PRINTERTEXT  ASCII        PROTECTED        11 PAGES
READ         SEQCODE      PROTECTED         4 PAGES
READMAN      ASCII        PROTECTED         2 PAGES
READTEXT     ASCII        PROTECTED        12 PAGES
REALTIME     CONCODE      PROTECTED        11 PAGES
REALTIMETEXT ASCII        PROTECTED        23 PAGES
RKBOOTTEXT   ASCII        UNPROTECTED       6 PAGES
SOLO         CONCODE      PROTECTED        18 PAGES
SOLOBATTEXT  ASCII        UNPROTECTED       4 PAGES
SOLOCOPY     ASCII        PROTECTED         1 PAGES
SOLOFILES    ASCII        PROTECTED         1 PAGES
SOLOTEXT     ASCII        PROTECTED        52 PAGES
SPASCAL      SEQCODE      PROTECTED         7 PAGES
SPASCALMAN   ASCII        PROTECTED         3 PAGES
SPASCALTEXT  ASCII        PROTECTED        18 PAGES
SPASS1       SEQCODE      PROTECTED        20 PAGES
SPASS1TEXT   ASCII        PROTECTED        53 PAGES
SPASS2       SEQCODE      PROTECTED        26 PAGES
SPASS2TEXT   ASCII        PROTECTED        73 PAGES
SPASS3       SEQCODE      PROTECTED        35 PAGES
SPASS3TEXT   ASCII        PROTECTED        91 PAGES
SPASS4       SEQCODE      PROTECTED        26 PAGES
SPASS4TEXT   ASCII        PROTECTED        65 PAGES
SPASS5       SEQCODE      PROTECTED        19 PAGES
SPASS5TEXT   ASCII        PROTECTED        54 PAGES
SPASS6       SEQCODE      PROTECTED        16 PAGES
SPASS6TEXT   ASCII        PROTECTED        53 PAGES
SPASS7       SEQCODE      PROTECTED        18 PAGES
SPASS7TEXT   ASCII        PROTECTED        56 PAGES
START        SEQCODE      PROTECTED         3 PAGES
STARTMAN     ASCII        PROTECTED         3 PAGES
STARTTEXT    ASCII        PROTECTED        11 PAGES
SUPERMAC     ASCII        UNPROTECTED      30 PAGES
TAPE         SEQCODE      PROTECTED         3 PAGES
TAPEMAN      ASCII        PROTECTED         2 PAGES
TAPETEXT     ASCII        PROTECTED        14 PAGES
TEMP1        SCRATCH      PROTECTED       255 PAGES
TEMP2        SCRATCH      PROTECTED       255 PAGES
TOTAPETEXT   ASCII        UNPROTECTED       4 PAGES
WRITE        SEQCODE      PROTECTED         2 PAGES
WRITEMAN     ASCII        PROTECTED         1 PAGES
WRITETEXT    ASCII        PROTECTED         9 PAGES
XMAC         ASCII        UNPROTECTED       1 PAGES
   125 ENTRIES
  3391 PAGES
post

Superpascal language

SuperPascal—a secure programming language for publication of parallel scientific algorithms. SuperPascal extends a subset of IEEE Standard Pascal with deterministic statements for parallel processes and synchronous message communication. A parallel statement denotes parallel execution of a fixed number of statements. A forall statement denotes parallel execution of the same statement by a dynamic number of processes. Recursive procedures may be combined with parallel and forall statements to define recursive parallel processes. Parallel processes communicate by sending typed messages through channels created dynamically. SuperPascal omits ambiguous and insecure features of Pascal. Restrictions on the use of variables enable a single‐pass compiler to check that parallel processes are disjoint, even if the processes use procedures with global variables.

Recently the sources of SuperPascal appeared online at his website (http://brinch-hansen.net/). This subset of Pascal, enhanced with constructs for parallel computing is not super Pascal, but a well structured, easy to understand compiler-interpreter combination for the study of concurrent programming.

Since the information is available in ‘shar’ archive format, with Latex encoded documents, the files are converted to more convenient text and pdf format.
SuperPascal sources as distributed in a shar file by Per Brinch Hansen for a Sun workstation
The same SuperPascal sources as distributed in a zipfile file for a Sun workstation

Since SuperPascal is nearly ISO Standard Pascal, it is easy to get SuperPascal compiled with more modern Pascal compilers like Freepascal and the GNU Pascal compiler.
The SuperPascal software can be accessed freely from the Brinch Hansen Archive. It consists of a compiler and interpreter, which are both written in normal, sequential Pascal (ISO Level 1 standard Pascal). This is supported by the GNU Pascal compiler and newer versions of the Free Pascal compiler (2.7.1+) with the -Miso switch, with the following respective small modifications to the code.

For GPC, the file interpret.p uses the non-standard clock function (line 1786), which is used to obtain the system time. Instead, the Extended Pascal getTimeStamp function can be used (which is supported by the GNU Pascal compiler), by declaring a variable of type TimeStamp, setting that with the current time using getTimeStamp and assigning the Second field of the TimeStamp to the variable t.

Free Pascal also needs a solution to the above “clock” problem (On windows, just declare gettickcount as external with “clock” as name). In addition, the reset/rewrites that are marked as non-standard in the source need to be changed to assign/reset (or rewrite) pairs. (GPC probably only errors on this if you enable strict flags), and the C preprocessor commands #include ‘xx’ must be changed to {$include ‘xx’}.

So small changes were necessary, here the projects:

SuperPascal FPC project (original github https://github.com/octonion/superpascal)
SuperPascal GNU project (original github https://github.com/samplx/SuperPascal)

Articles on SuperPascal

SuperPascal: a Publication Language for Parallel Scientific Computing, 1994
The Programming Language SuperPascal, November 1993
The SuperPascal User Manual, November 1993
Anonymous FTP of the SuperPascal Software, November 1993
The SuperPascal Software Notes, November 1993
Note on the Sun Pascal clock statement used in the interpreter

From Wikipedia:

SuperPascal is based on Niklaus Wirth’s sequential language Pascal, extending it with features for safe and efficient concurrency. Pascal itself was used heavily as a publication language in the 1970s; it was used to teach structured programming practices and featured in text books, for example, on compilers and programming languages. Brinch Hansen had earlier developed the language Concurrent Pascal, one of the earliest concurrent languages for the design of operating systems and real-time control systems.

The requirements of SuperPascal were based on the experience gained by Brinch Hansen over three years in developing a set of model parallel programs, which implemented methods for common problems in computational science.This experimentation allowed him to make the following conclusions about the future of parallel scientific computing:

Future parallel computers will be general-purpose, allowing programmers to think in terms of problem-orientated process configurations. This was based on his experience programming networks of transputers, which were general-purpose processors able to be connected in arrays, trees or hypercubes.
Regular problems in computational science require only deterministic parallelism, that is, expecting communication from a particular channel, rather than from several.
Parallel scientific algorithms can be developed in an elegant publication language and tested on a sequential computer. When it is established an algorithm works, it can easily be implemented in a parallel implementation language.

These then led to the following requirements for a parallel publication language:

-The language should extend a widely used standard language with deterministic parallelism and message communication. The extensions should be in the spirit of the standard language.
-The language should make it possible to program arbitrary configurations of parallel processes connected by communication channels. These configurations may be defined iteratively or recursively and created dynamically.
-The language should enable a single-pass compiler to check that parallel processes do not interfere in a time-dependent manner.

Features
The key ideas in the design of SuperPascal was to provide a secure programming, with abstract concepts for parallelism.

Security
SuperPascal is secure in that it should enable its compiler and run-time system to detect as many cases as possible in which the language concepts break down and produce meaningless results. SuperPascal imposes restrictions on the use of variables that enable a single-pass compiler to check that parallel processes are disjoint, even if the processes use procedures with global variables, eliminating time-dependent errors. Several features in Pascal were ambiguous or insecure and were omitted from SuperPascal, such as labels and goto statements, pointers and forward declarations.

Parallelism
The parallel features of SuperPascal are a subset of occam 2, with the added generality of dynamic process arrays and recursive parallel processes.

A parallel statement denotes that the fixed number of statements it contains must be executed in parallel. For example:

parallel
  source() |
  sink()
end

A forall statement denotes the parallel execution of a statement by a dynamic number of processes, for example:

forall i := 0 to 10 do
  something()

Channels and communication
Parallel processes communicate by sending typed messages through channels created dynamically. Channels are not variables in themselves, but are identified by a unique value known as the channel reference, which are held by channel variables. A channel is declared, for example, by the declaration

type channel = *(boolean, integer);
  var c: channel;

which defines a new (mixed) type named channel and a variable of this type named c. A mixed type channel is restricted to transmitting only the specified types, in this case boolean and integer values. The channel c is initialised by the open statement:

open(c)

Message communication is then achieved with the send(channel, value) and receive(channel, variable) statements. The expression or variable providing the value for send, and the variable in receive, must both be of the same type as the first channel argument. The following example shows the use of these functions in a process that receives a value from the left channel and outputs it on the right one.

var left, right: channel; a: number;
  receive(left, a);
  send(right, a)

The functions send and receive can both take multiple input and output arguments respectively:

  send(channel, e1, e2,..., en);
  receive(channel, v1, v2,..., vn)

The following run-time communication errors can occur:
– Channel contention occurs when two parallel processes both attempt to send or receive on the same channel simultaneously.
A message type error occurs when two parallel processes attempt to communicate through the same channel and the output expression and input variable are of different types.
Deadlock occurs when a send or receive operation waits indefinitely for completion.

– Recursive procedures can be combined with parallel and forall statements to create parallel recursive processes. The following example shows how a pipeline of processes can be recursively defined using a parallel statement.

procedure pipeline(min, max: integer; left, right: channel);
var middle: channel;
begin
  if min < max then
    begin
      open(middle);
      parallel
        node(min, left, middle) |
        pipeline(min + 1, max, middle, right)
      end
    end
  else node(min, left, right)
end;
end;

Another example is the recursive definition of a process tree:

procedure tree(depth: integer, bottom: channel);
var left, right: channel;
begin
  if depth > 0 then
    begin
      open(left, right);
      parallel
        tree(depth - 1, left) |
        tree(depth - 1, right) |
        root(bottom, left, right)
      end
    end
  else leaf(bottom)

Interference control
The most difficult aspect of concurrent programming is unpredictable or non-reproducible behaviour caused by time-dependent errors. Time-dependent errors are caused by interference between parallel processes, due to variable updates or channel conflicts. If processes sharing a variable, update it at unpredictable times, the resulting behaviour of the program is time-dependent. Similarly, if two processes simultaneously try to send or receive on a shared channel, the resulting effect is time-dependent.

SuperPascal enforces certain restrictions on the use of variables and communication to minimise or eliminate time-dependent errors. With variables, a simple rule is required: parallel processes can only update disjoint sets of variables. For example, in a parallel statement a target variable cannot be updated by more than a single process, but an expression variable (which can’t be updated) may be used by multiple processes. In some circumstances, when a variable such as an array is the target of multiple parallel processes, and the programmer knows its element-wise usage is disjoint, then the disjointness restriction may be overridden with a preceding statement.

Structure and syntax
SuperPascal is a block structured language, with the same basic syntax as Pascal. A program consists of a header, global variable definitions, function or procedure definitions and a main procedure. Functions and procedures consists of blocks, where a block is a set of statements. Statements are separated by semicolons, as opposed to languages like C or Java, where they are terminated by semicolons.

The following is an example of a complete SuperPascal program, which constructs a pipeline communication structure with 100 nodes. A master node sends an integer token to the first node, this is then passed along the pipeline and incremented at each step, and finally received by the master node and printed out.

program pipeline;

const
    len = 100;

type
    channel = *(integer);

var
    left, right: channel;
    value: integer;

procedure node(i: integer; left, right: channel);
var value: integer;
begin
    receive(left, value);
    send(right, value+1)
end;

procedure create(left, right: channel);
type row = array [0..len] of channel;
var c: row; i: integer;
begin
    c[0] := left;
    c[len] := right;
    for i := 1 to len-1 do
        open(c[i]);
    forall i := 1 to len do
        node(i, c[i-1], c[i])
end;

begin
    open(left, right);

    parallel
        send(left, 0) |
        create(left, right) |
        receive(right, value)
    end;

    writeln('The resulting value is ', value)
end.

Per Brinch Hansen

hansenBrinch Hansen was one of the pioneers of concurrent programming and operating systems (kernels). In the 1960s, Brinch Hansen worked at the Danish computer company Regnecentralen, first in the compiler group headed by Peter Naur and Jørn Jensen, and, later, as the chief architect of the RC 4000 minicomputer and its renowned operating system kernel (RC 4000 Multiprogramming System). In 1972, he wrote the first comprehensive textbook on Operating System Principles.

In 1970 his research in computer science focused on concurrent programming.  Inspired by Ole-Johan Dahl and Kristen Nygaard’s programming language Simula 67, he invented the monitor concept in 1972. In the United States, he also developed the first concurrent programming language, Concurrent Pascal, in 1975. In 1977, he wrote the first book on Concurrent Programming: The Architecture of Concurrent Programs.

Per Brinch Hansen has concentrated on simplicity. Only the essential, always ask why complications are tolerated. His book on Programming a Personal Computer, read by me in 1983, made a lasting deep impresssion on me.

Two citations from Per Brinch Hansen on simplicity and programming
– Writing is a rigorous test of simplicity: It is just not possible to write convincingly about ideas that cannot be understood.
– Programming is the art of writing essays in crystal clear prose and making them executable

Information on the work of Per Brinch Hansen:
Solo and Concurrent/Sequential Pascal
Edison system
Joyce A programming language for networks
SuperPascal
– Collected articles by Per Brinch Hansen http://brinch-hansen.net/.

Books in my library:

pbhoperating Operating System Principles
(1973, ISBN 0-13-637843-9) (scanned)
pbharchitecture The Architecture of Concurrent Programs
(1977, ISBN 0-13-044628-9)
Concurrent Pascal and Solo
Programming a Personal Computer, Per Brinch Hansen
The book describing the Edison system, design,
development,listing of programs including compiler in the Edison language,
and the interpreter/runtime written in PDP-11 Alva language.
(1983, ISBN 0-13-730267-3), the Edison system
Programming a Personal Computer, Per Brinch Hansen
OCR version (thanks Daniel Toffetti)
pbhpascalcompiler Brinch Hansen on Pascal Compilers
(1985, ISBN 0-13-083098-4) (scanned)
pbhpascalcompiler Brinch Hansen on Pascal Compilers
OCR version (thanks Daniel Toffetti)
The Search for Simplicity.
Essays on Parallel ProgrammingSee below.
(1996, ISBN 0-8186-7566-7

The Search for Simplicity. Essays on Parallel Programming.

The Cobol compiler for the Siemens 3003
Design considerations for the RC 4000 computer
The logical structure of the RC 4000 computer
The RC 4000 real-time control system at Pulawy
RC 4000 Software: Multiprogramming System (abridged)
RC 4000 Computer: Reference Manual
RC 4000 Software: Multiprogramming System (complete)
The nucleus of a multiprogramming system
An outline of a course on operating system principles
Structured multiprogramming
Shared classes
Testing a multiprogramming system
The programming language Concurrent Pascal
The Solo operating system: A Concurrent Pascal program
The Solo operating system: Processes, monitors, and classes
The programmer as a young dog
Experience with modular concurrent programming
Design principles
Network—A multiprocessor program
Distributed processes: A concurrent programming concept
Reproducible testing of monitors
A keynote address on concurrent programming
The design of Edison
Joyce—A programming language for distributed systems
A multiprocessor implementation of Joyce
The nature of parallel programming
The Joyce Language Report
The linear search rediscovered
Householder reduction of linear equations
Monitors and Concurrent Pascal: A personal history
Model programs for computational science
Parallel cellular automata
Multiple-length division revisited
SuperPascal—A publication language
Interference control in SuperPascal
Efficient parallel recursion
The all-pairs pipeline
Balancing a pipeline
Java’s insecure parallelism
The evolution of operating systems
The invention of concurrent programming

Other books:
– Studies in Computational Science: Parallel Programming Paradigms (1995, ISBN 0-13-439324-4)
– Programming for Everyone in Java (1999, ISBN 0-387-98683-9)
– Classic Operating Systems: From Batch Processing to Distributed Systems (2001, ISBN 0-387-95113-X)
– The Origin of Concurrent Programming: From Semaphores to Remote Procedure Calls (2004, ISBN 0-387-95401-5)
– A Programmer’s Story: The Life of a Computer Pioneer (2004, local copy available here at http://brinch-hansen.net/)
– Many articles in the scientific journals, many available at local copy of http://brinch-hansen.net/.


With father

Class of 1949

Age 21

Ivar Bech

Naur and Brinch Hansen

Naur, Dahl, Brinch Hansen

Compiler Group

RC4000 computer

1959

1967

1975