grunwald@uiucdcsb.UUCP (01/29/85)
[Duplicate postings in: net.lang, net.unix, net.lang.pascal]
Path Pascal Release 0.9
An initia release of the Portable Path Pascal com-
piler is available for distribution to all UNIX sites run-
ning 4.x BSD/VAX systems. The compiler is an extension of
the Berkeley Pascal Compiler 'pc' and produces native VAX
code. In addition to the standard Pascal features, Path Pas-
cal features processes, objects (an abstract data type
facility), synchronization via Path Expressions and a 'simu-
lated time' notion suitable for systems simulation. Path
Pascal is used at UIUC for simulation of concurrent systems,
both at an instructional and a research level.
Processes
Processes provide multiple control flows within a sin-
gle Path Pascal program. Process notation is similar to
that for procedures, and calling a process is syntactically
equivalent to calling a procedure. Processes may be nested
within other code bodies and communicate through synchron-
ized data structures call 'objects'. Processes size may be
specified on a per-process basis and there is no limit on
the number of processes other than memory size. Simulations
of network voting methods running with over a hundred
processes have been performed. Processes are dynamic mean-
ing that multiple instances of the same process may be
created simply by calling the process multiple times.
Objects
Objects provide a data encapsulation notation. An
object is a set of data declarations grouped with operations
on those data. Access to the data is only possible using the
defined entry points, provided the desired access meets the
restrictions imposed by the Path Expression for the object.
Objects represent a new 'type' construct similar to records
and may be separately compiled, promoting sharing of common
abstractions.
Path Expressions
Path Expressions provide a regular language description
of allowed concurrent access to entry points within an
object. Sequencing, resource restriction and derestriction
are defined in a notation which is directly translated to
semaphore P and V operations. These semaphore operations are
executed in the pre- and post-amble of entry points within
objects. An example path specification for a bounded-buffer
reader-writer protocol is:
path 100:(write;read) end;
This stipulates that no more than 100 pairs of 'write;read'
sequences may be going on at once at that each 'read' must
be preceded by a 'write'. If an operation is not allowed
by a Path Expression, the process requesting that operation
blocks until it is allowed.
Simulated Time
Processes may 'delay' a certain number of time units,
or they may 'await' some future time. The 'pc' call
'wallclock' has been changed to return the current 'simu-
lated time' as opposed to real time. This provides a global
clock suitable for systems simulation. In future releases,
using simulated or real time will be a run-time specifica-
tion.
The System
The compiler uses a modified front-end of the Berkeley
PC compiler, generating code which the local Portable C Com-
piler translates to native assembly code. It is possible to
call routines written in C and F77. The language is a
super-set of Berkeley Pascal. In addition to the compiler
itself, a runtime library and a debugging tool to anaylse
core dumps is included. This version has been in use at
UIUC as a simulation language for distributed voting sys-
tems, ethernet load simulation, processor simulation and the
like for several months. An older compiler has been used
extensively in Operating Systems classes to simulate con-
cepts such as process scheduling, file systems an so on.
Future Extensions
We intend to extend the language to a distributed pro-
gramming language, modeled around a previous implementation
[Distributed Path Pascal], using the SMI RPC protocol. A
version of the compiler running on the Sun workstation is
currently being constructed and should be available shortly.
Other directions will also be pursued as dictated by our
supporting grant.
Availability
The system is available free of charge by sending a
1600 BPI tape to the address below. The source is roughly
900Kb, with final binaries being about 300Kb. Proof of a 4.x
BSD license is required, as this work is built on top of the
Berkeley Pascal compiler. The license should clearly specify
if it is a source or a binary license. Sites which contact
us will be informed of future releases and bug fixes to the
best of our abilities. The address for tapes is:
Dr. Roy Campbell
199 Digital Computer Lab
University of Illinois
1304 W. Springfield
Urbana, Illinois 61801
All contacts for detailed information concerning the com-
piler, licensing, sample programs, documentation and the
like should be addressed to:
Dirk Grunwald
222 Digital Computer Lab
University of Illinois
1304 W. Springfield
Urbana, Illinois 61801
(217) 333-7937
{pur-ee, ihnp4} ! uiucdcs ! grunwald
grunwald@uiuc.csnet grunwald@uiuc.arpa
This work was supported in part under NASA grant NSG1471,
administered by Dr. Roy Campbell at the University of Illi-
nois.jlg@lanl.ARPA (02/01/85)
Interesting. I'll have to look more carefully at the release note. It doesn't look compatible with either ISO pascal or ANSI pascal (unless the phrase 'standard features' refers to one of these standards instead of J&W - I doubt it, some of the 'extensions' appear to contradict features of the two new standards). I don't fault the people who wrote this new compiler. They probably used the only standard which is really universal - J&W. Looks like they are ahead of the others anyway by allowing multitasking. J. Giles
ndiamond@watdaisy.UUCP (Norman Diamond) (02/04/85)
> Interesting. I'll have to look more carefully at the release note. It > doesn't look compatible with either ISO pascal or ANSI pascal (unless the > phrase 'standard features' refers to one of these standards instead of J&W > - I doubt it, some of the 'extensions' appear to contradict features of the > two new standards). I don't fault the people who wrote this new compiler. > They probably used the only standard which is really universal - J&W. > Looks like they are ahead of the others anyway by allowing multitasking. > > J. Giles Concurrent Pascal has been around for ages. It has supported multitasking for ages. It also was based on a different variation of Pascal, before ISO standardized it, and before J&W even published the second edition of their text. So, who's ahead of the game? -- Norman Diamond UUCP: {decvax|utzoo|ihnp4|allegra|clyde}!watmath!watdaisy!ndiamond CSNET: ndiamond%watdaisy@waterloo.csnet ARPA: ndiamond%watdaisy%waterloo.csnet@csnet-relay.arpa "Opinions are those of the keyboard, and do not reflect on me or higher-ups."
grunwald@uiucdcsb.UUCP (02/05/85)
Path Pascal uses Pascal as (a poor) vechicle for a concurrency language. Pascal
was chosen several years ago -- better choices could be made today. It's an
extension to Berkeley Pascal, so it has all their faults & extensions as well
as ones introduced by combining Path Expressions & processes. A sample program
with two processes (producer & consumer) follows. It simply uses a buffer to
pass '\0' .. '\127' between the two processes. Very stupid thing to do, but
it points out that this isn't intending to be yet another implementation of
Pascal.
program rw;
var
buff : object
path 1:(write;read) end; (* ye olde path expression *)
var datum : char;
entry procedure write(x : char);
begin datum := x; end;
entry funciton read : char;
begin read := datum; end;
end (* object *);
process producer;
var i : integer;
begin
for i := 0 to 127 do
buff.write(chr(i));
end;
process consumer;
begin
while (ord(buff.read) != 127) do ;
end;
begin
producer;
consumer;
end.jlg@lanl.ARPA (02/07/85)
> > [...] It > > doesn't look compatible with either ISO pascal or ANSI pascal (unless the > > phrase 'standard features' refers to one of these standards instead of J&W > > - I doubt it, some of the 'extensions' appear to contradict features of the > > two new standards). I don't fault the people who wrote this new compiler. > > Concurrent Pascal has been around for ages. It has supported multitasking > for ages. It also was based on a different variation of Pascal, before ISO > standardized it, and before J&W even published the second edition of their > text. So, who's ahead of the game? > Yes I know about Concurrent Pascal - I read Brinch Hansen's book on the language several years ago. In fact, I'm surprised that ISO or ANSI didn't adopt the features of Concurrent Pascal or at least introduce replacements for them. This is just more evidence that Pascal is very resistive to standardization. This even seems to be part of the reason: Pascal is popular but incomplete. Unforunately, the people who extend the language or try to standardize it don't talk to each other. I think this is also why Wirth didn't extend the language himself - his extensions to Pascal came out as a new language: Modula. At least with Modula there was no requirement to maintain backward compatibility. Now, is Path Pascal upward compatible from Concurrent Pascal? Is it upward compatible from J&W (either edition)? These are questions which implementors seem not to ask themselves until after they release their software (if then). J. Giles