
This file describes the installation of the CCSL compiler.

######################################################################
# $Id: INSTALL,v 1.14 2010-11-02 15:44:56 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 INSTRUCTIONS

1. untar the sources

   zcat ccsl.tar.gz | tar -xf -

   or

   tar -xzf ccsl.tar.gz

   This will create a directory ccsl-XXX, where XXX is the date of 
   the snapshot creation.

2. configure the sources, start

   cd ccsl-XXX
   ./configure

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

   --prefix=PREFIX                        (default /usr/local)
	Set the installation prefix. Binaries will bin installed in 
	PREFIX/bin, the ccsl man page in PREFIX/share/man/man1 and the 
	CCSL emacs mode in PREFIX/share/emacs/site-lisp.

	If you need more fine-grained control over the installation 
	directories, you can edit the variables in the top section in 
	the Makefile.

   In case the "configure" script fails
    - edit the top section of ccsl-XXX/Makefile. 
    - copy Doc/ccslc.1.in to Doc/ccslc.1 
   
   [
    Why is configuration neccessary?

    Configuration is not really necessary. It used to be back 
    in those days when CCSL used an external PVS library. 
    Configuration will speed up configuration if you have ocamlc.opt 
    available.
   ]

4. compile

   make all

   This creates the CCSL compiler ccslc in subdirectory Ccsl. 
   Run it like
   
     Ccsl/ccslc your-specification.beh

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

   make opt


6. Install

   make install


   Installation creates the following files:

   in directory PREFIX/bin

      ccslc
      ccslc.opt

   in directory PREFIX/share/man/man1

      ccslc.1

   in directory PREFIX/share/emacs/site-lisp

      ccsl-mode.el
      loop-compile.el


7. (recommended for emacs users) configure the ccsl emacs mode:

  Add the following lines to your ~/.emacs. Substitute the correct 
  location of the emacs lisp files if you changed the default location
  /usr/local/share/emacs/site-lisp.

  ;; Extend `load-path' 
  (setq load-path
    (cons "/usr/local/share/emacs/site-lisp" load-path))

  ;; Setup autoloading the `ccsl-mode'.
  (setq auto-mode-alist
    (cons '("\\.beh\\'" . ccsl-mode) auto-mode-alist))

  (autoload 'ccsl-mode "ccsl-mode"
    "Major mode for editing ccsl." t nil)

   