CORAL is an experimental logic-programming language implemented using bottom-up techniques. This document describes how to install and run CORAL. We have successfully installed CORAL on DECStations and SUN 4 and SPARC workstations. The current release of CORAL contains executables for DECstations and SUN4 machines, and complete source code. In order to compile CORAL, the ATT C++ compiler (version 2.0 or later) is required. We will soon release a version of CORAL that is compatible with g++ too. In case you run into problems with CORAL, send mail to coral@cs.wisc.edu. Installing CORAL ---------------- The first thing to do is to get access to the CORAL system code. If you are reading this, it is most probable that you already do have the code too. However, just in case you bought this installation document in its bestselling paperback edition from your local bookstore :-), you should know that CORAL is available by anonymous ftp from ftp@cs.wisc.edu. The file that you ftp over is a 'tar' file called coral.xx.tar.Z (the xx is the release version). To set up CORAL on your machine, you need to store the tar file in an appropriate directory, and then do the following : --- execute the following command: ``zcat coral.xx.tar.Z | tar xvf -''. (Alternatively, ``uncompress coral.xx.tar'', followed by ``tar xvf coral.xx.tar''.) Now a whole directory system should have been created with the root of the system called `coral'. All the directories listed below will have been created : coral coral/bignum coral/bin coral/doc coral/explain coral/EXAMPLES coral/help coral/includes coral/interface coral/magic coral/persist coral/persist/exodus coral/src The directory `coral' is the root of the CORAL system, and there should be an environment variable called CORALROOT which has the value of this root directory. For example, CORALROOT=/usr/coral At this stage, you should add this to your environment using `setenv', and also make the change to your .cshrc file so that it gets done automatically in the future. Also, (CORALROOT)/bin should be added to your PATH variable. This is very important, since all the CORAL executables reside in the CORAL/bin directory or have links in it. Also, the test scripts to be run use csh, and so will read the .cshrc file. There are a couple of startup files in the (CORALROOT) directory that are important. One is .coralrc, which is read and processed initially by the CORAL interpreter. We recommend that you put in your favorite CORAL alias definitions in the .coralrc file. The other file is .sm_config which is used to configure the EXODUS storage manager. Both these files should be moved to your HOME directory. Using distributed executables ----------------------------- If you do not wish to recompile CORAL, and would simply like to use the executables in the release, here's what you need to do : cd to the (CORALROOT) edit the file 'makefile' and ensure that CORALBIN is set to CORALROOT/bin/SUN4 or CORALROOT/bin/MIPS, depending on the type of machine you are working on. type `make'. This installs the executables, and CORAL is ready to use. After this you can ignore the rest of the installation document, and look only at the section on running test scripts. You should be aware that the executables supplied with the release have been compiled without support for persistent (Exodus) relations. Changing default configurations ------------------------------- The default configuration of the CORAL system is controlled by a set of default definitions in the file (CORALROOT)/includes/config.h. It is remotely possible that you might want to change certain parameters before compiling. However, we recommend that before you attempt to do so, you undertand the use of the defaults in the code, and the effects of modifying them. It should not be necessary to modify any of these values unless you intend to extend the system to some significant degree. In any case, most of these defaults can be changed from the CORAL prompt, and commands to change them can be included in the startup .coralrc file. Once you have CORAL up and running, you can type 'help(defaults).' to get information on how to change the default values. Using EXODUS for persistence ---------------------------- At this stage, you should be aware that CORAL can be used with or without persistent relations. The conditional compilation can be controlled by setting some flags in the makefiles (see next subsection). The persistence is built on top of the EXODUS storage manager, which is a separate piece of software, also available from UW-Madison at ftp@cs.wisc.edu. However it is your responsibility to obtain and install EXODUS in the (CORALROOT)/persist/exodus directory. Once it is set up, this directory should contain the following files : sm_client.h lib_smclient.a formatdisk formatvol formatlog sm_server diskrw The first time around, you will need to use formatdisk and formatlog to initialize your disk file and log file used by CORAL. After that, you need to run sm_server, which is the EXODUS Storage Manager. You could try using `start-server' to run sm_server : this is a script of ours that tries to set some of the defaults needed. However, for this part of the installation, and for the use of the .sm_config file, we recommend that you refer to the EXODUS Installation Manual that is part of its ftp package. If the Storage Manager is up and running, the CORAL interpreter will automatically connect to it, provided it has been compiled to support persistent relations. Options in Makefiles -------------------- In order to specify options to any makefiles, you only need to modify (CORALROOT)/make_include. This file is included in all the other makefiles. The (CORALROOT)/make_include file contains comments explaining the use of every flag and makefile variable. One important point to note is that CORAL can be compiled with or without persistence. As an aside, the `make_include' flags can also be used to specify whether to use Lex as the scanner, or Flex (GNU scanner available by anonymous ftp from MIT). We recommend that you install Flex and use it instead of Lex. However, we have provided a set of defaults that should require little modification. Space Requirements ------------------ Note that the files that you have just untarred take upward of 20 M of disk space. When you start compilation, the entire system can grow to around 40 M, if compiled without the -g flag (as is the default), and can grow to 70M if compiled with the -g flag. However, much of this space is occupied by .o files than can be deleted if space is a problem. Also, the executables can be stripped to reduce space utilization. The size of the coral executable is around 1.15M when compiled with the debug flag. If the coral executable is stripped, incremental loading is not possible (refer to the user manual on this one). All these figures refer to compilation on the DECstation 5000. The figures on a SUN4 machine are slightly lower. Note that these figures do not take into account the space required for the Explain tool, which is based on Interviews, and could take upto 5M without the -g flag. Compiling CORAL --------------- Once you have got to this point, all that remains is to install the system. To do this, cd to the (CORALROOT), and type `make install'. This will start a compilation of the entire CORAL system (which will take quite a while : approx. 40 minutes on a DECStation 5000). When it completes, you have CORAL compiled and ready. Running test scripts -------------------- At this stage, we recommend you run the `test_suite' that sits in the (CORALROOT)/EXAMPLES directory. This is run by typing the commands : cd (CORALROOT)/EXAMPLES test_suite This might generate some warning messages, but there should be no error messages. The entire `test_suite' should run in a few minutes. There is also another test_suite in the (CORALROOT)/doc/manual/examples directory. This is run by typing the commands : cd (CORALROOT)/doc/manual/examples test_suite If you run into any problems in reaching this point, send mail to coral@cs.wisc.edu, and we'll try to fix it asap. Otherwise, the CORAL manual and overview documents should carry you on from here. Using EXPLAIN ------------- This release of CORAL is accompanied by an 'Explanation Tool' that resides in the (CORALROOT)/explain directory. This tool allows one to graphically visualize the execution of a CORAL program. It is based on InterViews which is available by anonymous ftp from interviews.stanford.edu. There are independent installation instructions for it in the file (CORALROOT)/explain/Installation. There is also a README file in (CORALROOT)/explain/ that contains further information on the Explain tool. We hope you enjoy using CORAL; your feedback would be appreciated. If you extend CORAL, and want to make your changes available to the world, get in touch with Raghu Ramakrishnan.