Related articles |
---|
Searching portable Occam-2 compiler mm@mars.ipl.fr (Maciez Macowicz) (1993-12-17) |
Re: Searching portable Occam-2 compiler md@pact.srf.ac.uk (Mark Debbage) (1993-12-24) |
Newsgroups: | comp.compilers |
From: | Mark Debbage <md@pact.srf.ac.uk> |
Keywords: | available, Occam |
Organization: | Compilers Central |
References: | 93-12-076 |
Date: | Fri, 24 Dec 1993 10:49:17 GMT |
Maciez Macowicz (mm@mars.ipl.fr) wrote:
: I am looking for a portable Occam-style language compiler.
Maciej,
A portable occam 2 compiler has been implemented at the University of
Southampton on the ESPRIT GPMIMD Project. I worked on the compiler before
moving on to new pastures. The system is termed SPOC, the Southampton
Portable Occam Compiler.
The system translates occam 2 source (including concurrency, communication,
alternation, priority ...) into portable ANSI C, which is then compiled with
a native C compiler on the target machine. Some real-time features (notably
timers and non-blocking host interaction) are necessarily dependent on
operating system facilities. The concurrency implementation is fully portable
Features include:
* Generated C code is ANSI-C compliant.
* C code generated is fully portable between target platforms
* Efficient portable support for concurrency.
* Optimized code generation for atomic code units, including use of
automatic variables wherever possible..
* Support for alien language procedure and function calls
(C, F77 and NAG F90)
* Code insertion mechanism for in-line C code.
* All processes in occam source files must be contained within an
appropriate procedure or function interface. Modules may contain any
number of procedures and/or functions with arbitrary parameter lists.
The entry point to a program is a single procedure with one of a number
of predefined interfaces.
* Channel tables are supported.
* Extensive checks on array subscription, array ranges and conversions.
* Detected errors can stop process, terminate application or be ignored.
* Support for multi-module programs and library units using #USE
and #INCLUDE.
* Automatic sizing of workspace across procedure and module boundaries.
* Support for the standard occamtwo libraries
(Intrinsics, snglmath and dblmath).
* Partial support for the Inmos-standard occamtwo libraries
(hostio, string and convert).
* Support for simulated iserver which runs as separate Unix process
and talks SP protocol via a socket to the occam program. This gives full
hostio and streamio support but requires that the user has access
* Automatic makefile generation using {omakef.
* SPOC compilations and Inmos Toolset compilations can coexist in the
same directory.
* Source-level occam debugging through gdb.
* Compiler implements alias and usage checking.
* Coarse grained (60/100 ticks a second) non-premptive
timer support for delayed input and selection.
At present the support for distributed execution is very limited. In
particular there is no support for multi-workstations communicating
over sockets.
The run-time performance of the translated code was a major concern. The
concurrency was handled using normal C language constructs (not a
threading library). This lessens context switch times and allows the
back-end C compiler to use its normal optimization strategies effectively.
This approach, for example, allows context switching on a SPARC to be
library. For a highly concurrent occam example (almost the worst case
code) the performance is as follows:
SPOC gcc -O2 Sun-4 37us
SPOC gcc -O2 33Mhz SuperSparc 9us
SPOC SUNPro -xO4 33MHz SuperSparc 8us
Native Inmos occam (d7205) 25MHz T800 transputer 17us
Hence, on a SuperSparc we can claim to run occam 2 faster than the
transputer!
SPOC is written using the GMD Cocktail compiler toolkit. The system has
proven to be extremely robust and is currently used for running some
extremely large occam source codes.
For further details about the system, please contact Dr Denis Nicole at
the University of Southampton (dan@ecs.soton.ac.uk). SPOC has only been
released as a beta version to selected sites so far. The intention is to
make a formal V1.00 release early in January.
Merry Xmas and a Happy New Year!
Mark Debbage, md@pact.srf.ac.uk
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.