[comp.sys.transputer] C Compilers

IAN@latlog.UUCP (06/11/88)

Re: Transputer C Compilers - How many do you know?

Given that I work for one of the manufacturers mentioned (3L
Ltd), I will try and avoid turning this into an advert; as Ken
Koontz pointed out, I would only tell you how great our product
is.  However, I feel I can give a certain amount of factual
information and clarify the differences/samenesses between some
of the compilers mentioned, which may be of general interest.

First, my own company, 3L Ltd, used to be part of a larger
company called Lattice Logic Ltd (now part of European Silicon
Structures).  This, Lattice Logic C and 3L C can be regarded as
the same for the purposes of this discussion.

We sell two C products: single-transputer C (currently V1.3) and
Parallel C (currently V2.0) which supports multiple transputers
directly.  Both are K&R compilers with a fair number of the UNIX
extensions now being enshrined in the ANSI standard; this is
particularly true of the library, which has had more of the ANSI
functions at each release.

Our compilers and tools all run on the transputer; the host just
runs a file server program for which the source is available.  We
have customers who have ported the standard MS-DOS kit we supply
to VAX, SUN, Apollo and Macintosh systems, for example.  Some of
these people are planning to release these ports as products.

Parallel C V2.0 has been shipping since March 1.  It allows you
to do multi-transputer and multi-threaded work without occam,
should you so wish. This involves additional run-time library
support for concurrency and message passing (the C language is
not interfered with) and some proprietary configuration tools.  A
single program creates a single TASK, which may contain
concurrent threads of execution and may talk to other tasks,
which may be on the same transputer or elsewhere.  The
configurers accept a language like this:

	processor jim
	task fred ins=3 outs=5 data=20k
	place fred jim

Inmos are currently shipping a variant of our C V1.3 with some
additions to better integrate it with their D705 toolset. 

Microway sell both of OUR C compilers as described above, but
also a "badged" Logical System toolkit, making a total of three
from them at the moment.  This is also true of CSA, although I
think they mention Logical Systems by name rather than badging.

Penguin have changed their name to Pentasoft Corporation.  This
compiler is used by the Trollius (previously Trillium) operating
system, I believe.

Well, as I said at the top, I hope that people will regard this
as helpful rather than simply an advert.  If, on the other hand,
you want some more information, you are welcome to contact me.

	-- Ian Young, 3L Ltd.

J.Wexler@edinburgh.ac.uk (11/19/88)

Here follows the first (and perhaps only) report on my investigations into C
compilers. (I also asked about debugging facilities, and I may get around to
reporting on that topic in a week or so.)

Many thanks to all who responded to my request for information.

I should have asked, but I didn't, what kind of model of concurrency is provided
by each implementation: occam-like, Unix fork-and-join, Ada tasking, ... ?

I will summarise below what I think I have learned. I am not sure that I always
understood correctly what people were telling me, so I will append extracts from
the original messages that I received.

Patrick van Renterghem has already published much of the information through
this group, and I cannot summarise it or present it better than he has done.

Much of my own information is incomplete or unconfirmed.  This is indicated by
phrases such as "believed to be" and "I suppose".  I'd be grateful for any more
details or corrections which you can supply.

    John Wexler
    Edinburgh Concurrent Supercomputer Project
________________________________________________________________________

Penguin, Pentasoft and Unidot are the same.  They have only a very few "compiler
escapes" for low-level use of Transputer features - i.e., below the level at
which occam operates, and more like the things one could do in assembler. These
are not the sort of things that would normally be recognised as "language
extensions".  You think and program in "ordinary" C.  You aren't expected to use
the "compiler escapes" either, because MACROS are provided which use the
"escapes" to do all the useful occam-like things.

Cornell's Trollius uses this compiler.  They have written a library of
functions to handle concurrency, and these functions use the macros which
in turn use the compiler escapes.

