This directory contains source code for the prolog virtual machine simulator. The makefile compiles the executable code into the file sim in this directory. It assumes that the builtins have already been compiled (done by executing the makefile in the subdirectory builtin). The following describes the command line for executing the simulator: % sim [-Ttdns] [-m s_size] [-p p_size] [-b tr_size] pil_file_name -T: high-level trace of entry to each called routine. -t: low-level trace of every PIL instruction executed. (produces reams of output) -d: just produce a dump of the code in pil_file_name (not very useful these days.) -n: add machine addresses when producing trace and dump. -s: produce a statistics printout at each call: (again mucho stuff.) -m memsize : allocate memsize words (4 bytes) of space to the local and heap stack together. Default 100000 words. -p pspace : allocate pspace words of space to the program area. default 100000 (quite large). -b maxtrail : allocate maxtrail words of space to the trail stack. default (memsize / 4). This parameter, if specified, must follow the -m parameter. pil_file_name : the file containing the byte-code that is to be loaded and executed. It must be have been compiled by the translator. The first clause in the source file must define a 0-ary predicate. The body of that predicate is taken as the top-level query. This file normally contains the read-eval-print loop of the interactive prolog system, (see byte-code file lib/readloop and source lib/src/readloop.P for an example). This file could contain a program to handle interaction with other programs through pipes, if desired. The simulator does NOT check for stack overflow (a serious problem that someday we will have to deal with). Symptoms of stack overflow are: core dump, and illegal instruction error messages. You can use the 'statistics' builtin to see how much space you have used.