% BIOCHAM system http://contraintes.inria.fr/BIOCHAM/ % Copyright 2003-2011, EPI Contraintes, INRIA Paris-Rocquencourt, France % % This program is free software; you can redistribute it and/or % modify it under the terms of the GNU General Public License % as published by the Free Software Foundation; either version 2 % of the License, or (at your option) any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. % % INSTALL file BIOCHAM can be downloaded from http://contraintes.inria.fr/BIOCHAM/ in either binary or source distributions. Installation procedure from a binary version -------------------------------------------- We provide a Windows binary version BiochamSetup.exe and a Mac OS X (Universal) binary version biocham.dmg of Biocham >= 3.2 with its GUI. We recommend that you have already installed first Java version >= 1.5 for using the GUI of BIOCHAM. Then you just need to execute and follow the instructions of the setup program. Finish by reading the last section of this file about Editing BIOCHAM files. Installation procedure from source ---------------------------------- To install from source, and to be able to use all the features of Biocham, you need to install also: * Java (at least 1.5) http://java.sun.com/ * a version of the model checker NuSMV http://nusmv.fbk.eu/NuSMV/download/getting-v2.html * GNU Plot (for the command-line version) * Graphviz graph layout http://www.research.att.com/sw/tools/graphviz/ If you are running Windows, and installing from source, you will need another component: Cygwin 1.7, an UNIX-like environment for Windows. You do not need it if you choose to install the binary distribution from the setup program. After installation you can create a binary distribution BiochamSetup.exe by executing the command make BiochamSetup.exe The installation basically proceeds by ./configure make make install You can give special arguments to configure like --prefix or --with-gplc, type ./configure --help for more details. The BIOCHAM executables are copied to ${prefix}/bin (default: /usr/local/bin) If a recompilation is needed on your machine, you may need to install also: * a C compiler (preferably gcc) and a Java compiler, * if you are on Windows/Cygwin, a patched version of GNU Prolog 1.3.1 http://contraintes.inria.fr/gprolog-snapshot.tgz * the GNU MP bignum library (version 4.1.3 or higher) http://gmplib.org/ * the Parma Polyhedra Library (version 0.10 or more recent) http://www.cs.unipr.it/ppl/ * Perl, to generate editor modes for vim and emacs, * help2man to generate the man page. Installing Cygwin (Windows from source only) -------------------------------------------- [Once again, this is not necessary if you install BioCham from the setup program] Get Cygwin 1.7 from http://www.cygwin.com/, double click on setup.exe and follow the instructions. Version 1.7 of Cygwin is necessary with the following packages: - gcc-4 and g++4 - make - PPL, GMP (GNU bignum library version 4) - gnuplot, gv After configuring Cygwin with the necessary packages, you have to install as described below: - The patched version of Gnu Prolog for Linux (not the Windows version which lacks some system functions) - NuSMV - Graphviz. Don't forget to add the bin directories to your system's path. If you want to create the BiochamSetup.exe, you have to have installed the following installation utilities software: Process Viewer, Launch4j and InnoSetup. Installation procedure from source with MinGW on Windows -------------------------------------------------------- 1) Install MinGW: http://mingw.org/wiki/Getting_Started On the "Select Components" frame, check the following packages: - C++ compiler - MSYS Basic System (implied by MinGW Developer ToolKit, give sh, etc.) - MinGW Developer ToolKit (needed for m4, autoconf, automake, etc.) 1bis) If you forgot to select these components, open a MinGW shell (see below) and execute mingw-get install g++ msys-base mingw-developer-toolkit and follow the instructions to run the post-install script of MSYS. 2) Download and extract the source code of the latest version of the GMP library: http://gmplib.org Note: you can use "tar -xjf" to extract the source code directly in the MinGW shell. 3) Run a MinGW shell (Start Menu->All Programs->MinGW->MinGW Shell), go to the directory where the GMP source has been extracted, and execute CPPFLAGS=-fexceptions ./configure --enable-cxx && make && make install 4) Download and extract the source code of the latest version of the PPL library: http://www.cs.unipr.it/ppl/Download/ 5) In a MinGW shell, go to the directory where the PPL source has been extracted, and execute ./configure --enable-shared=no && make && make install 6) Install Microsoft HTML Help Workshop: http://msdn.microsoft.com/en-us/library/ms669985 7) Download and extract the source code of the latest version of GNU Prolog: http://gprolog.org 8) In a MinGW shell, go to the directory where the GNU Prolog source has been extracted (sub-directory src/), and execute export C_INCLUDE_PATH='/c/Program Files/HTML Help Workshop/include' export LIBRARY_PATH='/c/Program Files/HTML Help Workshop/lib' ./configure && make && make install 9) Download and extract the source code of the latest version of Biocham: http://contraintes.inria.fr/BIOCHAM 10cvs) Execute (CVS only): aclocal && autoconf && automake --add-missing 10) In a MinGW shell, go to the directory where the Biocham source has been extracted, and execute export PL_PATH=/usr/local/gprolog-1.4.0 export C_INCLUDE_PATH=/usr/local/include export LIBRARY_PATH=/usr/local/lib ./configure && make all-am Installing Java 1.5/1.6 ----------------------- If you install from source you need the Java SDK including the compiler javac. 1) If you are running Windows or Linux Just go to the Sun web page (http://java.sun.com/j2se/), download the latest version (>= 1.5) and follow the instructions to install it. Note that under Windows, you need to add the bin directory of Java to your Cygwin system's path 2) If you are running Mac OS X You will need to get Apple's version from: http://www.apple.com/support/downloads/java2se50release1.html The 1.6 beta version is available on the developers' pages. Installing NuSMV ---------------- 1) Install a binary version A binary version is available for Windows with Cygwin 1.7. Just copy NuSMV.exe in a place found by your system's path. Some binary versions also exist for certain Linux distributions. For MacOS you can obtain a version through MacPorts (port install nusmv) and may be other means (fink, homebrew, etc.) For PPC-Mac OS X, you can get an old (2.4.0) binary version from: http://nusmv.fbk.eu/bin/bin_download2-v2.cgi 2) Install NuSMV from source 2.1) Get the source First, get a copy from: http://nusmv.fbk.eu/NuSMV/download/getting-v2.html 2.2) To build the NuSMV source Extract the archive and go to the directory where NuSMV was extracted. Please refer to the NuSMV README file for detailed instructions. Note that you must at least first compile cudd: % cd cudd % make (or make -f Makefile_for_your_system) % cd .. Note: For instance, under MacOSX, you should do: "make -f Makefile_os_x" Now type % cd nusmv % ./configure % make This should result in creating an executable called NuSMV in the 'nusmv' directory Add that directory to your PATH as explained in 1. 3) If you already have a running version of NuSMV Check that it is in your PATH: [in a terminal, or a cygwin window] % NuSMV -h ... lots of command line options ... If NuSMV is not in your PATH, add its directory to the PATH environment variable. Depending on your shell, i.e. the value of your SHELL environment variable, you can do that by typing either if % echo $SHELL answers /bin/tcsh then % setenv PATH $PATH:/path/where/NuSMV/is if it answers /bin/sh or /bin/bash % export PATH=${PATH}:/path/where/NuSMV/is Under windows, the PATH is accessible from the environment variables window in the advanced properties of the desktop. Installing GNUplot ------------------ 1) If you are running Linux There is probably a binary version of gnuplot available from your distribution CD/home page. If gnuplot is not installed on your system you might be able to get the binary version by typing: for an RPM-based distribution (RedHat, Mandrake, ...) % urpmi gnuplot for a Deb-based distribution (Debian, ...) % apt-get install gnuplot If you cannot find a binary version, get the source from: http://www.gnuplot.info/ or http://contraintes.inria.fr/BIOCHAM/gnuplot Expand the .tar.gz archive, enter the directory and execute % ./configure % make and if you want to % make install At the end, check that gnuplot is in your PATH and if necessary add it as explained above. 2) If you are running Windows There are two solutions: * either install the cygwin package named 'gnuplot' (just select it in Cygwin setup/upgrade utility). You will thus have gnuplot in your cygwin PATH, but you will need to launch XFree to be able to use it, so you will need to execute 'startx' before biocham. * Or get the version corresponding to your system (dos, w16 or w32) from: http://www.gnuplot.info/ unzip the archive, and add the directory to your PATH. The procedure to add a Windows directory to your Cygwin PATH variable is the same as above except that GNUplot's directory is not in cygwin's structure, you thus need to translate its location so that Cygwin understands where it is. For instance, suppose that GNUplot's directory is: C:\Program Files\gnuplot The path to be added to Cygwin will be "/cygdrive/c/Program Files/gp373w32" ^^^^^^^^^^^- this part corresponds to the C:, the rest is identical except for the orientation of slashes/backslashes adding it (under bash) would be % export PATH=${PATH}:"/cygdrive/c/Program Files/gp373w32" Now pgnuplot should be in your PATH (you can test that by calling it from Cygwin: % pgnuplot or by asking Cygwin where it is: % which pgnuplot ) 3) If you are running Mac OS X The most easy and simple way is to install ppl and graphviz by using macports (http://www.macports.org). Note that for ppl installation you need to use gcc version more recent then 4.2. Try first to find out which gcc your system is using by default, and if its less recent then 4.2, install minimal version of gcc 4.2, and specify the ppl installation with the following command: sudo port install ppl configure.compiler=gcc_XX, where XX is the satisfying version. Otherwise, for installing the dependencies from the source, follow the procedures described below. Installing PPL -------------- To build BIOCHAM 2.8 or higher you need to install the Parma Polyhedra Library http://www.cs.unipr.it/ppl/ version 0.10 or higher CC=gcc-4 CXX=g++-4 configure --enable-cxx make make install Fo this you need to have the GNU bignum library version 4 installed and compiled with the same compiler. If it is not the case you can get it from http://gmplib.org/ and do CC=gcc-4 CXX=g++-4 configure --enable-cxx make make install Editing BIOCHAM files --------------------- 1) If you use vim (http://www.vim.org) as editor, then you can get a syntax highlighting and indentation mode as follows: (if you have used 'make install' the vim directory sould be in ${prefix}/share/Biocham) % cp vim/bc_indent.vim ~/.vim/indent/bc.vim % cp vim/bc_syntax.vim ~/.vim/syntax/bc.vim Then you need to edit your .vimrc to obtain: if has("autocmd") augroup filetypedetect " other commands ... au! BufNewFile,BufRead *.bc setf bc au FileType bc exe "setlocal cpt+=k~/.vim/syntax/bc.vim" endif This will automatically read in the Biocham style files when editing a .bc file 2) If you use emacs: (if you have used 'make install' the emacs directory sould be in ${prefix}/share/Biocham) % cp emacs/bc-mode.el ~/.emacs.d/ And add to your .emacs: (load "bc-mode.el") Making sure ~/.emacs.d is in your load-path. If it is not, you can add it by adding the following line to your .emacs: (setq load-path (cons (concat (getenv "HOME") "/.emacs.d") load-path)) If you want the biocham mode to be automatically loaded when you open a file ending in ".bc" you might want to add (setq auto-mode-alist (cons '("\\.bc$" . bc-mode) auto-mode-alist)))