
Instructions for Installation of the BELIEF package:

1) Using FTP copy all of the .lisp files in this directory to your
system.  The programs in the belief package are available via
anonymous ftp from hustat.harvard.edu.

2) Copy the .rules files to your system, these provide sample rule
bases to test the system.

3) Copy the using-it.tex and making-rules.tex files to your system.
These are the instructions for the program.  If your system does not
support TeX, copy the .ps files instead.  These are postscript version
of the file which can be sent directly to any postscript printer.

4) Copy the files INSTALLATION, FILES, COPYRIGHT, VERSION and
DISTRIBUTION to your machine.  It is required that you copy the file
COPYRIGHT!  

5) If your machine supports GNU emacs, you may wish to copy the files
TAGS and ChangeLog which will help you modify the system.

6) Edit the lisp-init.lisp file to show the home directory of the
BELIEF package on your system.  If you changed the names of the files
lisp-init.lisp or belief-init.lisp to reflect your operating systems
naming conventions you should edit the (require 'belief-init) call.

7) Compile the c program rng.c which provides the random number
generator for the simulator (note: it is perfectly possible to run
many routines without the random number generator, but for the Monte
Carlo algorithms, you will need it).  Edit the file bymachine.lisp to
reflect your location for the file rng.o.  Note:  for Common Lisp
Implementations other than Lucid, Allegro, and Kcl, you may need to
modify the code it bymachine.lisp

8) Test the program by running some of the sample data bases.  The
correct results from the smoker and smokepot data bases are given in
Lauritzen and Spiegelhalter[1988].  The correct results from failure2
are given in Dempster and Kong[1988].  The correct results from
captain are given in Almond[1988,1989].  All of these rule bases,
except for smokepot should be loaded with load-bel.  smokepot should
be loaded with load-prob.  smokepot is currently the only test data
base using the potential mode.  

If there are no errors, then you may go on to the next step.  If there
are errors, it is due to incompatibilities between lisp versions.  I
would appreciate mail (to almond@stat.washington.edu) describing any
problems.  Unfortunately, you will probably need to debug them
yourselves.

9) You may consider the program installed at this point, however, it
will work much faster on your system if you compile it.  Edit the file
compilation.lisp to reflect local compilation options, and then run it
(using load from inside lisp).  Note that this must be a version of
lisp which loaded lisp-init.lisp because the compiler will need the #?
and #! read macros.  If you have difficulty compiling, it may be
because these need to be defined at the top of the input files for
your version of lisp.  Copy the set-dispatched-etc command from the
belief-init file to the other files.  If you succeed in compiling
these files, then you should edit the lisp-init file to load the
compiled rather than the interpreted versions of the commands.

9) Good luck!  I will try to answer any questions sent to
almond@stat.washington.edu

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

Known incompatibilities between lisps which effect the BELIEF package.
The following "feature" was found in VAX Common LISP which caused the
need to patch certain portions of the code dealing with potentials.  

The function (map '(vector long-float) #'* vec1 vec2) where vec1 and
vec2 are of type (vector long-float) yields and answer which is of
type (vector t).  Furthermore, in VAX Common LISP (coerce '(vector
long-float) x) where x is of type (vector t) returns an object of type
'(vector t) which is in spec for the coerce statement but kind of
sleazy.  To get around this problem, I have used the expression 
(coerce '(vector long-float) (map 'lisp #'* vec1 vec2)).  
This is found in the functions prod-array and renormalize array in the
potentials file.  If your lisp somehow lacks this "feature", you may
wish to edit this to reflect the more straight forward (map '(vector
long-float))

SUN Common LISP (at least version 2.0 which I have) neatly finesses
the operation by not supporting long floating point numbers.  
It appears to work correctly in Kyoto Common LISP.

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


Allegro Common Lisp: there are some problems with the global versus
process local redefinition of input read characters.  The file
franzinit.lisp is the version of the lisp-init file I genertated to
deal with this problem.  


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

I have not currently debugged the simulation stuff in probability
mode.  I hope that nobody will have any problems with it.



	--Russell 

