
This file describes the installation 
of the CCSL compiler version 2.2.

######################################################################
# $Id: INSTALL,v 1.4 2002/09/18 15:35:02 tews Exp $
######################################################################


SYSTEM REQUIREMENTS

The CCSL compiler should run on any platform that is supported by
ocaml. That is, on any POSIX-compliant system as well as on MS
Windows and on the Macintosh, see
http://caml.inria.fr/ocaml/portability.html for details. I have
tested it on Linux (Debian and RedHat) and on SunOS 5.6. If you
compile it on any other platform, please drop me a note. 


PREREQUISITES

you need:
   - GNU make, available at http://www.gnu.org/software/make/
   - ocaml, available at http://caml.inria.fr/ocaml/
     (ocaml version 3.x is sufficient)
   - either PVS or Isabelle/HOL,
	PVS is available at http://pvs.csl.sri.com/
	Isabelle is available at http://isabelle.in.tum.de/

   Strictly speaking neither PVS nor Isabelle/HOL are necessary
   to run the CCSL compiler. But the compiler will be pretty much
   useless without one of the theorem provers.



INSTALLATION MODES

There are two installation modes: ``proper'' installation and 
``inplace'' installation. ``Proper'' installation copies the compiled 
binaries and library directories to a central location, typically 
below /usr/local/. After a proper installation you can delete the 
source code tree. 

``Inplace'' installation does not copy anything, it only compiles 
the sources. Afterwords you can copy the compiled binaries to any place 
you like. However you should not delete the source code tree because 
the compiler relies on the directory Lib/Pvs (see also 
Option -fixedpointlib in the man page 
and ``Why is configuration neccessary?'' below).

Proper installation is the default if you got the tar file 
distribution. You get also proper installation with the --prefix 
switch for the configure script. Inplace installation is the default 
in the CVS source tree. You can request inplace installation via
--inplace.


INSTALLATION INSTRUCTIONS

1. untar the sources

   zcat ccsl-2.2.tar.gz | tar -xf -

   or

   tar -xzf ccsl-2.2.tar.gz

2. configure the sources, start

   cd ccsl-2.2
   ./configure

   This checks for ocaml and sets the installation directory. 
   The "configure" script accepts the following parameters:

   --bindir=DIR                           (default /usr/local/bin)
	sets the directory where the compiler will be installed.

   --libdir=DIR                           (default /usr/local/lib/ccsl/pvs)
	sets the directory where the PVS support library will be
        installed. 

   --mandir=DIR                           (default /usr/local/man)
	directory for the man page

   --prefix=PREFIX                        (default /usr/local)
	Set the prefix for --bindir, --libdir, and --mandir.
	--prefix=DIR is equivalent to
	--bindir=DIR/bin --libdir=DIR/lib/ccsl/pvs --mandir=DIR/man

   --help
	prints usage information

   --cache-file=FILE
	cache results of configure in FILE. Defaults to
        "config.cache". If you want to (re-) configure without using
	the cache do --cache-file=/dev/null.

  --inplace               
	install in place (set libdir to ./Lib/Pvs), see INSTALLATION 
	MODES above.

   
   In case the "configure" script fails:
    - edit the top section of ccsl-2.2/Makefile. 
    - edit Common/config.ml 
    - copy Doc/ccslc.1.in to Doc/ccslc.1 and substitute the PVS
      library directory for the string "@mllibdir@".
   
   [
    Why is configuration neccessary?

    Configuration is neccessary because of the following:
    The output of the CCSL compiler depends on a PVS library. The
    location of the library is hardwired in the output. To get it
    right, you can either put the right location into Common/config.ml 
    (either via the "configure" script of by editing) or use the
    command line switch -fixedpointlib.
   ]

4. compile

   make all

   This creates the CCSL compiler ccslc in subdirectory Ccsl. You
   can run it via

   ccslc -fixedpointlib <location of fixedpoints.pvs> ...

5. (optional) If your system supports the ocaml native
   code compiler you can built the optimised CCSL compiler
   ccslc.opt via

   make opt


6. (recommended) Install

   make install


   Installation creates the following files:

   in directory BINDIR

      ccslc
      ccslc.opt

   in directory LIBDIR

      fixedpoints.prf
      fixedpoints.pvs


