From: C M Brough <cmb@epcc.edinburgh.ac.uk>
Subject: Re: Pascal validation suite wanted
Reply-To: C M Brough <cmb@epcc.edinburgh.ac.uk>
Organization: Edinburgh Parallel Computing Centre
Date: Mon, 11 Jan 1993 12:15:50 GMT
Keywords: Pascal, standards

The Moderator writes:
> [Are there any actual ISO Pascal compilers around? -John]

How about the SPMI (Standard Pascal Model Implementation)? It was written
by Jim Welsh and Atholl Hay, in Standard Pascal, while they were at the
University of Manchester in the early eighties. The copyright is
University of Manchester, 1984. I don't know about the availability of it
- we have a copy courtesy of Atholl Hay, for the purpose of a student
project - looks like you might be able to get it from the BSI (British
Standards Institution). From reading the documenation it sounds like you
might get a validation suite from the same place.

Here are some relevant extracts from the documentation:

                ----------------------------------------

INTRODUCTION 
 
The following programs comprise a Model Implementation of Standard Pascal
which conforms completely to the ISO definition of the language. Its
development and distribution is intended to demonstrate that the
requirements of the Standard can be met fully, particularly those relating
to the detection of errors, and to illustrate techniques that may be used
to do so.

The Model Implementation has been developed in close collaboration with
the team responsible for production of the Pascal Validation Suite.  In
fact the Model Implementation and Validation Suite are complimentary in
the sense that passing every test in the Validation Suite has been a
minimal requirement for the Model Implementation throughout its
development, and experience with the Model Implementation has helped to
eliminate several inadequacies in the Suite and to suggest additional
tests for inclusion in it.

The following paragraphs provide an overview of the complete system
together with notes for its initial installation.
 
OVERVIEW 
 
The Standard Pascal Model Implementation is an implementation of Pascal
which conforms completely to the ISO standard definition of the language.
It consists of five programs each of which is itself written in ISO
Standard Pascal:
 
(a)      a model compiler which enforces  all  mandatory  requirements
	 of the Pascal standard on each program input to it, 
         and generates an equivalent 'P-code' object program; 
 
(b)      a P-machine which interprets a P-code program to simulate 

         its  executable effect, including detection of all errors 
         defined by the Pascal Standard; 
 
(c)      a post-mortem generator which examines the 'corpse' of an 
         executed  P-code program to determine its cause of termi-
         nation and to re-create  the  program's  final  state  in 
         source-language terms; 
 
(d)      a disassembler which displays  the  generated  P-code  in 
         symbolic form; 
 
(e)      an installation 'help' program. 
 
In preparing these programs the style and format of a book has been
deliberately adopted. Thus partitioning code and documentation into
'chapters' provides an informal modular structure and illustrates the
extent to which this can be achieved within the syntactic limits of
Pascal. 
 
The Model Compiler is a conventional one-pass Pascal compiler comprising a
machine-independent program analyser cleanly interfaced to a target
machine-dependent code generator. It accepts an ISO Standard Pascal source
program and generates an equivalent P-code object program for interpretive
execution on the P-machine. A high degree of run-time security is provided
by generating error-checking code for each of the distinct errors defined
in the Pascal Standard.

...

The P-machine program should be regarded as an operational definition
rather than a production interpreter. Being written in Pascal, it relies
on a host Pascal Processor for all arithmetic functions and fixed and
floating-point I/O. If these host functions are deviant, the Model
Implementation may exhibit deviant behaviour also. Moreover, an
implmementation of files and program parameters cannot be given a general
expression in Standard Pascal.  In this version of the Model
Implementation, the P-machine provides communication with the external
environment only via the program parameters Input and Output, and allows
limited creation of 'local' files by means of a simulated filestore.  This
limited capability is sufficient to enable all programs in the Pascal
Validation Suite to be run. 
 
...
 
VERSION 4.1 
 
This tape contains version 4.1 of the SPMI. This version fixes all known
bugs in version 4.0, provides a standard conforming implementation of
for-statements, and improves checking of pointer variables and
buffer-variable references.  It is intended to be fully compatible with
version 4.1 of the Pascal Validation Suite. 

 
TAPE FORMATS 
 
Tapes supplied by the British Standards Institution (BSI)...

...
 
LICENCE 
 
By agreement, the SPMI is distributed by BSI or BSI's local agents on
UMIST's behalf.  In some countries, signature of an SPMI licence is a
condition precedent of its release and use. 

...
 
ACKNOWLEDGEMENTS 
 
The Model Implementation has been derived chiefly from Pascal
implementations developed at the Queen's University of Belfast, which in
turn were influenced by early Pascal implementations from ETH Zurich.  As
for many implementations, it would be impossible to attribute exact
authorship of the various techniques used, and due acknowledgement is
hereby made of all contributions and influences that may be detected.
Deserving of special mention however, are Urs Ammann and his colleagues at
ETH Zurich, Andy Mickel and his colleagues at the University of Minnesota,
Bill Findlay and David Watt at the University of Glasgow, and the
long-serving compiler-team members in Belfast, Colum Quinn, Kathleen
McConnell and Dave Bustard, who may recognise many identifiers and code
fragments in the Model Compiler as their own. Finally, we are grateful to
Brian Wichmann and his colleagues Peter Wilkinson and Guy O'Neill at NPL,
for their collaboration, support and patience in testing the Model
Implementation against the Pascal Validation Suite. 

Jim Welsh and Atholl Hay 
January 1984 

__________________________________________________________________________
Colin Brough    cmb@epcc.ed.ac.uk      Edinburgh Parallel Computing Centre
-- 
Send compilers articles to compilers@iecc.cambridge.ma.us or
{ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.