by Alan Burns and Geoff Davies

Pascal-FC is a programming language aimed at supporting the teaching of concurrent programming. It supports a wide range of concurrency primitives including semaphores, monitors with condition variables, synchronous message passing using channels (as in occam and CSP), remote invocation (as used in the Ada rendezvous), protected resources (as used in Ada 95 protected objects) and requeue. All of these features can be easily used, either in isolation or together.

An important feature of the implementation of Pascal-FC is the random switching between user processes incorporated into the run-time system. This provides an excellent simulation of true parallelism and invariably finds bugs in poorly structured programs.

As well as supporting teaching, Pascal-FC can also be used to experiment with concurrent algorithms.

The use of Pascal-FC is supported by a book. This book provides a hands-on introduction to concurrent programming principles and techniques. It also contains a Reference Manual for Pascal-FC and information on its implementation.

As the name implies, Pascal-FC is based upon Pascal; it is easy to use. It is implemented as a set of Pascal programs and hence can easily be ported.

The system may now be compiled under the GNU Pascal compiler. The source code for the compiler (pfccomp.pas) and "fair" interpreter (pint.pas) are provided below:

Pascal-FC for Vista New* (Thanks to Daniel Garrido) - used dev_gnu_pascal-1.9.2 for the compilation of Pascal-FC.

Pascal-FC (GNU) (Thanks to Periklis Sochos).

Java GUI for Pascal-FC (Windows 2000 version) (Thanks to Periklis Sochos),
Java GUI for Pascal-FC (Linux version) (Thanks to Periklis Sochos),
Windows 2000 (Thanks to Periklis Sochos),

PC (all Windows Versions prior to Windows 2000),
Sun Solaris 2.5,
SGI Irix 5.3
Red Hat Linux 5.0
Slackware Linux 3.4
Slackware Linux 7 (linked with glibc-2.1.2) and
Amiga (Thanks to Luke Guest of The University of Bradford, UK).

Documentation on Pascal-FC and its implementation is contained in these releases.

The PC distribution also has the original sources to the compiler and run-time (both are pascal programs).

To illustrate the use of Pascal-FC consider the famous dining philosophers problem. Solutions are available which use semaphores, monitors, channels, remote invocation, and resources.

The most common mistake in concurrent programs is caused by multiple updates of shared variables. A very simple Pascal-PC program illustrates this. Rarely does the execution of this program produce the `expected' value 40. But what is the lowest value possible?

For more information on Pascal-FC email Alan Burns. Please also email experiences in using Pascal-FC and any interesting Pascal-FC programs you wish to share.