/*- * Copyright (c) 1980 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)READ_ME 5.2 (Berkeley) 4/16/91 */ This directory contains the source code for the Version 7 VAX interpreter for Pascal. Following standard convensions, the makefile contains four commands: px - compile px install - compile and install px in /usr/ucb clean - clean out directory print - print out a listing of px Bugs and Limitations: Runtime error messages could give far more information than they currently do. (eg the actual value of a subscript which is out of range) It should be possible to resume execution following many of the runtime errors. (eg fixed overflow, interrupt, etc) Comparison of Pascal with C compiler In an attempt to compare compiled versus interpreted execution speeds the 'Tower of Hanoi' benchmark (see hanoi.p, hanoi.c) was run with the following results: Data: number of disks: 16 number of moves required: 65535 Compiler, Flags Compile Compile Run Run Time Factor Time Factor Pi, full tests 0.4u+0.4s 1.0 42.7u 1.0 Pi, no tests 0.3u+0.3s 0.7 35.2u 1.2 Pc, unoptimized 3.8u+2.4s 7.7 5.3u 8.1 Pc, optimized 4.4u+2.3s 8.4 4.6u 9.3 C, unoptimized 1.7u+1.8s 4.4 2.8u 15.3 C, optimized 2.0u+2.0s 5.0 2.5u 17.1 Note: The times for Pc and C were obtained by running larger problems and scaling the run times down appropriately.