Installing PRISM /

Instructions

Prerequisites

PRISM is known to run on Linux, Windows, Mac OS X and Solaris, including 64-bit variants of these operating systems.

You will need Java, more specifically the Oracle (formerly Sun) version. To run binary versions of PRISM, you only need the Java Runtime Environment (JRE), not the full Java Development Kit (JDK). Currently, we assume you have Java 7 or above (but up until PRISM 4.2, Java 6 actually sufficed). If you don't know what version of Java you have, type java -version from a command prompt.

To compile PRISM from source, you need the Java Development Kit (JDK), GNU make and a C/C++ compiler (e.g. gcc/g++). For compilation under Windows, you will need Cygwin. See below for more information.


Installation on Windows (32-bit)

To install PRISM on Windows, just run the self-extracting installer which you downloaded. You do not need administrator privileges for this, just write-access to the directory chosen for installation.

If requested, the installer will place shortcuts to run PRISM on the desktop and/or start menu. If not, you can run by PRISM double-clicking the file xprism.bat (which may just appear as xprism) in the bin folder of your PRISM folder. If nothing happens, the most likely explanation is that Java is not installed or not in your path. To check, open a command prompt window, navigate to the PRISM directory, type cd bin, then xprism.bat and examine the resulting error. If you want to create shortcuts to xprism.bat manually, you will find some PRISM icons in the etc folder.

If you wish to use the command-line version of PRISM on Windows, open a command prompt window and type for example:

cd "c:\Program Files\prism-4.0-win\bin"
prism ..\examples\dice\dice.pm

You can also edit the file bin\prism.bat to allow it to be run from any location. See the instructions within the file for further details.

Problems? See the section "Common Problems And Questions''.


Installation on Windows (64-bit)

PRISM is known to run on 64-bit versions of Windows. Since we currently only provide 32-bit binary versions, you will need to install and use a 32-bit, rather than 64-bit version of Java. If not, you may see strange error messages like "Can't load IA 32-bit .dll on a AMD 64-bit platform".

You will probably also need to update bin\xprism.bat (and bin\prism.bat, if you use it), changing javaw on the last line to include the full path to the 32-bit executable.

Other than this, installing and running PRISM is as for the 32-bit case described above.

If this is not possible for some reason, an alternative is to build PRISM from source using Cygwin (See below).

Problems? See the section "Common Problems And Questions''.


Installation of (non-Windows) binary versions

To ensure compatibility, we recommend that you compile PRISM from source on non-Windows platforms. See below for instructions. However, we do provide pre-compiled binary distributions for Linux (32-bit) and, depending on availability, other operating systems such as Mac OS X and Solaris.

To install a binary distribution, unpack the tarred/zipped PRISM distribution into a suitable location, enter the directory and run the install.sh script, e.g.:

gunzip prism-4.0-linux.tar.gz
tar xf prism-4.0-linux.tar
cd prism-4.0-linux
./install.sh

You do not need to be root to install PRISM. The install script simply makes some small customisations to the scripts used to launch PRISM. The PRISM distribution is self-contained and can be freely moved/renamed, however if you do so you will need to re-run ./install.sh afterwards.

To run PRISM, execute either the xprism or prism script (for the graphical user interface or command-line version, respectively). These can be found in the bin directory. These scripts are designed to be run from anywhere and you can easily create symbolic links or aliases to them. If you want icons to create desktop shortcuts to PRISM, you can find some in the etc directory.

Problems? See the section "Common Problems And Questions''.


Building PRISM from source

To compile PRISM form source code, you will need:

  • GNU make (sometimes called gmake)
  • a C/C++ compiler (e.g. gcc/g++)
  • The Java Development Kit (JDK) from Oracle (formerly Sun), version 5.0 (sometimes called 1.5) or higher

To check what version of Java you have, type java -version. To check that you have the development kit, type javac. If you get an error message that javac cannot be found, you probably do not have the JDK installed (or your path is not set up correctly).

