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.