CONTENTS OF PRELIMINARY DISTRIBUTION OF RISC OS PORT OF SB-PROLOG 3.1
---------------------------------------------------------------

(RISC OS sub-version 0.2)

WARNING WARNING WARNING:  Read all of this document before trying to use
SB prolog!

!sbp    -       An application directory for prolog system.  If you have Acorn's
                Desktop development environment installed, or use RISC OS 3,
                running this should open a taskwindow running sbp (see below).

sbp     -       Script running SB-prolog configured for general purpose use on
                4M byte Arc.
sbs     -       Script running small SB-prolog (too small to run compiler)
                suitable for 2M machines.
sbpc    -       Script running SB-prolog configured with (roughly) minimum
                size memory areas large enough to compile sizeable Prolog programs.

bench   -   Some nice benchmarks to check out SB-prologs performance

MANUAL -      Ascii text version of the SB-Prolog manual

MANUALps -   Postscript version of the SB-Prolog manual
 
Command Line Option arguments to sbprolog
--------------------------------------

The sbprolog interpreter is invoked from the RISC OS command line with 
a command of the form

sbprolog  <option> ... <compiled_prolog>

where <compiled_prolog> is the name of a file containing compiled SB prolog
and <option>s are command line arguments of the form:

-T generate trace at entry to each called routine
-d generate disassemled dump compiled file given as last argument
-n adds machine addresses to traces and or dumps
-s Makes the interpreter take more care of maintaining the statistics printed
   out by the predicate ``statistics''.
-m <size> Sets the extent of the Prolog stack area to <size> entries each
          entry requires 4 bytes of memory

-p <size> Sets the extent of the Prolog program area to <size> entries.  Each
          entry requirs 4 bytes.

-b <size> Sets the size of the Prolog backtrack trail area.  This is set to
          the -m value divided by 5 by default.

When sbprolog runs it expects the operating system SIMPATH to contain
search path telling it where to find the various compiled prolog libraries
it needs to run.    This is usually set by the !boot file in !sbp, but if !sbp
is not in a directory mentioned on your Run$Path you will need to set it
manually or open the directory containing !sbp.

DIFFERENCES FROM UNIX VERSION DESCRIBED IN ``MANUAL''
------------------------------------------------

1. The pathnames in the search path given in by the variable SIMPATH are
seperated by ;'s rather than :'s as in the UNIX version.   This is because :'s
frequently appear in full RISC OS pathnames.

2.  Some massaging is done of the pathnames submitted to the ``load'' command.
    $'s are stripped out and the final filename in the path truncated to ensure
    it is no more than 10 characters long.

        These modifications are necessary to allow the SB-prolog's autoloading
    mechanism to work properly.   SB-prolog uses the name of a module
    that needs to be loaded as the filename of the file that is supposed to
    define that module.  Unfortunately, because under UNIX filenames can be
    very long, and may contain $'s these the writers of SB prolog used long
    module names and a convention of prefixing module names
    (and internal predicate names) with $.   Changing all this in the source code
    would be a nightmare, and since all the names were  unique in the first 10
    characters after the $ I decided to hack filenames instead.

    Thus: when building new auto-load modules it is important to ensure they
    are given names that differ in the first 10 characters (ignoring $'s) from
    any other module name.

    3 New Predicates have been added.

$riscos( +PathName, +Prefix, -NewName )

        Given a string PathName "d1.d2. ... .dn.filename" and a string Prefix this
predicate succeeds with NewName "d1.d2. ... dn.Prefix.filename". 

seenall

        Does a ``seen'' on all files currently open for input (except for standard
        input, output, and error streams).   Useful for closing files left open
        after an error during consultation / compilation.  RISC OS, remember,
        locks out any modification of open files.

toplev

        Does the same as ``seenall,abort''.  Useful for dropping back to the
        level 0 command prompt after interrupting a compilation or consultation.

If you have troubles - drop me a line (preferably by email!)

Andrew Stevens
18 King's Meadow
Overton
Hampshire
RG25 3HP
Great Britain

Andrew.Stevens@prg.oxford.ac.uk
