Berkeley Pascal PXP Implementation Notes

Version 1.1 - April, 1979


William N. Joy*

Computer Science Division
Department of Electrical Engineering and Computer Science
University of California, Berkeley
Berkeley, California 94720


ABSTRACT

Berkeley Pascal is designed for interactive instructional use and runs on the PDP 11 family of computers. A version of pxp for the VAX 11/780 is nearly complete. The Pascal execution profiler pxp can be used to generate restructured source program listings which are annotated with counts of the number of times each statement in the profiled parts of the program was executed for a particular run of the program. A number of options of pxp provide easy control over the parts of the program to be profiled. pxp can also be used to produce restructured program listings, i.e. as a pretty-printer.

The PXP Implementation Notes describe the design decisions which lead to the present form of pxp and give details of the internal organization. The notes conclude with thoughts on similar facilities for future systems.

Introduction

This PXP Implementation Notes consists of four major sections. In the first section we outline the design considerations which led to the present pxp . Section 2 describes the implementation, with the comment reformatting process described separately in section 3. Comments on the viability of the current approach and the possible shape of future systems are given in section 4.

Related UNIX Pascal documents

The Pascal translator pi shares with pxp a common parser and error recovery routines, which is described in [1].

Pascal programs are currently interpreted by a program px as described in the PX Implementation Notes [2]. An understanding of the particular details of the interpreter is not, however, necessary to understand the workings of pxp .

The Berkeley Pascal User's Manual [3] gives examples of using pxp and is the general reference guide for the system.

Acknowledgements

Ken Thompson wrote the first version of Berkeley Pascal without which none of this would have been. Chuck Haley collaborated with the author on the Pascal system development and his help in teaching the author the ins and outs of UNIX was indispensable. The author's faculty advisor, Susan L. Graham, has been a source of much encouragement, support, and many helpful comments and suggestions.

* The financial support of an IBM Graduate Fellowship and the National Science Foundation under grants MCS74-07644-A03 and MCS78-07291 are gratefully acknowledged.