Logical Systems and Definicon compilers are the same.  It has a very good
reputation for performance.  It uses a library of functions to support
concurrency; the language itself is standard and unextended.  However, the
compiler recognises many of the special functions as intrinsics, and generates
in-line code for them.  There are actually TWO sets of functions, to support two
different models of concurrency.  One gives an occam-like style (PAR, PRI PAR,
ALT, etc.), and the other is more like forking and joining with semaphores and
so forth.  I don't know what happens if you mix calls on the two sets of
functions.  Another source told me that "the Definicon compiler does have
language extensions", but I suppose that he was referring to the special
intrinsic functions. I believe this compiler is marketed by Micropar (who?).
It is a cross-compiler, supplied as C source code to run on a system of your
choice.  It does not generate modules compatible with Inmos' linker.

3L parallel C has no syntactic extensions, so programs are lint-checkable. It
does have a special type for channels, "but it's really just a pointer".
Concurrency and message-passing are handled by a library of special functions.
The mechanism distinguishes two kinds of process, light- and heavy-weight.
Light-weight processes share code and data space (but not stack), and I suppose
that they are roughly the same as the things you would group under PAR in occam.
Heavy-weight processes seem to be more like the things you control with
PLACED PAR: they have to be configured by a special language outside C.
The compiler comes with a nice "flood-fill loader" which will rapidly load
a copy of a piece of code onto every processor in any network, automatically
supplying all the necessary code to implement a task farm.  This means that
you don't have to program a task farm yourself, and your compiled code is
usable without modification on any configuration on Transputers.

This compiler seems to be used by lots of people, and is marketed by Microway.
Microway also sell the 3L(ex Lattice Logic) straight C compiler (see below),
which causes some confusion. I have heard that they even sell yet another
version of C, but I don't know whether that is true, and I certainly don't know
which one.

3L also do a straightforward non-parallel C compiler for Transputers.  This is
quite distinct from their parallel C. Originally it was a Lattice Logic product.
Inmos' C is this one.

Renishaw Controls have written a C compiler which is used on Meiko systems. This
is another more or less standard C which uses a library of functions to provide
control of channels and concurrency.  It is also usable in a style favoured by
Meiko in which one writes straightforward sequential procedures in C, and one
calls them from a main program written in occam and called a harness.  You can
write your own harnesses, but the good news is that you can get pre-written
harnesses which implement useful general styles of concurrency such as
task-farming.

Parsec is a Dutch company who have a parallel C compiler which is marketed by
Parsytec (who are not the same people at all).  The language is called Parallel
C, and it really does have language extensions.  It includes all of K&R C, with
H&S extensions, but it also embodies the occam concurrency features in the
language.  This seems to be the only implementation which takes such a bold
line. This compiler comes with a loader which automatically analyses any network
of Transputers while loading is going on, and leaves a complete "map" of the
network in the memory of every processor where the application program can find
it.

I have no information about Norcroft.

I have not heard of any other C compilers.  I haven't followed up the story
of who uses or sells whose compiler and what names or badges they attach to
the compilers.  There is still a lot of confusion to be cleared up in that
area.
________________________________________________________________________
Several contributors included a disclaimer such as "Any statement appearing here
represents my own opinion and should not be construed as any sort of official
position or opinion of my employer."
________________________________________________________________________
Steve Otto (Southampton) OTTO@UK.AC.SOTON.ESP.V1
writes:
"I think that the Logical Systems C compiler and the Definicon "parallel" C
compiler are one and the same....Parasoft at Caltech would know for sure.  This
compiler gives one the comm channels via subroutine calls."
________________________________________________________________________
Moshe Braner
Cornell Theory Center, 265 Olin Hall,
Cornell University, Ithaca, NY 14853
(607) 255-9401	(Work)
<braner@tcgould.tn.cornell.edu>		(INTERNET)
<braner@crnlthry> or <braner@crnlcam>	(BITNET)

writes:
"Penguin, Pentasoft, and (now) Unidot are all the same: This compiler is based
upon the Unidot modular compiler setup, with a transputer code generator, etc
added by Pentasoft (formerly called Penguin).  Unidot recently bought it back
from Pentasoft.  This compiler does not support the transputer features in any
way that comprises language extensions except for a few that may be called
'compiler escapes':
      ABCregs(a,b,c) (b&c optional) -- fill in the CPU regs
                                       with the value of vars.
      asm("blah blah")              -- inline assembly.
