The KRoC Occam Compiler

Unfortunately, the transputer harware architecture was depreciated by SGC-THOMPSON after their acquisition of Inmos. The occam language is currently not supported directly by any particular microarchitecture, although SGC-THOMPSON retains rights to the transputer and published a revision for occam 2.1 in 1995.

Because occam directly supports concurrent programming with a simple, clean language, it remains widely used in programming language and parallel/concurrent programming courses at various academic institutions. Several interpreters and compilers for different architectures have been released by a variety of organizations. One particularly useful product is the The Kent Retargetable occam Compiler (KRoC) from the Univeristy of Kent at Canterbury (1997).

KRoC makes occam available on a variety of architectures by compiling occam source into native opcodes for the target processor. Additional support for occam's process-based execution style is provided by a small internal process management and context switch system. As transputer was essentially a microcontroller and not a general purpose computer, it provided access to low-level specialized A/D, D/A, binary input/output, and serial communication channels. Communicating with a monitor and keyboard were also through special mapped channels. On a workstation environment, however, most input and output is through the keyboard and display.

KRoC provides traditional interactive workstation input and output using a startup procedure with named procedures. The first PROC in the occam source file is designated the startup procedure, and must accept byte channels representing stdin, stdio, and stderr. The name of the procedure is aesthetic only. The following sample shows a startup procedure for a KRoC occam program:

    PROC (CHAN OF BYTE keyboard, screen, error)     
       -- This is where the code goes

Next: Simple input and output
Return to Index