Hopefully, you can build PRISM simply by entering the PRISM directory and running make, e.g.:

gunzip prism-4.0-src.tar.gz
tar xf prism-4.0-src.tar
cd prism-4.0-src
make

For this process to complete correctly, PRISM needs to be able to determine both the operating system you are using and the location of your Java distribution. If there is a problem with either of these, you will see an error message and will need to specify one or both of these manually, such as in these examples:

make OSTYPE=linux
make JAVA_DIR=/usr/java/jdk1.5.0
make OSTYPE=cygwin JAVA_DIR="/cygdrive/c/Program Files/Java/jdk1.5.0"

Note the use of double quotes for the case where the directory contains a space. If you don't know the location of your Java installation, try typing which javac. If the result is e.g. /usr/java/jdk1.5.0/bin/javac then your Java directory is /usr/java/jdk1.5.0. Sometimes javac will be a symbolic link, in which case use "ls -l" to determine the actual location.

It is also possible to to set the environment variables OSTYPE and JAVA_DIR directly or edit their values in the Makefile directly. Note that even when you specify JAVA_DIR explicitly (in either way), PRISM still uses the versions of javac (and javah) that are in your path so make sure this is set up correctly.

Problems? See the section "Common Problems And Questions''.


Building PRISM on 64-bit machines

PRISM has also been successfully compiled under Linux on a variety of 64-bit architectures. In general this should work exactly as described above. The Makefile will try to detect that you are compiling on a 64-bit machine but, if this does not work for some reason, you can override detection by setting ARCH to either amd64 (for AMD/Intel 64) or ia64 (for Itanium). For example:

make ARCH=amd64

For 64-bit Macs, see below.

Problems? See the section "Common Problems And Questions''.


Building PRISM on Macs

In most cases, you should be able to build PRISM from source under Mac OS X using the instructions given above. There are, however, a few known issues to be aware of.

The most common problem is when building on recent 64-bit Macs, under which PRISM has some issues with Java. The best advice, currently, is to compile and run a 32-bit version of PRISM. To do this:

  1. Make sure you are using a 32-bit version of Java (e.g. through "Java Preferences" under /Applications/Utilities).
  2. Make sure you have the very latest version of PRISM available.
  3. Build PRISM (as above).

If this still does not work, it may be that PRISM is detecting automatically that you are on a 64-bit machine. You can override this as follows:

make clean_all
make ARCH=

Problems? See the section "Common Problems And Questions''.


Building PRISM from source on Windows using Cygwin

The compilation of PRISM currently relies on a Unix-like environment. On Windows, this can be achieved using the Cygwin development environment (or alternatively using MSYS - see below). Once Cygwin is installed, first ensure gcc, gcc-3 and make are installed, then you can proceed as described in the previous section. Note that the PRISM compilation process uses the MinGW libraries so that the final result is independent of Cygwin at run-time.

One thing to note: make sure you unzip the PRISM distribution from within Cygwin (e.g. using tar xfz prism-XXX-src.tar.gz). Don't use a Windows program (Winzip, etc.) since this can cause problems.

Problems? See the section "Common Problems And Questions''.


Building PRISM from source on Windows using MSYS

Compiling from source in MSYS is less obvious as this environment is currently not directly supported in the makefile. Additionally, MSYS does not handle symlinks in the same way as cygwin does. The first problem is fixed by providing a OSTYPE variable to the makefile, whereas the second problem currently has to be solved manually.

make OSTYPE=cygwin

At some point it will fail, saying that it cannot find the CUDD library, this is due to the failing symlinks. We can solve this by means of a few commands:

cd cudd/
rmdir lib/
./setup.sh
cd ..
make OSTYPE=cygwin
./install.sh

Problems? See the section "Common Problems And Questions''.

PRISM Manual

Installing PRISM

[ View all ]