Together these allow for neat macros like:
#define in(c,b,n)                   ABCregs(c,b,n);asm("in")
Supplied macros (?) include in/out, ldtimer, stpri, etc.

"Of course, we at Cornell have implemented the Trollius OS, with its support for
parallel processing, as library functions.  They are almost entirely in C, with
occasional usage of in(), etc."
________________________________________________________________________
Chris Brown, A.I. Vision Research Unit, Sheffield University 
(chris@aivru.sheffield.ac.uk)

writes:
"For the 3L Parallel C compiler:

  (a) has a special type for channels? Yes there's a typedef for CHAN
                                    but they're just pointers really.
  (b) does input by
      (1) evaluating the name of the channel as if it were a variable
      (2) by a function call  <---- YES
      (3) some other way
  (c) does output by
      (1) assigning to the name of the channel as if it were a variable
      (2) by a function call  <---- YES  
      (3) some other way
  (d) has special constructs for PAR and ALT, or uses special functions?
      ... It has special functions for creating "threads" - i.e.
      lightweight processes which share code and data space (but not
      stack!). There are functions to implement sempahores to allow
      threads to safely share buffers, channels, etc.
      ... It has heavyweight processes, more like unix processes. These
      are bound together by a separate configuration language (not C).

      3L Parallel C has NO new syntactic constructs, so you can use
      programs like lint on the code."
________________________________________________________________________
Kirk Bailey <bailey@edu.orst.cs.mist>
writes:
"Several notes: the Pentasoft and "Penguin" compilers are one and the same!
Pentasoft is the current name of the company (Dwight VandenBurghe is the owner/
programmer).

I also have some anwsers to your questions about the Logical Systems "C"
compiler (which I'm a co-author of).

1. It uses functions calls for channel I/O and par/alt concurrency.  It
does however treat many of the functions as "intrinsics" and generates basicallythe same in-line code sequences that OCC
AM uses (ignoring differencies in
activation record layout, etc.)

2. In addition to the OCCAM-style PAR, PRIPAR, ALT, etc.  The "C" library
also includes a UN*X like concurrency paradigm based on the "fork"/"join"
model (plus semaphores, priority switch routines, etc.)"
________________________________________________________________________
Jerry DeLapp <jxdl@gov.lanl>
writes: 
"I'm not sure, but I think that the Penguin and Pentasoft are the same thing...

"I don't think the Penguin handles channels at all... At least, we had to write
our own libraries to handle them in Tcode (from C) and occam."
________________________________________________________________________
Robert Virding
UUCP: rv@erix.se or {decvax,philabs,seismo}!mcvax!enea!erix!rv
MAIL: Computer Science Lab. EUA/SU
      Ellemtel Utvecklingsaktiebolag
      Box 1505
      S-125 25 Alvsjo
      SWEDEN

writes:
"I'm afraid I can't help you with information about concurrency in Transputer C
compilers. the only one I've used is 3L which has no such capabilites at all,
though it can read and write channels through special library functions.
Unfortunately there is no way to detect empty channel."

[I suppose this refers to the straight C compiler, not to parallel C.  JW]

iann@specialix.co.uk (Ian Nandhra) (05/24/90)

With the increasing number of 'C' compilers available for the
Transputer (but not it seems the T2 range), is there a
'C' user group??

I would also be interested to hear of others involved in embedded
systems development.

(Sorry for the repeat message, the first had someone else's .sig
and got scrambled en-route - foobar, sorry!) 

Regards.

Ian N.

-- 
Ian Nandhra, Specialix, Giggs Hill Rd, Thames Ditton, Surrey, U.K., KT7 0TR
{backbone}!mcvax!ukc!pyrltd!slxsys!iann          iann@slxsys.specialix.co.uk
Tel: +44-1-398-9422       Fax: +44-1-398-7122         Telex: 918110 SPECIX G
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<