PORTABLE PROLOG INTERPRETER Release 1.5. March 1983. J.M. Spivey, Software Technology Research Centre, Department of Computer Science, University of York, Heslington, York, Y01 5DD, England. This program is a portable interpreter for the predicate logic programming language Prolog. It is written in Pascal which conforms to the ISO standard. The following features are not used: conformant array schemas, procedural and functional parameters, set types whose base type has cardinality larger then 8. The text files 'prolib' and 'prog' should be associated respectively with the Prolog system initialization file and a file containing a Prolog program. The structure of the program is as follows: [1] Line Buffer and Error Handling. [2] Trail. [3] Stack Mechanism. [4] Transformations. [5] Atom Table. [6] ReadIn. [7] WriteOut. [8] Database. [9] Unify. [10] Execute. [11] Evaluable Predicates. [12] Top Level. Under control of the top level [12], Prolog clauses are read by ReadIn [6] and added to the database by AddClause [8]. Goal clauses are executed by an abstract machine consisting of a finite state control, Execute [10], and a pair of stacks [3]. Unify [9] matches goals against clauses in the database and introduces variable bindings. Interpreter primitives are invoked by means of the evaluable predicate mechanism [11]. The following changes are likely to be needed when this program is installed on a new machine: (i) The value of 'ordmaxchar' (and, exceptionally, that of 'ordminchar') in the outermost constant declaration must be adjusted. (ii) The assignments to the array 'CharClass' in InitRead [6] must be adjusted allow for extra white-space characters such as TAB. The positioning of syntax error pointers in Moan [1] and the evaluable predicate 'get' in prolib must also be adjusted. ... *)